How to check whether the passed url is a valid rss feed
I'm trying to validate the url, like If I pas feedparser.parse('http://rohitkhatri.com'), It should give me false.
Is there any property which I can access to get this information?
The number of entries being 0?
On Thu, 1 Dec 2016, 23:53 Rohit Khatri, [email protected] wrote:
I'm trying to validate the url, like If I pas feedparser.parse(' http://rohitkhatri.com'), It should give me false.
Is there any property which I can access to get this information?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kurtmckee/feedparser/issues/86, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGCwMI9c9_rNvWVTHGHo0w7kmdF9ecSks5rD86NgaJpZM4LCSaw .
@kevinmarks Yes, no. of entries is zero, will that be fine to validate an rss feed?
I solved it by checking number of entries, thanks to @kevinmarks :-)
not sure if correct
d = feedparser.parse('invalid_url')
if d.status != 200:
invalid_url