mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
Search: Fix torrent download with Python 3
This commit is contained in:
parent
fa30d7bd1c
commit
51b3a5164d
2 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue