From f5d3b215660c740e9bdda6071bd3d5dc980cc304 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sat, 2 May 2015 12:35:57 +0200 Subject: [PATCH 1/2] [fix] user agent : the "rv:{version}" was missing (can be a issue with some engine, like flickr) --- searx/utils.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/searx/utils.py b/searx/utils.py index e6c107e24..129971e31 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -17,17 +17,16 @@ from searx import logger logger = logger.getChild('utils') -ua_versions = ('31.0', - '32.0', - '33.0', +ua_versions = ('33.0', '34.0', - '35.0') + '35.0', + '36.0', + '37.0') ua_os = ('Windows NT 6.3; WOW64', 'X11; Linux x86_64', 'X11; Linux x86') - -ua = "Mozilla/5.0 ({os}) Gecko/20100101 Firefox/{version}" +ua = "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}" blocked_tags = ('script', 'style') From 6cd9a045f87bc5143d186d309bcd351b7f0bf5cf Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sat, 2 May 2015 12:36:49 +0200 Subject: [PATCH 2/2] [fix] flickr engine --- searx/engines/flickr_noapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py index 3a83fdc65..f24521e7f 100644 --- a/searx/engines/flickr_noapi.py +++ b/searx/engines/flickr_noapi.py @@ -20,8 +20,8 @@ logger = logger.getChild('flickr-noapi') categories = ['images'] -url = 'https://secure.flickr.com/' -search_url = url + 'search/?{query}&page={page}' +url = 'https://www.flickr.com/' +search_url = url + 'search?{query}&page={page}' photo_url = 'https://www.flickr.com/photos/{userid}/{photoid}' regex = re.compile(r"\"search-photos-models\",\"photos\":(.*}),\"totalItems\":", re.DOTALL) image_sizes = ('o', 'k', 'h', 'b', 'c', 'z', 'n', 'm', 't', 'q', 's')