From cf5040020e743ccb953ea2786a703a942331809f Mon Sep 17 00:00:00 2001 From: pictuga Date: Tue, 1 Oct 2013 19:47:45 +0200 Subject: [PATCH] Use desktop browser UA for xml Convenient for rss links detection and "feedify" --- morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss.py b/morss.py index bbd1d1c..7bc5265 100644 --- a/morss.py +++ b/morss.py @@ -379,7 +379,7 @@ def Gather(url, cachePath, options): style = cache.get('style') else: 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) xml = con.read() except (urllib2.URLError, httplib.HTTPException, socket.timeout):