mirror of
https://github.com/glomatico/gamdl.git
synced 2025-01-22 11:18:39 +00:00
chore: Refactor get_url_response_bytes method to handle HTTP errors
This commit is contained in:
parent
5990e5f722
commit
85c1fdbfbb
@ -382,7 +382,9 @@ class Downloader:
|
||||
@staticmethod
|
||||
@functools.lru_cache()
|
||||
def get_url_response_bytes(url: str) -> bytes:
|
||||
return requests.get(url).content
|
||||
response = requests.get(url)
|
||||
response.raise_for_status()
|
||||
return response.content
|
||||
|
||||
def apply_tags(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user