예제 #1
0
파일: fetcher.py 프로젝트: 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'])
예제 #2
0
파일: fetcher.py 프로젝트: 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