bing: fix rebates URLs

This commit is contained in:
Malloc Voidstar 2023-02-08 16:49:17 -08:00 committed by GitHub
parent 7320b0c796
commit eecd2d2308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,8 @@ def response(resp):
url_to_resolve.append(url.replace('&ntb=1', '&ntb=F'))
url_to_resolve_index.append(i)
url = None # remove the result if the HTTP Bing redirect raise an exception
elif url.startswith('/rebates/welcome?'):
url = parse_qs(urlparse(url).query)["url"][0]
# append result
results.append({'url': url, 'title': title, 'content': content})