[enh] ignoring empty request urls

This commit is contained in:
asciimoo 2013-11-04 21:06:53 +01:00
parent 64cc960f9f
commit 4cc391169a

View file

@ -130,6 +130,10 @@ def search(query, request, selected_engines):
req = grequests.post req = grequests.post
request_args['data'] = request_params['data'] request_args['data'] = request_params['data']
# ignoring empty urls
if not request_params['url']:
continue
requests.append(req(request_params['url'], **request_args)) requests.append(req(request_params['url'], **request_args))
grequests.map(requests) grequests.map(requests)
for engine_name,engine_results in results.items(): for engine_name,engine_results in results.items():