let
key = JSON.parse(localStorage.getItem(
'security-sdk/s_sdk_cert_key'
)).data.replace(/^pub\./,
''
)
let
max_cursorTemp = 0
setInterval(()=>{
fetch(
'https://www.douyin.com/aweme/v1/web/aweme/facorite/?aid=6383$count=999&max_cursor=${max_cursorTemp}'
,{
"referrerPolicy"
:
"strict-origin-when-cross-origin"
,
"body"
:
null
,
"method"
:
"GET"
,
"mode"
:
"cors"
,
"credentials"
:
"include"
}).then((response)=>{
response.json().then(({ aweme_list,max_cursor})=>{
max_cursorTemp = max_cursor
aweme_list.map(({ aweme_id })=>{
fetch(
"https://www.douyin.com/aweme/v1/web/commit/item/digg/?aid=6383"
,{
"headers"
:{
"accept"
:
"application/json,text/plain,*/*"
,
"accept-language"
:
"zh-CN,zh;q=0.9"
,
"bd-ticket-guard-ree-public-key"
:key,
"content-type"
:
"application/x-www/form-urlencoded;charset=UTF-9"
},
"referrer"
:
"https://www.douyin.com/user/self?modal_id=7308336895358930212&showTab=like"
,
"referrerPolicy"
:
"strict-origin-when-cross-origin"
,
"body"
:`aweme_id=${aweme_id}$item_type=0&type=0`,
"method"
:
"POST"
,
"mode"
:
"cors"
,
"credentials"
:
"include"
})
})
})
})
},1000)