Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Add head request
Jules-WinnfieldX97d923229fea
diff --git a/cyberdrop_dl/clients/scraper_client.py b/cyberdrop_dl/clients/scraper_client.pyindex 256ffa5ae..cda4225f4 100644--- a/cyberdrop_dl/clients/scraper_client.py+++ b/cyberdrop_dl/clients/scraper_client.py@@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, Dict, Optionalfrom aiohttp import ClientSessionfrom bs4 import BeautifulSoup+from multidict import CIMultiDictProxyfrom yarl import URLfrom cyberdrop_dl.clients.errors import InvalidContentTypeFailure@@ -99,3 +100,10 @@ class ScraperClient:return json.loads(await response.content.read())else:return {}++ @limiter+ async def get_head(self, domain: str, url: URL, client_session: ClientSession) -> CIMultiDictProxy[str]:+ """Returns the headers from the given URL"""+ async with client_session.head(url, headers=self._headers, ssl=self.client_manager.ssl_context,+ proxy=self.client_manager.proxy) as response:+ return response.headers