Coder Social home page Coder Social logo

beagle_scraper's Introduction

Beagle Scraper

Building the largest open-source Ecommerce scraper with Python and BeautifulSoup4

Usage

No installation or setup required

  1. Download the source code into a folder
  2. Create a urls.txt file with product category pages to be scraped like this Amazon page
  3. Run the command
$ python start_scraper.py

Output

Beagler Scraper will export all data into JSON format into a sub-folder

Current supported e-commerce stores

  • Amazon.com
  • BestBuy.com
  • HomeDepot.com

Beagle Scraper tutorial - how to use and run the scraper

https://www.bestproxyproviders.com/blog/beagle-scraper-tutorial-how-to-scrape-e-commerce-websites-and-modify-the-scraper/

Getting Started

Beagle Scraper requires a machine with Python 2.7 and BeautifulSoup4

Install BeautifoulSoup4

$ pip install beautifulsoup4

Prerequisites - extra Python packages required

The following packages are not included in the default Python 2.7 install and require installation

  • tldextract
$ sudo pip install tldextract
  • selenium
$ pip install selenium

If another package is missing run the command

$ pip install [missing package name]

Using proxies to scrape

Beagle Scraper support external proxies at the moment, but proxychains can be used to send requests through different proxies

After installing proxychains, run this command to make the scraper use proxies

$ proxychains python start_scraper.py

Test Beagle Scraper

Here's a short test for Beagle Scraper

  1. Download Beagle Scraper
  2. Create a urls.txt file and insert the following product category pages (each link on a different line)
  1. Run Beagle Scraper
$ python start_scraper.py

Example output for the above scraped urls:

  • amazon_dd_mm_yy.json
  • bestbuy_dd_mm_yy.json

Built With

How to contribute

All you have to do is to create a function scraper link amazon_scraper() from beagle_scraper.py and submit it here.

Here is more info on how the scraper function is created

Things to consider:

  1. HTML wrapper and class/id for each product listed on the page
  2. The product details HTML tags and classes
  3. Pagination setup

Authors

License

GPL-3.0 license

beagle_scraper's People

Contributors

chrisroark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.