feedify: don't insert useless url when none is found

master
pictuga 2015-04-06 22:15:59 +08:00
parent dbc92068f0
commit c41c0761b6
1 changed files with 3 additions and 2 deletions

View File

@ -191,6 +191,7 @@ class Builder(object):
feed_item['title'] = self.string(item, 'item_title') feed_item['title'] = self.string(item, 'item_title')
if 'item_link' in self.rule: if 'item_link' in self.rule:
url = self.string(item, 'item_link') url = self.string(item, 'item_link')
if url:
url = urljoin(self.link, url) url = urljoin(self.link, url)
feed_item['link'] = url feed_item['link'] = url
if 'item_desc' in self.rule: if 'item_desc' in self.rule: