diff --git a/src/searchengine/nova3/helpers.py b/src/searchengine/nova3/helpers.py index 18e7510e6..d3960dda0 100644 --- a/src/searchengine/nova3/helpers.py +++ b/src/searchengine/nova3/helpers.py @@ -77,7 +77,7 @@ def retrieve_url(url): def download_file(url, referer=None): """ Download file at url and write it to a file, return the path to the file and the url """ file, path = tempfile.mkstemp() - file = os.fdopen(file, "w") + file = os.fdopen(file, "wb") # Download url req = urllib.request.Request(url) if referer is not None: diff --git a/src/searchengine/nova3/nova2dl.py b/src/searchengine/nova3/nova2dl.py index b04974966..eb64c7e03 100755 --- a/src/searchengine/nova3/nova2dl.py +++ b/src/searchengine/nova3/nova2dl.py @@ -33,7 +33,7 @@ import sys import os import glob -from .helpers import download_file +from helpers import download_file supported_engines = dict() @@ -61,4 +61,4 @@ if __name__ == '__main__': engine.download_torrent(download_param) else: print(download_file(download_param)) - sys.exit(0) \ No newline at end of file + sys.exit(0)