Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Imgur 418 > 500
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 15, 2024
1 parent b729d9f commit b62318d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.28"
__version__ = "5.2.29"
8 changes: 8 additions & 0 deletions cyberdrop_dl/managers/client_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ async def check_http_status(self, response: ClientResponse, download: bool = Fal
except ContentTypeError:
pass

if "imgur" in response.url.host.lower():
try:
JSON_Resp = await response.json()
if "status" in JSON_Resp:
raise ScrapeFailure(JSON_Resp['status'], JSON_Resp['data']['error'])
except ContentTypeError:
pass

try:
phrase = HTTPStatus(status).phrase
except ValueError:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
version = "5.2.28"
version = "5.2.29"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit b62318d

Please sign in to comment.