Skip to content

Commit 5262c5a

Browse files
Update
1 parent caab241 commit 5262c5a

File tree

4 files changed

+224
-702
lines changed

4 files changed

+224
-702
lines changed

TS_USER_AGENTS.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,8 @@ function get(url, prarms, headers) {
515515
headers: headers
516516
})
517517
.then(function (res) {
518-
if (typeof res.data === 'string' && res.data.match(/^jsonpCBK/)) {
519-
return JSON.parse(res.data.match(/jsonpCBK.?\(([\w\W]*)\);/)[1]);
518+
if (typeof res.data === 'string' && res.data.includes('jsonpCBK')) {
519+
return JSON.parse(res.data.match(/jsonpCBK.?\(([\w\W]*)\);?/)[1]);
520520
}
521521
else {
522522
return res.data;

TS_USER_AGENTS.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ function get(url: string, prarms?: string, headers?: any) {
346346
headers: headers
347347
})
348348
.then(res => {
349-
if (typeof res.data === 'string' && res.data.match(/^jsonpCBK/)) {
350-
return JSON.parse(res.data.match(/jsonpCBK.?\(([\w\W]*)\);/)[1])
349+
if (typeof res.data === 'string' && res.data.includes('jsonpCBK')) {
350+
return JSON.parse(res.data.match(/jsonpCBK.?\(([\w\W]*)\);?/)[1])
351351
} else {
352352
return res.data
353353
}

0 commit comments

Comments
 (0)