Error When Trying to Download a Stream
See original GitHub issue`/Users/admin/Developer/Python/venv/bin/python /Users/admin/Developer/Python/main.py Rick Astley - Never Gonna Give You Up (Official Music Video) 1195352717 Traceback (most recent call last): File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/main.py”, line 181, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/extract.py”, line 409, in apply_signature cipher = Cipher(js=js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 43, in init self.throttling_plan = get_throttling_plan(js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 405, in get_throttling_plan raw_code = get_throttling_function_code(js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 311, in get_throttling_function_code name = re.escape(get_throttling_function_name(js)) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 296, in get_throttling_function_name raise RegexMatchError( pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/Users/admin/Developer/Python/main.py”, line 7, in <module> video.streams.first().download() File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/main.py”, line 296, in streams return StreamQuery(self.fmt_streams) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/main.py”, line 188, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/extract.py”, line 409, in apply_signature cipher = Cipher(js=js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 43, in init self.throttling_plan = get_throttling_plan(js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 405, in get_throttling_plan raw_code = get_throttling_function_code(js) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 311, in get_throttling_function_code name = re.escape(get_throttling_function_name(js)) File “/Users/admin/Developer/Python/venv/lib/python3.10/site-packages/pytube/cipher.py”, line 296, in get_throttling_function_name raise RegexMatchError( pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple` latest python and pytube.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13
Top GitHub Comments
Change the
cipher.py
with the following code, works with v 12.0.0 for me,same