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

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
.idea/
.idea
Downloads

8
.idea/.gitignore generated vendored
View File

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated
View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (pythonProject1)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated
View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pythonProject1.iml" filepath="$PROJECT_DIR$/.idea/pythonProject1.iml" />
</modules>
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -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)