News Scraper
Create an instance of the PyScrappy library to interact
with the class News Scraper:
#
Newsnews_scrapper()
#Helps in scraping News data (Headlines, Time, Date, News).
#
Return typepandas.DataFrame
#
Parametersn_pages
: Enter the number of pages that it will scrape at a single run.
Type: intgenre
: Enter the news genre
Type: str
Default: '' (None)
Accepted Values: 'national', 'business', 'sports', 'world', 'politics', 'technology', 'startup', 'entertainment', 'miscellaneous', 'hatke', 'science', 'automobile'#
NoteBoth the arguments are a compulsion.
obj = PyScrappy()obj.news_scrapper(n_pages, genre)