--Time:2020年9月18日 02:15:42-- by : MemoryChobits
-- QQ :1762272313
function GetMind(str,ks,over)
local strchar=string.find(str,ks)if(strchar>1) then
local bafter=string.find(str,over,strchar+string.len(ks))if(bafter>1) then
local Getdata=string.sub(str,strchar+string.len(ks),bafter-1)print(Getdata);returnGetData
end
end
return""
end
function GetTime()-- 獲取網頁的所有資料
local p={
url="http://www.time163.com/";}
res=httpGet(p);if res then
local time =GetMind(res.body,"<header>\n<time>","</time>")return time ;elseprint("獲取失敗")return nil ;
end
end
GetTime()