fbfeed + sectionreset
This commit is contained in:
@@ -40,10 +40,10 @@ def fetch_page(furl):
|
||||
if u[0] == '':
|
||||
furl=urlparse.urlunsplit(("http",u[1],u[2],u[3],u[4]))
|
||||
cc=CrawlCache.query.filter(CrawlCache.url==furl).filter(CrawlCache.fetched>ten_weeks_ago).first()
|
||||
if cc is None:
|
||||
if cc is None or u[0]=='fb': # no caching for Facebook
|
||||
clogger.debug("fetching url: "+ str(furl))
|
||||
if u[0]=='fb':
|
||||
tx = json.dumps(graph.get_object(id=u[1]+u[2]))
|
||||
tx = json.dumps(graph.get_object(id=u[1]+u[2]+"?fields=story,created_time,id,message,attachments"))
|
||||
else:
|
||||
tx=s.get(furl).text
|
||||
CrawlCache.store(furl,tx)
|
||||
|
||||
Reference in New Issue
Block a user