Downloading a video throws 'regex pattern ("signature",\s?([a-zA-Z0-9$]+)\() had zero matches'
See original GitHub issueStack trace:
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\__main__.py", line 87, in __init__
self.prefetch_init()
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\__main__.py", line 96, in prefetch_init
self.init()
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\__main__.py", line 131, in init
mixins.apply_signature(self.player_config_args, fmt, self.js)
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\mixins.py", line 41, in apply_signature
signature = cipher.get_signature(js, stream['s'])
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\cipher.py", line 245, in get_signature
tplan = get_transform_plan(js)
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\cipher.py", line 64, in get_transform_plan
name = re.escape(get_initial_function_name(js))
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\cipher.py", line 40, in get_initial_function_name
return regex_search(pattern, js, group=1)
File "C:\Users\maxi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytube\helpers.py", line 39, in regex_search
.format(pattern=pattern),
pytube.exceptions.RegexMatchError: regex pattern ("signature",\s?([a-zA-Z0-9$]+)\() had zero matches
I tried both on windows and ubuntu on different machines and this seems to be happening on most of the videos I try to download, e.g (https://www.youtube.com/watch?v=nFZP8zQ5kzk).
Any ideas what could be causing this?
EDIT: I just saw https://github.com/nficano/pytube/pull/313, which is already merged. Maybe youtube changed it’s signature again?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
pytube.exceptions.RegexMatchError: regex pattern ((?:v=|\/)([0 ...
regex pattern ("signature",\s?([a-zA-Z0-9$]+)\() had zero matches ... to get the title of the videos of a playlist without downloading them?
Read more >Pytube is giving assorted regex errors - python - Stack Overflow
I reworked your code, which throws no errors on my system. ... Enter a YouTube URL or press D to download the video(s): ......
Read more >Regular Expressions: Regexes in Python (Part 1)
In this tutorial, you'll explore regular expressions, also known as regexes, in Python. A regex is a special sequence of characters that defines...
Read more >4. Pattern Matching with Regular Expressions - Java ... - O'Reilly
Regular expressions, or regexes for short, provide a concise and precise specification of patterns to be matched in text. As another example of...
Read more >Regex.Match Method (System.Text.RegularExpressions)
Searches an input string for a substring that matches a regular ... You can determine whether the regular expression pattern has been found...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
let me take a look! thanks for reporting
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.