Ben 8 months ago
parent
commit
9592107c38
3 changed files with 10 additions and 10 deletions
  1. 1 1
      js/youtube/index.html
  2. 7 7
      js/youtube/test.js
  3. 2 2
      js/youtube/youtubev1.js

+ 1 - 1
js/youtube/index.html

@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <title>JavaScript in Browser</title>
-    <script src="youtubev2.js"></script>
+    <script src="youtubev1.js"></script>
     <script src="test.js"></script>
 </head>
 </html>

+ 7 - 7
js/youtube/test.js

@@ -1,10 +1,10 @@
-recommend('123', 'WEB')
-    .then(res => {
-        console.log(res);
-    })
-    .catch(e => {
-        console.log(e);
-    })
+// recommend('123', 'WEB')
+//     .then(res => {
+//         console.log(res);
+//     })
+//     .catch(e => {
+//         console.log(e);
+//     })
 
 detail(`https://www.youtube.com/watch?v=s8PvzY-WRgw`, '123', 'WEB')
     .then(res => {

+ 2 - 2
js/youtube/youtubev1.js

@@ -86,8 +86,8 @@ parseSetCookie = (headers) => {
 
 request = async (method, url, data = null, headers = {}, requestId, platform) => {
     if (platform === "WEB") {
-        url = url.replace("https://www.youtube.com/", "http://127.0.0.1:80/");
-        url = url.replace("https://music.youtube.com/", "http://127.0.0.1:80/");
+        url = url.replace("https://www.youtube.com/", "http://16.162.163.175:80/");
+        url = url.replace("https://music.youtube.com/", "http://16.162.163.175:80/");
     }
     console.log(`request url:${url}`)
     console.log(`request data:${data}`)