@@ -0,0 +1,59 @@
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']
20+url = 'http://www.subtitleseeker.com/'
21+search_url = url+'search/TITLES/{query}&p={pageno}'
23+# specific xpath variables
24+results_xpath = '//div[@class="boxRows"]'
28+def request(query, params):
29+ params['url'] = search_url.format(query=quote_plus(query),
30+ pageno=params['pageno'])
34+# get response from search-request
38+ dom = html.fromstring(resp.text)
41+ for result in dom.xpath(results_xpath):
42+ link = result.xpath(".//a")[0]
43+ href = link.attrib.get('href')
44+ title = escape(link.xpath(".//text()")[0])
46+ content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
47+ content = content + " - "
48+ content = content + html.tostring(result.xpath('.//div[contains(@class,"grey-web")]')[0], method='text')
50+ if result.xpath(".//span") != []:
51+ content = content + " - (" + result.xpath(".//span//text()")[0].strip() + ")"
54+ results.append({'url': href,
56+ 'content': escape(content)})