snipt

Ctrl+h for KB shortcuts

Bash

Download a local copy of a whole website

wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2" <FULL_HTTP_URL>
https://snipt.net/embed/3e47ca3f7da22c51faf9a1e951cd3e58/
/raw/3e47ca3f7da22c51faf9a1e951cd3e58/
3e47ca3f7da22c51faf9a1e951cd3e58
bash
Bash
1
2019-08-19T10:22:24
True
False
False
Apr 16, 2014 at 03:45 AM
/api/public/snipt/130426/
download-a-local-copy-of-a-whole-website
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U <span class="s2">&quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2&quot;</span> &lt;FULL_HTTP_URL&gt; </span></pre></div> </td></tr></table>
download, site, wget

Text only

wget spyder to crawl webpage

1
2
3
wget -e robots=off -r -l 50 --timeout=10 -t 2 --delete-after http://webpage.com/;

ab -c 10 -n 1000 http://webpage.com/;
https://snipt.net/embed/fcddabbd08955394db2b8f5be38c657c/
/raw/fcddabbd08955394db2b8f5be38c657c/
fcddabbd08955394db2b8f5be38c657c
text
Text only
3
2016-12-30T15:33:27
True
False
True
Apr 02, 2014 at 12:20 PM
/api/public/snipt/126791/
wget-spyder-to-crawl-webpage
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>wget -e robots=off -r -l 50 --timeout=10 -t 2 --delete-after http://webpage.com/; </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>ab -c 10 -n 1000 http://webpage.com/; </span></pre></div> </td></tr></table>
"ab test", crawl, spyder, wget

XML

wget Master Syntax

wget -e robots=off --no-cookies --wait=0 --limit-rate=20m --recursive --mirror -p -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" -A,htm,aspx,php,jsp,asp,zip,htaccess,cgi-bin,chm,rar,7z,png,css,js,json,gif,jpeg,jpg,bmp,txt,rar,7zip,exe,res,vb,jsp,swf,doc,config,xml,preferences,user,asmx,host,cache,cgi,sql,db,xhtml,log,inf,conf,config,htm,aspx,php,jsp,asp,zip,htaccess,cgi-bin,chm,rar,7z,png,css,js,json,gif,jpeg,jpg,bmp,txt,rar,7zip,exe,res,vb,jsp,swf,doc,config,xml,preferences,user,asmx,host,cache,cgi,sql,db,xhtml,tcl,bas,pas,p,r,inc,dpr,dpk,lpr,lpk,pm,cgi,pod,plx,ps,rb,rbw,scm,ss,smd,ps1,sql,tk,acp,properties,conf,styl,wsf,py,pyw,rc,rc2,rex,cls,script,xml,xls,xslt,mmpa,sti,bdsproj,xsd,rss,svg,wml,xul,xsd,axl,rdf,xaml,vcproj,dproj,plist,storyboard,msc,yml,yaml,bashrc,shadow,bash_profile,appdata,asm,aspx,tar,bz2,7zip,admin,password,user,java,class,jquery --no-check-certificate 
https://snipt.net/embed/63d6e97990f1cd1daf6b33caea0cf250/
/raw/63d6e97990f1cd1daf6b33caea0cf250/
63d6e97990f1cd1daf6b33caea0cf250
xml
XML
1
2019-08-19T16:15:43
True
False
False
Dec 04, 2013 at 03:05 PM
/api/public/snipt/95661/
wget-master-syntax
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>wget -e robots=off --no-cookies --wait=0 --limit-rate=20m --recursive --mirror -p -U &quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)&quot; -A,htm,aspx,php,jsp,asp,zip,htaccess,cgi-bin,chm,rar,7z,png,css,js,json,gif,jpeg,jpg,bmp,txt,rar,7zip,exe,res,vb,jsp,swf,doc,config,xml,preferences,user,asmx,host,cache,cgi,sql,db,xhtml,log,inf,conf,config,htm,aspx,php,jsp,asp,zip,htaccess,cgi-bin,chm,rar,7z,png,css,js,json,gif,jpeg,jpg,bmp,txt,rar,7zip,exe,res,vb,jsp,swf,doc,config,xml,preferences,user,asmx,host,cache,cgi,sql,db,xhtml,tcl,bas,pas,p,r,inc,dpr,dpk,lpr,lpk,pm,cgi,pod,plx,ps,rb,rbw,scm,ss,smd,ps1,sql,tk,acp,properties,conf,styl,wsf,py,pyw,rc,rc2,rex,cls,script,xml,xls,xslt,mmpa,sti,bdsproj,xsd,rss,svg,wml,xul,xsd,axl,rdf,xaml,vcproj,dproj,plist,storyboard,msc,yml,yaml,bashrc,shadow,bash_profile,appdata,asm,aspx,tar,bz2,7zip,admin,password,user,java,class,jquery --no-check-certificate </span></pre></div> </td></tr></table>
wget

Bash

Download all sounds from instantsfun.es

1
2
3
4
5
6
7
8
#!/bin/bash
#you need swftools and wget
wget -r -l 1 -nd -nc -A swf -e robots=off -P is http://www.instantsfun.es/instants/all
for i in $(ls is/*.swf); do 
	newname=$(echo $i|cut -f 1 -d . )
	swfextract $i -s 9 -o $newname.mp3;
done
rm is/*.swf
https://snipt.net/embed/887b192b9d1d7b033533edc95f4477ec/
/raw/887b192b9d1d7b033533edc95f4477ec/
887b192b9d1d7b033533edc95f4477ec
bash
Bash
8
2019-08-19T16:16:00
True
False
False
/api/public/snipt/27983/
download-all-sounds-from-instantsfunes
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="ch">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">#you need swftools and wget</span> </span><span id="L-3"><a name="L-3"></a>wget -r -l <span class="m">1</span> -nd -nc -A swf -e <span class="nv">robots</span><span class="o">=</span>off -P is http://www.instantsfun.es/instants/all </span><span id="L-4"><a name="L-4"></a><span class="k">for</span> i in <span class="k">$(</span>ls is/*.swf<span class="k">)</span><span class="p">;</span> <span class="k">do</span> </span><span id="L-5"><a name="L-5"></a> <span class="nv">newname</span><span class="o">=</span><span class="k">$(</span><span class="nb">echo</span> <span class="nv">$i</span><span class="p">|</span>cut -f <span class="m">1</span> -d . <span class="k">)</span> </span><span id="L-6"><a name="L-6"></a> swfextract <span class="nv">$i</span> -s <span class="m">9</span> -o <span class="nv">$newname</span>.mp3<span class="p">;</span> </span><span id="L-7"><a name="L-7"></a><span class="k">done</span> </span><span id="L-8"><a name="L-8"></a>rm is/*.swf </span></pre></div> </td></tr></table>
bash, instantsfun, wget

Batchfile

Update wallpaper

1
2
3
4
5
6
7
8
@echo off
set file=WorldLiveMap.jpg
set url=http://webcams.barthelet.eu
set destdir=C:\Users\Public\Pictures
:: get livemap
wget %url%/%file% --quiet --tries=3 --timeout=30 --timestamping --output-document="%destdir%\%file%"
:: change wallpaper
update-desktop %destdir%\%file%
https://snipt.net/embed/02ebd7db2a6c50cb8975b062d86c57ed/
/raw/02ebd7db2a6c50cb8975b062d86c57ed/
02ebd7db2a6c50cb8975b062d86c57ed
bat
Batchfile
8
2019-08-19T16:16:23
True
False
False
/api/public/snipt/21982/
update-wallpaper
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">@</span><span class="k">echo</span> off </span><span id="L-2"><a name="L-2"></a><span class="k">set</span> <span class="nv">file</span><span class="p">=</span>WorldLiveMap.jpg </span><span id="L-3"><a name="L-3"></a><span class="k">set</span> <span class="nv">url</span><span class="p">=</span>http://webcams.barthelet.eu </span><span id="L-4"><a name="L-4"></a><span class="k">set</span> <span class="nv">destdir</span><span class="p">=</span>C:\Users\Public\Pictures </span><span id="L-5"><a name="L-5"></a><span class="p">:</span><span class="c1">: get livemap</span> </span><span id="L-6"><a name="L-6"></a>wget <span class="nv">%url%</span>/<span class="nv">%file%</span> --quiet --tries=3 --timeout=30 --timestamping --output-document=<span class="s2">&quot;</span><span class="nv">%destdir%</span><span class="s2">\</span><span class="nv">%file%</span><span class="s2">&quot;</span> </span><span id="L-7"><a name="L-7"></a><span class="p">:</span><span class="c1">: change wallpaper</span> </span><span id="L-8"><a name="L-8"></a>update-desktop <span class="nv">%destdir%</span>\<span class="nv">%file%</span> </span></pre></div> </td></tr></table>
batch, wget, windows