@@ -1,62 +0,0 @@
4− @website http://www.general-files.org
5− @provide-api no (nothing found)
7− @using-api no (because nothing found)
8− @results HTML (using search portal)
9− @stable no (HTML can change)
10− @parse url, title, content
12− @todo detect torrents?
17−# engine dependent config
18−categories = ['files']
22−base_url = 'http://www.general-file.com'
23−search_url = base_url + '/files-{letter}/{query}/{pageno}'
25−# specific xpath variables
26−result_xpath = '//table[@class="block-file"]'
27−title_xpath = './/h2/a//text()'
28−url_xpath = './/h2/a/@href'
29−content_xpath = './/p//text()'
33−def request(query, params):
35− params['url'] = search_url.format(query=query,
37− pageno=params['pageno'])
42−# get response from search-request
46− dom = html.fromstring(resp.text)
49− for result in dom.xpath(result_xpath):
50− url = result.xpath(url_xpath)[0]
52− # skip fast download links
53− if not url.startswith('/'):
57− results.append({'url': base_url + url,
58− 'title': ''.join(result.xpath(title_xpath)),
59− 'content': ''.join(result.xpath(content_xpath))})