-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find match for config_patterns for certain urls #742
Comments
Thank you for contributing to PyTube. Please remember to reference Contributing.md |
Hi, I spent an hour on it but found a solution, specially set up an account here to share it. |
Hi sirodus,
Could you please check if there is a typo or something in your comment if you were successful using the regex? |
Html source code: from video that works: <script >if (window.ytcsi) {window.ytcsi.tick("cfg", null, '');}</script> <script >var ytplayer = ytplayer || {};ytplayer.config = {"assets":{"css":"/s/player/134332d3/www-player-2x-webp.css","js":"/s/player/134332d3/player_ias.vflset/de_DE/base.js","player_canary_state":"none"},"attrs":{"id":"movie_player"},"args":{"innertube_api_version":"v1","gapi_hintparams":"m;//scs/abc-static/_/js/k=gapi.gapi.en.lqqPe8Y-aUs.O/d=1/ct=zgms/rs=AHpOoo_7ZBgzLryveB2qtYoSqeBQ4P-TYA/m=features","hl":"de_DE","show_miniplayer_button":"1","cos":"Windows","innertube_context_client_version":"2.20200910.05.00","user_display_image":"https://lh3.googleusercontent.com/a-/AOh14Gj6WnHLc1Z8PBIfU-video that does not work: <script >if (window.ytcsi) {window.ytcsi.tick("cfg", null, '');}</script> <script >var ytplayer = ytplayer || {};ytplayer.config = {"args":{"user_display_name":"PLURRED","watermark":",https://s.ytimg.com/yts/img/watermark/youtube_watermark-vflHX6b6E.png,https://s.ytimg.com/yts/img/watermark/youtube_hd_watermark-vflAzLcD6.png","loaderUrl":"https://www.youtube.com/watch?One of the links has a Watermark in it's source code. |
This is definitely correct. In your case, you may need to add other expression to the config_patterns list. Send me the link of the video you still have problems with after adding my fix. |
works for me |
I am sorry, but it is still the URL from my first message which is causing me issues. Now I realized that all the urls that are working for me are not YouTube Premium only, but available for everyone The one in the start post is indeed premium only (in Germany). I can also not access it from a private tab in my browser. As I can not find a way to provide my credentials to pytube, this might be a dead end for me. Thank you for your support! |
I modified the file "extract.py" in line 187 with the following (keep attention to open-close variables):
and works like a charm!!!. |
Thanks! it works. |
It worked for me, I was having trouble I don't know why, videos were online without restrictions or problems. It hade problems randomly but now is solved. Thank you so much |
Hi @lukas4haus I believe the most recent update to the repository should fix the issue with these videos (though it can't fix premium-only videos). If you want to test it out, you can install from the source with |
Hi,
I started using pyTube just recently and I am very happy with the functionality.
I am using it to download music tracks from YouTube Music.
In most of my tests, it worked great, but with some urls I catch an exception:
pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns
For example it occurs with this track: https://www.youtube.com/watch?v=hbFQARBbZww
I am neither good at regex, nor do I really understand what to search for in the analyzed html.
Do you maybe have a solution for this issue, or can you give me some hints about how to fix the issue myself?
Best regards,
Lukas
The text was updated successfully, but these errors were encountered: