Support for relative urls in feed

master
pictuga 2013-05-15 17:13:57 +02:00
parent d88719c87f
commit 222b1369e5
1 changed files with 4 additions and 0 deletions

View File

@ -340,6 +340,10 @@ def Fill(rss, cache, mode='feed'):
item.link = "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]])
log(item.link)
# check relative urls
if urlparse.urlparse(item.link).netloc is '':
item.link = urlparse.urljoin(feedurl, item.link)
# check cache and previous errors
if item.link in cache:
content = cache.get(item.link)