Browse Source

Remove quotes from Download

master
Gregory Rudolph 3 years ago
parent
commit
bbe07dd525
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 2
      main.py

2
main.py

@ -51,7 +51,7 @@ def downloadGame(gameID, mediaID): @@ -51,7 +51,7 @@ def downloadGame(gameID, mediaID):
r = requests.get("https://download4.vimm.net/download/?mediaId=" + str(mediaID), headers=headers)
pprint(r)
h = r.headers['content-disposition']
saveLocation = '/home/anthonyo/Downloads/' + re.findall("filename=(.+)", h)[0]
saveLocation = './Downloads/' + re.findall("filename=\"(.+)\"", h)[0]
open(saveLocation, 'wb').write(r.content)
except requests.exceptions.RequestException as e:
print(e)

Loading…
Cancel
Save