From 60a6ddc5efdbcad42894d2340f30dfe4dd63020a Mon Sep 17 00:00:00 2001 From: James Taylor Date: Tue, 2 Mar 2021 18:33:51 -0800 Subject: util.py: Fix data not being passed in requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- youtube/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube') diff --git a/youtube/util.py b/youtube/util.py index f8c4be5..3d5d030 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -263,7 +263,7 @@ def fetch_url_response(url, headers=(), timeout=15, data=None, else: retries = urllib3.Retry(3) pool = get_pool(use_tor and settings.route_tor) - response = pool.request(method, url, headers=headers, + response = pool.request(method, url, headers=headers, body=data, timeout=timeout, preload_content=False, decode_content=False, retries=retries) cleanup_func = (lambda r: r.release_conn()) @@ -278,7 +278,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, start_time = time.monotonic() response, cleanup_func = fetch_url_response( - url, headers, timeout=timeout, + url, headers, timeout=timeout, data=data, cookiejar_send=cookiejar_send, cookiejar_receive=cookiejar_receive, use_tor=use_tor) response_time = time.monotonic() -- cgit v1.2.3