Skip to main content

News Scraper

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

News#

  • news_scrapper()#

    Helps in scraping News data (Headlines, Time, Date, News).

    Return type#


    pandas.DataFrame

    Parameters#


    n_pages: Enter the number of pages that it will scrape at a single run.
    Type: int

    genre: Enter the news genre
    Type: str
    Default: '' (None)
    Accepted Values: 'national', 'business', 'sports', 'world', 'politics', 'technology', 'startup', 'entertainment', 'miscellaneous', 'hatke', 'science', 'automobile'

    Note#


    Both the arguments are a compulsion.

    obj = PyScrappy()obj.news_scrapper(n_pages, genre)