Skip to content

Commit fe325d1

Browse files
committed
Fix worker
1 parent 27ed508 commit fe325d1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

vxtiktok-cf-worker-proxy/src/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function getWebDataFromResponse(response) {
4444

4545
function findApiFormat(videoInfo) {
4646
const vid = videoInfo.video
47-
const addr = (vid.downloadAddr == null || vid.downloadAddr == '') ? vid.downloadAddrAdr : vid.playAddr
47+
const addr = (vid.downloadAddr == null || vid.downloadAddr != '') ? vid.downloadAddrAdr : vid.playAddr
4848
return {
4949
width: vid.width,
5050
height: vid.height,
@@ -59,8 +59,7 @@ async function getVideoFromPostURL(url, includeCookies = false) {
5959
'User-Agent': 'Mozilla/5.0',
6060
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
6161
'Accept-Language': 'en-US,en;q=0.5',
62-
'Sec-Fetch-Mode': 'navigate',
63-
'Accept-Encoding': 'gzip, deflate, br'
62+
'Sec-Fetch-Mode': 'navigate'
6463
}
6564
})
6665
const videoInfo = await getWebDataFromResponse(response)
@@ -75,8 +74,6 @@ async function getVideoFromPostURL(url, includeCookies = false) {
7574
vdata.Cookies = vdata.Cookies.replace(/;\s*httponly/gi, '')
7675
vdata.Cookies = vdata.Cookies.replace(/, /g, '; ')
7776

78-
79-
console.log(vdata.Cookies)
8077
}
8178
return vdata
8279
}

0 commit comments

Comments
 (0)