World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITians, only for AI Learners.
Designed by IITians, only for AI Learners.
New to InsideAIML? Create an account
Employer? Create an account
Download our e-book of Introduction To Python
4.5 (1,292 Ratings)
559 Learners
Anand Roy
a year ago
import feedparser
NewsFeed = feedparser.parse("https://timesofindia.indiatimes.com/rssfeedstopstories.cms")
entry = NewsFeed.entries[1]
print(entry.keys())
dict_keys(['title', 'title_detail', 'summary', 'summary_detail', 'links', 'link', 'id', 'guidislink', 'published', 'published_parsed'])
import feedparser
NewsFeed = feedparser.parse("https://timesofindia.indiatimes.com/rssfeedstopstories.cms")
print('Number of RSS posts :', len(NewsFeed.entries))
entry = NewsFeed.entries[1]
print('Post Title :',entry.title)
Number of RSS posts : 19
Post Title : Live: Section 144 in Hathras ahead of Rahul's visit
import feedparser
NewsFeed = feedparser.parse("https://timesofindia.indiatimes.com/rssfeedstopstories.cms")
entry = NewsFeed.entries[1]
print entry.published
print("******")
print(entry.summary)
print("------News Link--------")
print(entry.link)
Tue, 29 Sep 2020 16:21:33 IST
******
A day after Uttar Pradesh chief minister Yogi Adityanath spoke to the victim's family and assured strict punishment to the culprits, the 3-member SIT visited the village and launched its probe on Thursday. Meanwhile, Hathras district administration has imposed Section 144 in the district. Stay with TOI for all the latest updates:
------News Link--------
https://timesofindia.indiatimes.com/city/delhi/live-updates-hathras-gangrape-victim-dies-in-delhi-hospital/liveblog/78384037.cms