Cleanup and Download Fix #1

Merged
olmstea1 merged 4 commits from rudi/python-romscraper:master into master 2020-11-28 20:45:38 +00:00
8 changed files with 3 additions and 43 deletions
Showing only changes of commit 3237ab76de - Show all commits

View File

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