@@ -13,6 +13,7 @@ from cgi import escape
13from urllib import quote
13from urllib import quote
14from lxml import html
14from lxml import html
15from operator import itemgetter
15from operator import itemgetter
16+from dateutil import parser
17# engine dependent config
18# engine dependent config
18categories = ['videos', 'music', 'files']
19categories = ['videos', 'music', 'files']
@@ -52,7 +53,7 @@ def response(resp):
52 link = result.xpath('.//a[@class="cellMainLink"]')[0]
53 link = result.xpath('.//a[@class="cellMainLink"]')[0]
53 href = urljoin(url, link.attrib['href'])
54 href = urljoin(url, link.attrib['href'])
54 title = ' '.join(link.xpath('.//text()'))
55 title = ' '.join(link.xpath('.//text()'))
55− #content = escape(' '.join(result.xpath(content_xpath)))
56+ content = escape(html.tostring(result.xpath('.//span[@class="font11px lightgrey block"]')[0], method="text"))
56 seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
57 seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
57 leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
58 leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
@@ -73,7 +74,7 @@ def response(resp):
73 # append result
74 # append result
74 results.append({'url': href,
75 results.append({'url': href,
75 'title': title,
76 'title': title,
76− 'content': '',
77+ 'content': content,
77 'seed': seed,
78 'seed': seed,
78 'leech': leech,
79 'leech': leech,
79 'magnetlink': magnetlink,
80 'magnetlink': magnetlink,