Support feeds handed out as text/html
<http://www.pro-linux.de/rss/index1.xml> and <http://tehrantimes.com/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw> are on an equal footing…master
parent
8eb2f7c249
commit
658f51e5a9
3
morss.py
3
morss.py
|
@ -385,8 +385,7 @@ def Gather(url, cachePath, progress=False):
|
|||
except (urllib2.URLError, httplib.HTTPException, socket.timeout):
|
||||
return False
|
||||
|
||||
if con.info().type in ['text/xml', 'application/xml', 'application/rss+xml',
|
||||
'application/rdf+xml', 'application/atom+xml']:
|
||||
if xml[:5] == '<?xml' or con.info().type in ['text/xml', 'application/xml', 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml']:
|
||||
cache.set('xml', xml)
|
||||
cache.set('etag', con.headers.getheader('etag'))
|
||||
cache.set('lastmodified', con.headers.getheader('last-modified'))
|
||||
|
|
Loading…
Reference in New Issue