aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-03-02 18:33:51 -0800
committerJesús <heckyel@hyperbola.info>2021-03-03 10:34:54 -0500
commit60a6ddc5efdbcad42894d2340f30dfe4dd63020a (patch)
treea4ee9f755628da9e3c70feea43570dc2f11f9a47
parentf7ed8159cd50a034bae0231cd61ebad6e3e2ceec (diff)
downloadyt-local-60a6ddc5efdbcad42894d2340f30dfe4dd63020a.tar.lz
yt-local-60a6ddc5efdbcad42894d2340f30dfe4dd63020a.tar.xz
yt-local-60a6ddc5efdbcad42894d2340f30dfe4dd63020a.zip
util.py: Fix data not being passed in requests
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r--youtube/util.py4
1 files changed, 2 insertions, 2 deletions
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()