Use "str.startswith" instead of ugly hack
parent
8916216403
commit
b927a4d089
2
morss.py
2
morss.py
|
@ -500,7 +500,7 @@ def Gather(url, cachePath, options):
|
||||||
cache.set('etag', con.headers.getheader('etag'))
|
cache.set('etag', con.headers.getheader('etag'))
|
||||||
cache.set('lastmodified', con.headers.getheader('last-modified'))
|
cache.set('lastmodified', con.headers.getheader('last-modified'))
|
||||||
|
|
||||||
if xml[:5] == '<?xml' or con.info().type in MIMETYPE['xml']:
|
if xml.startswith('<?xml') or con.info().type in MIMETYPE['xml']:
|
||||||
style = 'normal'
|
style = 'normal'
|
||||||
elif feedify.supported(url):
|
elif feedify.supported(url):
|
||||||
style = 'feedify'
|
style = 'feedify'
|
||||||
|
|
Loading…
Reference in New Issue