读取扒站历史记录

admin2021-01-15  102

import console; 
import web.rest.client;

var http = web.rest.client();

console.showLoading("数据读取中ing...")

var getToken = http.api("https://bazhan.me/list", "GET" ,`token\s*content\=\"(.+?)\"`)

http.addHeaders = {
    ["x-csrf-token"] = getToken();
}

var getUrl = http.api("https://bazhan.me/sites", "GET" ,function(ret){
    var ret, lst = ret + '\n', {};
	for k, v in string.gmatch( ret, "\n[\c|\w]?(.*?)\c.\s?(.*?)\c" ) 
		table.push(lst, {site = k; url = v})
	return lst; 
})

var lst = getUrl()
console.dumpJson( lst )
console.printf("总计读取数据:%s 条", #lst )

console.pause(true);
转载请注明原文地址: http://www.aardio.net/read-137.html
最新回复(0)