|
@@ -85,9 +85,9 @@ parseSetCookie = (headers) => {
|
|
}
|
|
}
|
|
|
|
|
|
request = async (method, url, data = null, headers = {}, platform) => {
|
|
request = async (method, url, data = null, headers = {}, platform) => {
|
|
- if (platform === "WEB") {
|
|
|
|
- url = url.replace("https://www.youtube.com", "http://127.0.0.1");
|
|
|
|
- }
|
|
|
|
|
|
+ // if (platform === "WEB") {
|
|
|
|
+ // url = url.replace("https://www.youtube.com", "http://127.0.0.1");
|
|
|
|
+ // }
|
|
console.log(`request url:${url}`)
|
|
console.log(`request url:${url}`)
|
|
console.log(`request data:${data}`)
|
|
console.log(`request data:${data}`)
|
|
console.log(`request method:${method}`)
|
|
console.log(`request method:${method}`)
|
|
@@ -140,6 +140,9 @@ findFunction = (jsCode, regexp, platform) => {
|
|
if (existDependencies.includes(varName)) {
|
|
if (existDependencies.includes(varName)) {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
+ if (!/^[$A-Z]+$/.test(varName)) {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
const varNameMatch = jsCode.match(new RegExp(`var \\${varName}={(.|\\n)*?};`), 'ig');
|
|
const varNameMatch = jsCode.match(new RegExp(`var \\${varName}={(.|\\n)*?};`), 'ig');
|
|
if (varNameMatch && varNameMatch.length >= 1) {
|
|
if (varNameMatch && varNameMatch.length >= 1) {
|
|
result += varNameMatch[0] + "\n";
|
|
result += varNameMatch[0] + "\n";
|