diff --git a/LunaTranslator/LunaTranslator/network/libcurl/requests.py b/LunaTranslator/LunaTranslator/network/libcurl/requests.py index c531fa6c..f1cd4835 100644 --- a/LunaTranslator/LunaTranslator/network/libcurl/requests.py +++ b/LunaTranslator/LunaTranslator/network/libcurl/requests.py @@ -178,7 +178,7 @@ class Session(Sessionbase): while True: _headerb=headerqueue.get() if _headerb is None: - break + self.raise_for_status() headerb+=_headerb if _headerb==b'\r\n': break diff --git a/LunaTranslator/LunaTranslator/network/requests_common.py b/LunaTranslator/LunaTranslator/network/requests_common.py index 8c559b72..8db027ce 100644 --- a/LunaTranslator/LunaTranslator/network/requests_common.py +++ b/LunaTranslator/LunaTranslator/network/requests_common.py @@ -103,7 +103,6 @@ class ResponseBase: if pending is not None: yield pending - print(size) class Sessionbase: def __init__(self) -> None: self.UA='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'