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]
if re.match(b'\s*<\?xml', xml) is not None or contenttype in crawler.MIMETYPE['xml']:
rss = feeds.parse(xml)
elif feedify.supported(url):
if feedify.supported(url):
# using config file-based feedify
feed = feedify.Builder(url, xml)
feed.build()
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:
# using argument-based feedify
rule = {'items': options.items}