Use desktop browser UA for xml
Convenient for rss links detection and "feedify"master
parent
e3c1cd8619
commit
cf5040020e
2
morss.py
2
morss.py
|
@ -379,7 +379,7 @@ def Gather(url, cachePath, options):
|
||||||
style = cache.get('style')
|
style = cache.get('style')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
opener = CacheDownload(cache.get(url), cache.get('etag'), cache.get('lastmodified'))
|
opener = CacheDownload(cache.get(url), cache.get('etag'), cache.get('lastmodified'), useragent=UA_HTML)
|
||||||
con = urllib2.build_opener(opener).open(url, timeout=TIMEOUT)
|
con = urllib2.build_opener(opener).open(url, timeout=TIMEOUT)
|
||||||
xml = con.read()
|
xml = con.read()
|
||||||
except (urllib2.URLError, httplib.HTTPException, socket.timeout):
|
except (urllib2.URLError, httplib.HTTPException, socket.timeout):
|
||||||
|
|
Loading…
Reference in New Issue