Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Meet Bose Framework: 🚀 Your Swiss Army Knife as a Ninja Scraper ✨

Posted on Jun 12 Bose Framework is a framework built for selenium developers packed with best practices from experienced bot developers to help create undetectable, low boilerplate and easy to debug bots. 🤖It helps you scrape or automate target websites with ease and gives you the mental powers of experienced bot developers at your fingertips, saving you hours of development time. 👨🏻‍💻Bose is a battery packed framework that implements following feautres to help you create bots faster, saving your valuable Development Time. ✨With Bose, you can launch browser in few lines of code without having to worry about specifying paths:In bare Selenium, if you want to configure options such as the profile, user agent, or window size, it requires writing a lot of code, as shown below:With Bose, you can specify them in a single line of code using predefined variables. Here's an example:Bose also addresses a common frustration with Selenium - when an exception occurs, the browser crashes and closes automatically. This behavior is not desirable for bot developers and makes debugging hard. Bose, on the other hand, keeps the browser open in the event of an exception, allowing for easier debugging of the problem.Let's say you went to drink coffee while your bot was running, and when you came back, you noticed that the bot had closed.As a developer, you might have an itch to see the last screenshot taken before the browser was closed or to know how much time the bot took to complete its task.Well, Whenever you run Bose, it automatically stores important details such as After, each run a new folder is created in tasks folder which contains three files, listed below:It contains information about the task run such as This is the screenshot captured before driver was closed. This is the html source captured before driver was closed. Very useful to know in case your selectors failed to select elements.In case your task crashed due to exception we also store error.log which contains the error due to which the task crashed. This is very helful in debugging.Multi Million Dollar Companies protects their valuable data with the help of Cloudflare and PerimeterX.Now, you might be wondering how to bypass systems like Cloudflare and PerimeterX. Well, a brilliant Developer named Leon created a ChromeDriver that has excellent support for bypassing all major bot detection systems such as Distil, Datadome, Cloudflare, and others. To use it, simply pass the use_undetected_driver option to the BrowserConfig in your code, as shown below:Outputting data in CSV or JSON requires a significant amount of imperative code, as shown below:Bose simplifies these complexities by encapsulating them in the Output module for easy reading and writing of data:Bose simplifies cross-platform development by abstracting away the differences between operating systems such as Windows, Mac, and Linux. You no longer need to specify driver paths specific to each OS when launching browser.The driver you receive in the run method of the Bose Task is an extended version of Selenium that adds powerful methods to make working with Selenium much easier. Some of the popular methods added to the Selenium driver by Bose Framework are:In simple words, Bose is an excellent framework that simplifies the boring parts of Selenium and web scraping.Now, let's see how you can have the magic of Bose at your finger tips. Start by Cloning the TemplateThen change into that directory, install dependencies, open vscode, and start the project:The first run will take some time as it downloads the chrome driver executable, subsequent runs will be fast.Once started it will scrape data from quotes.toscrape.com and store the results in /output/finished.jsonSimply put, Bose empowers you to effortlessly automate or scrape your Target Website and its content with the ease of cutting butter with a knife. 👋 Hi Reader, What do you think? Do you see the value of Bose Framework?Share your thoughts in the comments and I will reply to every single comment.Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Shreyansh sheth - May 8 Rob OLeary - Jun 2 jdtjenkins - Jun 7 Klajdi - May 22 Once suspended, rajesh_singh_1989 will not be able to comment or publish posts until their suspension is removed. Once unsuspended, rajesh_singh_1989 will be able to comment and publish posts again. Once unpublished, all posts by rajesh_singh_1989 will become hidden and only accessible to themselves. If rajesh_singh_1989 is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to rajesh singh. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag rajesh_singh_1989: rajesh_singh_1989 consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging rajesh_singh_1989 will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

Meet Bose Framework: 🚀 Your Swiss Army Knife as a Ninja Scraper ✨

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×