Python Script to scrap the news+urls headlines from news-websites.
1.Importing
from newsme.nm import NewsMe
2.Get Beutified HTML
url = "http://timesofindia.com"
N = NewsMe(url)
print(N.html())
3.Get headlines with urls:
N.headlines()
#List of tuples containing (newsHeadline, url) is returned
4.Change the order to fetch more accurate headlines data
N = NewsMe(url, order=3)
- beautifulsoup4
- urllib
New Features and Contributions are accepted.