steamuserimages subdir

This commit is contained in:
mwiegand 2022-06-01 19:48:31 +02:00
parent 20309b376b
commit a632b75b8f

View file

@ -153,7 +153,7 @@ def parse_trs(trs):
url = urlparse(url_string) url = urlparse(url_string)
if url.netloc.startswith('steamuserimages'): if url.netloc.startswith('steamuserimages'):
response = requests.get(url_string) response = requests.get(url_string)
with open(url.path.strip('/').replace('/', '_'), "wb") as f: with open('steamuserimages/' + url.path.strip('/').replace('/', '_'), "wb") as f:
f.write(response.content) f.write(response.content)
# get first page # get first page