Jump to content
Sign in to follow this  
Dean

getHtml(url)

Recommended Posts

Dean    1
Dean

Eu estava dando uma olhada no tópico de postar no twitter do Mock, e fui dar uma estudada em LuaCurl, e fiz essa função de pegar o html de uma página.

 

Ficou meio inútil mas juntando com o mostrador de html já da até para começar um navegador.:coolface:

 

require("curl")

function getHtml(url)
        c = curl.easy_init()
        c:setopt(curl.OPT_URL,url)
        return c:perform()
end

 

Daí usa asism:

getHtml(io.read())

 

Eu testei no interpretador de lua em c++, então é só abrir digitar o site e dar enter.

Edited by Mickfern

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×