From be3492776b4b7e90425a02e0b68ffa3dd05e3fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 20 Mar 2022 10:09:05 +0100 Subject: [PATCH] [downloader:http] support using a different method than GET (#2433) by setting the '_http_method' metadata field for a file --- gallery_dl/downloader/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index b878f5f4..86338f80 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -120,9 +120,9 @@ class HttpDownloader(DownloaderBase): # connect to (remote) source try: response = self.session.request( - "GET", url, stream=True, headers=headers, - timeout=self.timeout, verify=self.verify, - proxies=self.proxies) + kwdict.get("_http_method", "GET"), url, + stream=True, headers=headers, timeout=self.timeout, + verify=self.verify, proxies=self.proxies) except (ConnectionError, Timeout) as exc: msg = str(exc) continue