36 dom = html.fromstring(resp.text)
37 search_res = dom.xpath(
'.//td[@class="x-item"]')
43 for result
in search_res:
44 url = urljoin(URL, result.xpath(
'.//a[@title]/@href')[0])
45 title = extract_text(result.xpath(
'.//a[@title]'))
46 content = extract_text(result.xpath(
'.//div[@class="files"]'))
47 files_data = extract_text(result.xpath(
'.//div[@class="tail"]')).split()
48 filesize = f
"{files_data[FILESIZE]} {files_data[FILESIZE_MULTIPLIER]}"
49 magnetlink = result.xpath(
'.//div[@class="tail"]//a[@class="title"]/@href')[0]
57 'magnetlink': magnetlink,
60 'template':
'torrent.html',