--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);
return GetData
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 ;
else
print("獲取失敗")
return nil ;
end
end
GetTime()
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/82123.html
標籤:其他
