From d2e0cbafb265594a23389fe58b7889ff088560f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sun, 30 Oct 2016 20:26:38 +0100 Subject: [PATCH] add time range search for youtube noapi --- searx/engines/youtube_noapi.py | 7 +++++++ tests/unit/engines/test_youtube_noapi.py | 1 + 2 files changed, 8 insertions(+) diff --git a/searx/engines/youtube_noapi.py b/searx/engines/youtube_noapi.py index 401fca4c9..b33594465 100644 --- a/searx/engines/youtube_noapi.py +++ b/searx/engines/youtube_noapi.py @@ -17,10 +17,15 @@ from searx.utils import list_get categories = ['videos', 'music'] paging = True language_support = False +time_range_support = True # search-url base_url = 'https://www.youtube.com/results' 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'} embedded_url = '