Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[0.1.*] getHTML
#1
Code:
function getHTML(link, ...){
       local trying = 3, output = null;
       if(vargv.len()>0) trying = vargv[0];
       system(format("wget -t %d -O getHTML -a getHTMLLog %s -q -F", trying, link));
       local file = io.file("getHTML", "r");
       if(file.isOpen){
           output = file.read(io_type.ALL);
           file.close();
       }
       system("rm getHTML");
       return output;
}

local servers = getHTML("http://185.5.97.181:8000/master/public_servers/");

Simple script to download html code with any www. it using only wget for GNU/Linux. Published as curiosity.
Reply


Messages In This Thread
[0.1.*] getHTML - by Marcel - 23.05.2017, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)