question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

could not find match for config_patterns, setconfig_patterns

See original GitHub issue

Here is my code :

from pytube import YouTube
l = "https://www.youtube.com/watch?v=ixZDTiXiHsc"
yt = YouTube(l)

I get this error, I tried other videos, some works, but some doesn’t and have the same error

Traceback (most recent call last):
  File "test.py", line 32, in <module>
    yt = YouTube(link)
  File "/usr/lib/python3.8/site-packages/pytube/__main__.py", line 102, in __init__
    self.prefetch()
  File "/usr/lib/python3.8/site-packages/pytube/__main__.py", line 194, in prefetch
    self.js_url = extract.js_url(self.watch_html)
  File "/usr/lib/python3.8/site-packages/pytube/extract.py", line 180, in js_url
    base_js = get_ytplayer_config(html)['assets']['js']
  File "/usr/lib/python3.8/site-packages/pytube/extract.py", line 279, in get_ytplayer_config
    raise RegexMatchError(
pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns, setconfig_patterns

I tried with pytube, pytube3, pytube4 and pytubeX

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
AndrewMcKinneycommented, Dec 10, 2020

@AndrewMcKinney you’re likely running an old version of pytube. If you run print(pytube.__version__) and it does not display 10.1.0, you are running an outdate version. Version 10.1.0 has not yet been published on pypi, and needs to be installed from source with the command python -m pip install git+https://github.com/nficano/pytube

I see, thank you so much

1reaction
tfdahlincommented, Nov 21, 2020

Just following up on this real quick – this problem should be fixed in the latest version of pytube.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytube error - get_ytplayer_config: could not find match for ...
This error (RegexMatchError: get_ytplayer_config: could not find match for config_patterns) is due to Pytube known issue.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found