From c0c1277c5fa6090280442ec4d32e4194042d041d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 23 Mar 2022 21:48:38 +0100 Subject: [PATCH] [downloader:http] support sending POST data (#2433) by setting the '_http_data' metadata field for a file needed in addition to be3492776b4b7e90425a02e0b68ffa3dd05e3fd5 to download files with POST requests --- gallery_dl/downloader/http.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 86338f80..56224626 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -121,8 +121,13 @@ class HttpDownloader(DownloaderBase): try: response = self.session.request( kwdict.get("_http_method", "GET"), url, - stream=True, headers=headers, timeout=self.timeout, - verify=self.verify, proxies=self.proxies) + stream=True, + headers=headers, + data=kwdict.get("_http_data"), + timeout=self.timeout, + proxies=self.proxies, + verify=self.verify, + ) except (ConnectionError, Timeout) as exc: msg = str(exc) continue