Forgot to call .geturl() on urlparse object.

This commit is contained in:
Anton Hvornum 2020-11-29 21:26:39 +00:00
parent 5ec520f461
commit c4cfa26f59
1 changed files with 1 additions and 2 deletions

View File

@ -93,9 +93,8 @@ class Script():
if not self.converted_path:
self.converted_path = f"/tmp/{os.path.basename(self.profile).replace('.py', '')}_{hashlib.md5(os.urandom(12)).hexdigest()}.py"
print('Opening URL:', url)
with open(self.converted_path, "w") as temp_file:
temp_file.write(urllib.request.urlopen(url).read().decode('utf-8'))
temp_file.write(urllib.request.urlopen(url.geturl()).read().decode('utf-8'))
return self.converted_path
else: