terça-feira, outubro 09, 2012

WGET command

If you have a proxy you will need to start with this command

$ export http_proxy=http://100.1.1.1:8080

And then you just need to call the site

$ wget -O- http://www.google.pt

The result should be like this - getting all the HTML page:

--12:37:20--  http://www.google.pt/
Connecting to 100.1.1.1:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `STDOUT'
    [&lt;=&gt;                                                                                                                                      ] 0           --.-K/s             <html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><title>Google</title><script>window.google={kEI:"cAx0UKm4DvCX0QWshYGYBA",getEI:function(a){var b;while(a&&!(a.getAttribute&&(b=a.getAttribute("eid"))))a=a.parentNode;return b||google.kEI},https:function(){return window.location.protocol=="https:"},kEXPI:"17259,23628,32690,35704,39523,39978,4000116,4000354,4000553,4000624,4000648,4000743,4000833,4000955,4001001,4001013,4001064,4001132,4001145,4001188,4001192,4001267,4001293,4001441,4001449,4001461",kCSI:{e:"17259,23628,32690,35704,39523,39978,4000116,4000354,4000553,4000624,4000648,4000743,4000833,4000955,4001001,4001013,4001064,4001132,4001145,4001188,4001192,4001267,4001293,4001441,4001449,4001461",ei:"cAx0UKm4DvCX0QWshYGYBA"},authuser:0,
ml:function(){},kHL:"pt-PT",time:function(){return(new Date).getTime()},log:function(a,b,c,e){var d=new Image,h=google,i=h.lc,f=h.li,j="";d.onerror=(d.onload=(d.onabort=function(){delete i[f]}));i<

...

(google.stt!==undefined)google.kCSI.stt=google.stt;google.csiReport&&google.csiReport()}if(window.addEventListener)window.addEventListener("load",
l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());
})();
    [ <=>                                                                                                                                     ] 11,527      --.-K/s   in 0.001s
12:37:20 (20.6 MB/s) - `-' saved [11527]
</script></body></html>

Sem comentários: