Use "str.startswith" instead of ugly hack

master
pictuga 2013-11-30 19:36:15 +01:00
parent 8916216403
commit b927a4d089
1 changed files with 1 additions and 1 deletions

View File

@ -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'