96 search_results = etree.XML(resp.content)
99 if len(search_results) == 0:
102 for entry
in search_results.xpath(
'./channel/item'):
103 title = entry.find(
"title").text
104 link = entry.find(
"guid").text
105 fullDescription = entry.find(
"description").text.split(
'<br>')
106 filesize = fullDescription[1]
107 filesizeParsed = re.split(
r"([A-Z]+)", filesize)
108 magnetlink = entry.find(
"link").text
109 pubDate = entry.find(
"pubDate").text
114 'magnetlink': magnetlink,
117 'filesize': get_torrent_size(filesizeParsed[0], filesizeParsed[1]),
118 'publishedDate': datetime.strptime(pubDate,
'%a,%d %b %Y %H:%M:%S %z'),
119 'template':
'torrent.html',