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