-2
如何通过Lua脚本及其类库'socket.http'获取网页源代码(html)。 我想提取网页源代码中的部分代码。 谢谢。如何通过lua脚本获取网页源代码(html)
如何通过Lua脚本及其类库'socket.http'获取网页源代码(html)。 我想提取网页源代码中的部分代码。 谢谢。如何通过lua脚本获取网页源代码(html)
这包括在LuaSocket manual。
这将获取你现在正在阅读的页面的“源代码”:
local http = require 'socket.http'
local res, code, headers, status =
http.request 'http://stackoverflow.com/q/32907568/501459'
print(res)
感谢您的帮助。 – 3kanjbeen