summaryrefslogtreecommitdiff
path: root/searx/engines/youtube_noapi.py
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2016-12-11 16:41:14 +0100
committerNoémi Ványi <sitbackandwait@gmail.com>2016-12-11 16:58:31 +0100
commitb034356825420507c9fb7ee2dc100676a88cf6c7 (patch)
tree82f90b1e406ffda0276d2918b1b86c3589e50012 /searx/engines/youtube_noapi.py
parentc59c76e6ee14f0417ad55ecf0f888f62f34f1f6d (diff)
downloadsearxng-b034356825420507c9fb7ee2dc100676a88cf6c7.tar.gz
searxng-b034356825420507c9fb7ee2dc100676a88cf6c7.zip
add year filter to engines with time range support && tests
Following engines does not support "Last year": * Bing News * DeviantArt * DuckDuckGo * Yahoo * YouTube (noapi)
Diffstat (limited to 'searx/engines/youtube_noapi.py')
-rw-r--r--searx/engines/youtube_noapi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/youtube_noapi.py b/searx/engines/youtube_noapi.py
index b33594465..9b7ca64c8 100644
--- a/searx/engines/youtube_noapi.py
+++ b/searx/engines/youtube_noapi.py
@@ -25,7 +25,8 @@ search_url = base_url + '?search_query={query}&page={page}'
time_range_url = '&sp=EgII{time_range}%253D%253D'
time_range_dict = {'day': 'Ag',
'week': 'Aw',
- 'month': 'BA'}
+ 'month': 'BA',
+ 'year': 'BQ'}
embedded_url = '<iframe width="540" height="304" ' +\
'data-src="//www.youtube-nocookie.com/embed/{videoid}" ' +\