Skip to content
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

Error getting mssing player: This video is unavailable #221

Closed
MBCX opened this issue Nov 22, 2024 · 6 comments
Closed

Error getting mssing player: This video is unavailable #221

MBCX opened this issue Nov 22, 2024 · 6 comments

Comments

@MBCX
Copy link

MBCX commented Nov 22, 2024

In Youtube's war against all other ways of interacting with its service, youtube-local is now in the cross fire and this error appears in every video I try to watch, doesn't matter if you're using a VPN, or TOR, or neither.

image

If you reload enough times it will eventually get through, but this is still super annoying.

@MBCX
Copy link
Author

MBCX commented Nov 22, 2024

This commit #219 actually seems to fix the issue for me.

@dmbarrad
Copy link

Got the same issue, Still don't know how does the #219 helps?

@KongoBongo
Copy link

Yeah, this is still persistent and now it just full on doesn't work. You can spam refresh but it will still come up with the same error message.

@alive4ever
Copy link

Got the same issue, Still don't know how does the #219 helps?

The #219 pull request introduces mweb innertube client with n signature decryption to get working player inside the watch page and several more changes.

The simplest fix is by removing params from yt api request body and changing the client to ios. Here is how to do it from the master branch.

diff --git a/youtube/watch.py b/youtube/watch.py
index 8cddf1d..b08d29a 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -337,7 +337,6 @@ def _add_to_error(info, key, additional_message):
 def fetch_player_response(client, video_id):
     return util.call_youtube_api(client, 'player', {
         'videoId': video_id,
-        'params': 'CgIQBg',
     })
 
 def fetch_watch_page_info(video_id, playlist_id, index):
@@ -367,7 +366,7 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
         gevent.spawn(fetch_watch_page_info, video_id, playlist_id, index),
 
 
-        gevent.spawn(fetch_player_response, 'android-test-suite', video_id)
+        gevent.spawn(fetch_player_response, 'ios', video_id)
     )
     gevent.joinall(tasks)
     util.check_gevent_exceptions(*tasks)

@backspacedodge
Copy link

Have the same issue shown in OP's screenshot, does not matter how many times I refresh. As a solution, I've tried both #219 separately and the patch that alive4ever posted above on the main branch. Both work for now.

@ntnguyen1234
Copy link

ntnguyen1234 commented Nov 25, 2024

Btw, I think the current INNERTUBE_CONTEXT of ios doesn't allow 4K 60fps? When I try the config from yt-dlp, I can play 4K 60fps now (example link: https://www.youtube.com/watch?v=Mw1MWfilz_k)

https://github.com/yt-dlp/yt-dlp/blob/4b5eec0aaa7c02627f27a386591b735b90e681a8/yt_dlp/extractor/youtube.py#L198-L208

'INNERTUBE_CONTEXT': {
    'client': {
        'hl': 'en',
        'gl': 'US',
        'clientName': 'IOS',
        'clientVersion': '19.45.4',
        'deviceMake': 'Apple',
        'deviceModel': 'iPhone16,2',
        'userAgent': 'com.google.ios.youtube/19.45.4 (iPhone16,2; U; CPU iOS 18_1_0 like Mac OS X;)',
        'osName': 'iPhone',
        'osVersion': '18.1.0.22B83',
    }
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants