Ben 8 months ago
parent
commit
99a0e6143d
1 changed files with 4 additions and 18 deletions
  1. 4 18
      js/youtube/youtubev1.js

+ 4 - 18
js/youtube/youtubev1.js

@@ -176,33 +176,19 @@ detail = async (url, requestId, platform) => {
         let originFormats = [];
         let originVideoDetails = undefined;
         try {
-            const apiUrl = `https://music.youtube.com/youtubei/v1/player?key=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w`;
+            const apiUrl = `https://music.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8`;
             const apiResp = await request('POST', apiUrl, JSON.stringify({
                 "context": {
                     "client": {
-                        "clientName": "ANDROID",
-                        "clientVersion": "19.09.37",
-                        "androidSdkVersion": 30,
-                        "userAgent": "com.google.android.youtube/19.09.37 (Linux; U; Android 11) gzip",
-                        "hl": "en",
-                        "timeZone": "UTC",
-                        "utcOffsetMinutes": 0
+                        "clientName": "ANDROID", "hl": "en", "clientVersion": "18.49.37", "gl": "US"
                     }
-                },
-                "params": "CgIIAQ==",
-                "playbackContext": {
-                    "contentPlaybackContext": {
-                        "html5Preference": "HTML5_PREF_WANTS"
-                    }
-                },
-                "contentCheckOk": true,
-                "videoId": url.replace('https://www.youtube.com/watch?v=', '')
+                }, "videoId": url.replace('https://www.youtube.com/watch?v=', ''), "params": "CgIQBg"
             }), {
                 'Host': 'www.youtube.com',
                 'Connection': 'keep-alive',
                 'User-Agent': 'com.google.android.apps.youtube.music/17.31.35 (Linux; U; Android 11) gzip',
                 'Accept-Language': 'en-US,en',
-                // 'Cookie': parseSetCookie(htmlHeaders),
+                'Cookie': parseSetCookie(htmlHeaders),
                 'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;