Test for feedify support first

Otherwise might never be called if the content-type is also supported
master
pictuga 2018-10-25 01:17:24 +02:00
parent d13362c4ac
commit 4e144487db
1 changed files with 4 additions and 4 deletions

View File

@ -338,15 +338,15 @@ def FeedFetch(url, options):
contenttype = con.info().get('Content-Type', '').split(';')[0] contenttype = con.info().get('Content-Type', '').split(';')[0]
if re.match(b'\s*<\?xml', xml) is not None or contenttype in crawler.MIMETYPE['xml']: if feedify.supported(url):
rss = feeds.parse(xml)
elif feedify.supported(url):
# using config file-based feedify # using config file-based feedify
feed = feedify.Builder(url, xml) feed = feedify.Builder(url, xml)
feed.build() feed.build()
rss = feed.feed rss = feed.feed
elif re.match(b'\s*<\?xml', xml) is not None or contenttype in crawler.MIMETYPE['xml']:
rss = feeds.parse(xml)
elif options.items: elif options.items:
# using argument-based feedify # using argument-based feedify
rule = {'items': options.items} rule = {'items': options.items}