Esempio n. 1
0
File: fetcher.py Progetto: fay/wt
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'])
Esempio n. 2
0
File: fetcher.py Progetto: fay/wt
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