抖音官方的接口地址:
https://www.iesdouyin.com/web/api/v2/user/info/?sec_uid=
尽提供触动格式写法,按键和触摸请自行改写。
require("TSLib")
ts = require("ts")
function query()
local json = ts.json
local file = appDataPath("com.ss.iphone.ugc.Aweme") .. "/Library/Preferences/" .. "com.ss.iphone.ugc.Aweme.plist"
local txt = readFileString(file)
local uid, sec
if txt then
local url = ""
local tab = {}
for str in string.gmatch(txt, "www.iesdouyin.com/share/user/[%?%w_=&-sec]+") do
if not string.match(str, "P$") then
url = str
break
end
end
if url == "" then
error("号错了")
end
uid, sec = string.match(url, "%d+"), string.match(url, "sec_uid=([%?%w_-]+)")
return uid, sec
end
error("号错了")
end
u, s = query()
dialog(u)
dialog(s)