Skip to main content

Food Scraper

Create an instance of the PyScrappy library to interact with the class FoodScraper:

Helps in scrapping data from food delivery websites

1. Swiggy2. Zomato
  • Type#


    class

  • Note#


    Create an object of this class to procced further.

    obj = PyScrappy.WikipediaScrapper()

Swiggy#

  • swiggy_scrapper()#

    Helps in scraping data from the Swiggy webpage ('Name', 'Cuisine', 'Price', 'Ratings').

    Return type#


    pandas.DataFrame

    Parameters#


    city_name: Enter the name of the desired city, from where you want to scrape the resturant data of.
    Type: str

    n_pages: Enter the number of pages that you want to scrape.
    Type: int

    Note#


    Both the arguments are a compulsion. If n_pages == 0: A prompt will ask you to enter a valid page number and the scrapper will re-run.

    obj = PyScrappy()obj.FoodScraper.swiggy_scrapper(city_name, n_pages)

Zomato#

  • zomato_scrapper()#

    Helps in scraping Snapdeal data ('Name', 'Cuisine', 'Price', 'Ratings', 'Delivery Time', 'Review Counts').

    Return type#


    pandas.DataFrame

    Parameters#


    product_name: Enter the name of the desired city, from where you want to scrape the resturant data of.
    Type: str

    n_pages: Enter the number of pages that you want to scrape.
    Type: int

    Note#


    Both the arguments are a compulsion. If n_pages == 0: A prompt will ask you to enter a valid page number and the scrapper will re-run.

    obj = PyScrappy()obj.FoodScrapper.zomato_scrapper(product_name, n_pages)