Revert to using random UA in Reddit search engine

This commit is contained in:
Kirill Isakov 2016-04-13 22:06:00 +06:00
parent d0001f10e6
commit d54e82dfb9
2 changed files with 0 additions and 6 deletions

View file

@ -15,7 +15,6 @@ from cgi import escape
from urllib import urlencode
from urlparse import urlparse
from datetime import datetime
from searx.utils import searx_useragent
# engine dependent config
categories = ['general', 'images', 'news', 'social media']
@ -31,9 +30,6 @@ def request(query, params):
'limit': page_size})
params['url'] = search_url.format(query=query)
# using searx User-Agent
params['headers']['User-Agent'] = searx_useragent()
return params

View file

@ -3,7 +3,6 @@ import mock
from searx.engines import reddit
from searx.testing import SearxTestCase
from datetime import datetime
from searx.utils import searx_useragent
class TestRedditEngine(SearxTestCase):
@ -15,7 +14,6 @@ class TestRedditEngine(SearxTestCase):
self.assertTrue('url' in params)
self.assertTrue(query in params['url'])
self.assertTrue('reddit.com' in params['url'])
self.assertEqual(params['headers']['User-Agent'], searx_useragent())
def test_response(self):
resp = mock.Mock(text='{}')