mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
Add language support
Allow the user to select a language. It must be written in english, and capitalized, ie : English, French, German, Hungarian... (reverted from commit 829948b85d
)
This commit is contained in:
parent
829948b85d
commit
2ea55b1c64
2 changed files with 4 additions and 13 deletions
|
@ -16,8 +16,6 @@ from lxml import html
|
|||
categories = ['videos']
|
||||
paging = True
|
||||
|
||||
language = ""
|
||||
|
||||
# search-url
|
||||
url = 'http://www.subtitleseeker.com/'
|
||||
search_url = url+'search/TITLES/{query}&p={pageno}'
|
||||
|
@ -43,10 +41,6 @@ def response(resp):
|
|||
for result in dom.xpath(results_xpath):
|
||||
link = result.xpath(".//a")[0]
|
||||
href = link.attrib.get('href')
|
||||
|
||||
if language is not "":
|
||||
href = href + language + "/"
|
||||
|
||||
title = escape(link.xpath(".//text()")[0])
|
||||
|
||||
content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue