mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
fix: robot fw, entry points, some flake8, package searx egg
This commit is contained in:
@@ -8,9 +8,11 @@ locale = 'en_US'
|
||||
# see http://www.dailymotion.com/doc/api/obj-video.html
|
||||
search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=25&page=1&{query}'
|
||||
|
||||
|
||||
def request(query, params):
|
||||
global search_url
|
||||
params['url'] = search_url.format(query=urlencode({'search': query, 'localization': locale }))
|
||||
params['url'] = search_url.format(
|
||||
query=urlencode({'search': query, 'localization': locale}))
|
||||
return params
|
||||
|
||||
|
||||
@@ -32,6 +34,7 @@ def response(resp):
|
||||
results.append({'url': url, 'title': title, 'content': content})
|
||||
return results
|
||||
|
||||
|
||||
def text_content_from_html(html_string):
|
||||
desc_html = html.fragment_fromstring(html_string, create_parent=True)
|
||||
return desc_html.text_content()
|
||||
|
||||
Reference in New Issue
Block a user