Skip to content

Commit

Permalink
util.py: Fix data not being passed in requests
Browse files Browse the repository at this point in the history
  • Loading branch information
user234683 committed Mar 3, 2021
1 parent 2f6047d commit fe05aed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,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())
Expand All @@ -269,7 +269,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()
Expand Down

0 comments on commit fe05aed

Please sign in to comment.