Quantcast
Channel: Active questions tagged feedparser+rss+web-scraping - Stack Overflow
Viewing all articles
Browse latest Browse all 3

RSS scraping from several websites

$
0
0

I am trying to fetch some RSS feeds from a list of blog sites.But, most of these sites have older Feeds entries. And some of these sites do not have any etag information.so i cant check the latest published feed with etag.

I figured out a logic to check the feed according to their published date..But, it is not working.It will be appreciable, if anyone can re-write my code.

import feedparser
import time
from datetime import datetime ,timedelta

today = date.today()

with open("/home/list.txt","r") as f:

    for line in f:
        print line;
        feed_url = line
        feed_list = feedparser.parse(feed_url)
        feed_count = len(feed_list['entries'])
        for item in feed_list.entries:

                if item.feed_list.published == today:

        print item.title + " : " + item.link

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>