diff --git a/src/searchengine/nova3/helpers.py b/src/searchengine/nova3/helpers.py index 60c4370e9..ef8376a28 100644 --- a/src/searchengine/nova3/helpers.py +++ b/src/searchengine/nova3/helpers.py @@ -1,4 +1,4 @@ -#VERSION: 1.48 +#VERSION: 1.49 # Author: # Christophe DUMEZ (chris@qbittorrent.org) @@ -89,10 +89,10 @@ def htmlentitydecode(s: str) -> str: return re.sub(r'&#x(\w+);', lambda x: chr(int(x.group(1), 16)), t) -def retrieve_url(url: str, custom_headers: Mapping[str, Any] = {}) -> str: +def retrieve_url(url: str, custom_headers: Mapping[str, Any] = {}, request_data: Optional[Any] = None) -> str: """ Return the content of the url page as a string """ - request = urllib.request.Request(url, headers={**headers, **custom_headers}) + request = urllib.request.Request(url, request_data, {**headers, **custom_headers}) try: response = urllib.request.urlopen(request) except urllib.error.URLError as errno: