Check relative url earlier

master
pictuga 2013-09-25 11:49:45 +02:00
parent 1e621099e0
commit fd1501a0c0
1 changed files with 3 additions and 3 deletions

View File

@ -273,6 +273,9 @@ def Fill(item, cache, feedurl='/', fast=False):
log(item.link) log(item.link)
# check relative urls
item.link = urlparse.urljoin(feedurl, item.link)
# feedburner # feedburner
feeds.NSMAP['feedburner'] = 'http://rssnamespace.org/feedburner/ext/1.0' feeds.NSMAP['feedburner'] = 'http://rssnamespace.org/feedburner/ext/1.0'
match = item.xval('feedburner:origLink') match = item.xval('feedburner:origLink')
@ -295,9 +298,6 @@ def Fill(item, cache, feedurl='/', fast=False):
item.link = match[0] item.link = match[0]
log(item.link) log(item.link)
# check relative urls
item.link = urlparse.urljoin(feedurl, item.link)
# check unwanted uppercase title # check unwanted uppercase title
if len(item.title) > 20 and item.title.isupper(): if len(item.title) > 20 and item.title.isupper():
item.title = item.title.title() item.title = item.title.title()