diff options
Diffstat (limited to 'searx/engines/dailymotion.py')
-rw-r--r-- | searx/engines/dailymotion.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py index f8768ff53..7e0c922a9 100644 --- a/searx/engines/dailymotion.py +++ b/searx/engines/dailymotion.py @@ -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() |