【问题标题】:Checking a websites text with Lua?使用 Lua 检查网站文本?
【发布时间】:2013-12-25 19:54:13
【问题描述】:

我如何检查这是否有“真”的文字,如果有,它会运行一段代码? http://api.roblox.com/ownership/hasasset?assetId=26943368&userId=13416513

【问题讨论】:

    标签: lua


    【解决方案1】:

    使用luasocket.http.request 从您需要的 URL 中获取文本,然后将其与“true”进行比较。

    local http = require "socket.http"
    
    local text = http.request(url)
    if text == "true" then
      -- it's true!
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-31
      • 2011-07-12
      • 2011-06-26
      • 2011-02-06
      相关资源
      最近更新 更多