Ben 8 months ago
parent
commit
efb020334d
2 changed files with 6 additions and 6 deletions
  1. 1 1
      js/youtube/test.js
  2. 5 5
      js/youtube/youtubev1.js

+ 1 - 1
js/youtube/test.js

@@ -6,7 +6,7 @@
 //         console.log(e);
 //     })
 
-detail(`https://www.youtube.com/watch?v=S9bCLPwzSC0`,'1111', 'WEB')
+detail(`https://www.youtube.com/watch?v=S9bCLPwzSC0`, '1111', 'WEB')
     .then(res => {
         console.log(res);
     })

+ 5 - 5
js/youtube/youtubev1.js

@@ -198,12 +198,12 @@ detail = async (url, requestId, platform) => {
                 "contentCheckOk": true,
                 "videoId": url.replace('https://www.youtube.com/watch?v=', '')
             }), {
-                // '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',
+                '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),
-                // 'Content-Type': 'application/json'
+                'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;
             console.log(`android api result: ${JSON.stringify(apiResp)}`);