false if torrent does not exist

This commit is contained in:
j 2009-07-15 18:21:20 +02:00
parent 09b8ec6b2c
commit 38e1b4ada6

View file

@ -12,6 +12,8 @@ def getData(id):
"url": getUrl(id) "url": getUrl(id)
} }
html = getUrlUnicode("%s%s" % (data["url"], "&filelist=1")) html = getUrlUnicode("%s%s" % (data["url"], "&filelist=1"))
if 'No torrent with ID' in html:
return False
data['added'] = stripTags(parseTable(html, 'Added')) data['added'] = stripTags(parseTable(html, 'Added'))
data['country'] = findRe(html, 'title="([\w ]*?)" border="0" width="32" height="20"') data['country'] = findRe(html, 'title="([\w ]*?)" border="0" width="32" height="20"')
# data['description'] = parseTable(html, 'Description') # data['description'] = parseTable(html, 'Description')