403 error when trying to download certain games
DeaeLunae opened this issue · 2 comments
In this case, this is the erroring game: https://melsonian-arts-council.itch.io/troika-numinous-edition/
It appears to throw a 403 specifically on trying to download the Discord link.
I have gotten around this by adding super basic error handling:
def download_url(url, output_path, desc):
with DownloadProgressBar(unit='B', unit_scale=True,
miniters=1, desc=desc) as t:
try:
urllib.request.urlretrieve(url, filename=output_path, reporthook=t.update_to)
except urllib.error.HTTPError as err:
print(f"\n{err.code} error while attempting to load {url}")
...but this is more a hackish workaround than a fix. I did try to fetch a redirect URL to test if a discord link, but for whatever reason, I can't do so due to the 403.
The link itself works fine in the browser. I'm not sure why urllib is having trouble with it.
This is the one game I've had this issue with, I think your fix may have to be used as I can't fathom why it doesn't work, as it works via the desktop client (where it uses the same API) I'll have an investigation if i have time, but otherwise it will just have to skip it
So this merge has created an error list, I'll close for now, as I don't think I'll work out why it's failing