Test for feedify support first
Otherwise might never be called if the content-type is also supported
This commit is contained in:
		@@ -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}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user