@@ -0,0 +1,64 @@
1+## Subtitleseeker (Video)
3+# @website http://www.subtitleseeker.com
8+# @stable no (HTML can change)
9+# @parse url, title, content
11+from cgi import escape
12+from urllib import quote_plus
15+# engine dependent config
16+categories = ['videos']
21+url = 'http://www.subtitleseeker.com/'
22+search_url = url+'search/TITLES/{query}&p={pageno}'
24+# specific xpath variables
25+results_xpath = '//div[@class="boxRows"]'
29+def request(query, params):
30+ params['url'] = search_url.format(query=quote_plus(query),
31+ pageno=params['pageno'])
35+# get response from search-request
39+ dom = html.fromstring(resp.text)
42+ for result in dom.xpath(results_xpath):
43+ link = result.xpath(".//a")[0]
44+ href = link.attrib.get('href')
46+ if language is not "":
47+ href = href + language + "/"
49+ title = escape(link.xpath(".//text()")[0])
51+ content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
52+ content = content + " - "
53+ content = content + html.tostring(result.xpath('.//div[contains(@class,"grey-web")]')[0], method='text')
55+ if result.xpath(".//span") != []:
56+ content = content + " - (" + result.xpath(".//span//text()")[0].strip() + ")"
59+ results.append({'url': href,
61+ 'content': escape(content)})