Close handle when deleted

This commit is contained in:
2025-08-09 17:00:56 +02:00
parent 462d24ab5e
commit 68b6a505c1

View File

@ -26,6 +26,9 @@ class Scraper:
def __init__(self):
self._scraper: CloudScraper = CloudScraper()
def __del__(self):
self.close()
def _get(self, url: str, body: bool) -> bytes | Response:
while True:
res: Response = self._scraper.get(url)