Support for wikipedia fetured articles feed
Should work with most wikipedias
This commit is contained in:
		@@ -350,6 +350,13 @@ def Fix(item, feedurl='/'):
 | 
			
		||||
		log('no link')
 | 
			
		||||
		return item
 | 
			
		||||
 | 
			
		||||
	# wikipedia daily highlight
 | 
			
		||||
	if fnmatch(feedurl, 'http*://*.wikipedia.org/w/api.php?*&feedformat=atom'):
 | 
			
		||||
		match = lxml.html.fromstring(item.desc).xpath('//b/a/@href')
 | 
			
		||||
		if len(match):
 | 
			
		||||
			item.link = match[0]
 | 
			
		||||
			log(item.link)
 | 
			
		||||
 | 
			
		||||
	# check relative urls
 | 
			
		||||
	item.link = urlparse.urljoin(feedurl, item.link)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user