Browse Source

Mod: format

yemingfeng 2 months ago
parent
commit
1fbd2bcc66
6 changed files with 23 additions and 23 deletions
  1. 0 0
      js/pornhub.bundle.js
  2. 0 0
      js/tiktok.bundle.js
  3. 0 0
      js/xvideos.bundle.js
  4. 0 0
      js/youtube.bundle.js
  5. 12 12
      js/youtube/youtubev1.js
  6. 11 11
      js/youtube/youtubev2.js

File diff suppressed because it is too large
+ 0 - 0
js/pornhub.bundle.js


File diff suppressed because it is too large
+ 0 - 0
js/tiktok.bundle.js


File diff suppressed because it is too large
+ 0 - 0
js/xvideos.bundle.js


File diff suppressed because it is too large
+ 0 - 0
js/youtube.bundle.js


+ 12 - 12
js/youtube/youtubev1.js

@@ -179,12 +179,12 @@ detail = async (url, requestId, platform) => {
             const apiResp = await request('POST', apiUrl, JSON.stringify({
                 "context": {
                     "client": {
-                        "clientVersion": "19.29.37",
+                        "clientVersion": "19.50.40",
                         "androidSdkVersion": 30,
                         "clientName": "ANDROID",
                         "osName": "android",
                         "osVersion": "11",
-                        "userAgent": "com.google.android.youtube/19.29.37 (Linux; U; Android 11) gzip"
+                        "userAgent": "com.google.android.youtube/19.50.40 (Linux; U; Android 11) gzip"
                     }
                 },
                 "videoId": url.replace('https://www.youtube.com/watch?v=', ''),
@@ -196,8 +196,8 @@ detail = async (url, requestId, platform) => {
                 "params": "2AMB"
             }), {
                 'Origin': "https://www.youtube.com",
-                'X-YouTube-Client-Version': '19.29.37',
-                'User-Agent': 'com.google.android.youtube/19.29.37 (Linux; U; Android 11) gzip',
+                'X-YouTube-Client-Version': '19.50.40',
+                'User-Agent': 'com.google.android.youtube/19.50.40 (Linux; U; Android 11) gzip',
                 'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;
@@ -234,21 +234,21 @@ detail = async (url, requestId, platform) => {
                 "context": {
                     "client": {
                         "clientName": "IOS",
-                        "clientVersion": "19.29.1",
+                        "clientVersion": "19.47.7",
                         "deviceMake": "Apple",
                         "deviceModel": "iPhone16,2",
                         "hl": "en",
                         "osName": "iPhone",
                         "osVersion": "17.5.1.21F90",
                         "timeZone": "UTC",
-                        "userAgent": "com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)",
+                        "userAgent": "com.google.ios.youtube/19.47.7 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)",
                         "gl": "US",
                         "utcOffsetMinutes": 0
                     }
                 },
                 "videoId": url.replace('https://www.youtube.com/watch?v=', '')
             }), {
-                'User-Agent': 'com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)',
+                'User-Agent': 'com.google.ios.youtube/19.47.7 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)',
                 'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;
@@ -264,11 +264,11 @@ detail = async (url, requestId, platform) => {
             fallbackFormats = fallbackFormats.concat(currentFormats);
         } catch (e) {
             console.log(`can not found format android fallback api error: ${e}`);
-            const ret = {
-                "code": -1, "msg": e.toString()
-            }
-            console.log(`detail2 fallback result error: ${JSON.stringify(ret)}`);
-            return ret;
+            // const ret = {
+            //     "code": -1, "msg": e.toString(), "requestId": requestId
+            // }
+            // console.log(`detail2 fallback result error: ${JSON.stringify(ret)}`);
+            // return ret;
         }
 
         let audioUrl = ""

+ 11 - 11
js/youtube/youtubev2.js

@@ -162,12 +162,12 @@ detail = async (url, requestId, platform) => {
             const apiResp = await request('POST', apiUrl, JSON.stringify({
                 "context": {
                     "client": {
-                        "clientVersion": "19.29.37",
+                        "clientVersion": "19.50.40",
                         "androidSdkVersion": 30,
                         "clientName": "ANDROID",
                         "osName": "android",
                         "osVersion": "11",
-                        "userAgent": "com.google.android.youtube/19.29.37 (Linux; U; Android 11) gzip"
+                        "userAgent": "com.google.android.youtube/19.50.40 (Linux; U; Android 11) gzip"
                     }
                 },
                 "videoId": url.replace('https://www.youtube.com/watch?v=', ''),
@@ -179,8 +179,8 @@ detail = async (url, requestId, platform) => {
                 "params": "2AMB"
             }), {
                 'Origin': "https://www.youtube.com",
-                'X-YouTube-Client-Version': '19.29.37',
-                'User-Agent': 'com.google.android.youtube/19.29.37 (Linux; U; Android 11) gzip',
+                'X-YouTube-Client-Version': '19.50.40',
+                'User-Agent': 'com.google.android.youtube/19.50.40 (Linux; U; Android 11) gzip',
                 'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;
@@ -214,21 +214,21 @@ detail = async (url, requestId, platform) => {
                 "context": {
                     "client": {
                         "clientName": "IOS",
-                        "clientVersion": "19.29.1",
+                        "clientVersion": "19.47.7",
                         "deviceMake": "Apple",
                         "deviceModel": "iPhone16,2",
                         "hl": "en",
                         "osName": "iPhone",
                         "osVersion": "17.5.1.21F90",
                         "timeZone": "UTC",
-                        "userAgent": "com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)",
+                        "userAgent": "com.google.ios.youtube/19.47.7 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)",
                         "gl": "US",
                         "utcOffsetMinutes": 0
                     }
                 },
                 "videoId": url.replace('https://www.youtube.com/watch?v=', '')
             }), {
-                'User-Agent': 'com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)',
+                'User-Agent': 'com.google.ios.youtube/19.47.7 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)',
                 'Content-Type': 'application/json'
             }, requestId, platform);
             let {data: apiData, _} = apiResp;
@@ -244,10 +244,10 @@ detail = async (url, requestId, platform) => {
             fallbackFormats = fallbackFormats.concat(currentFormats);
         } catch (e) {
             console.log(`can not found format android fallback api error: ${e}`);
-            const ret = {
-                "code": -1, "msg": e.toString()
-            }
-            console.log(`detail2 fallback result error: ${JSON.stringify(ret)}`);
+            // const ret = {
+            //     "code": -1, "msg": e.toString()
+            // }
+            // console.log(`detail2 fallback result error: ${JSON.stringify(ret)}`);
             return ret;
         }
 

Some files were not shown because too many files changed in this diff