def update_local(): for feed in Feed.objects.all(): try: soup = feedparser.parse(feed.rss_link) except Exception,e: print 'parsing error',e continue fetch_entries(feed,soup['entries'])
def fetch(url,is_write=True): print 'parsing: ',url if not url: return if Feed.objects.filter(rss_link=url): return 'pass' try: soup = feedparser.parse(url) except Exception,e: print 'parsing error',e return