Git Product home page Git Product logo

recipebot's Introduction

Recipebot

License

Python web scraper based on Scrapy framework for obtaining recipe data from most popular cooking websites.

Supported websites

  1. https://cookpad.com/

How to run

  1. Create Python virtualenv

    python3 -m venv recipevenv 
  2. Activate Python virtualenv

    source recipevenv/bin/activate
    
  3. Install Linux dependencies (for proper SQLAlchemy functioning)

    sudo apt install libpq-dev libffi-dev python3-dev libxml2 libxml2-dev libxslt-dev
    
  4. Install Python libraries

    python setup.py install
    
  5. Navigate to /cookpad directory, launch scrapy

    • Save recipes to postgreSQL database :
    scrapy crawl cookpadbot -a category=vegan
    • Save recipes to JSON file (if you want to disable saving to postgreSQL DB, comment ITEM_PIPELINES variable in cookpad/cookpad/settings.py file):
    scrapy crawl cookpadbot -o vegetarian.json -a category=vegetarian
  6. To deactivate virtual environment:

    deactivate

Sample recipes

Sample recipes available in cookpad/cookpad/sample_recipes directory.

recipebot's People

Contributors

maciejte avatar

Forkers

shabnaz21

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.