Created
December 11, 2019 03:49
-
-
Save tklam/5816b6c0fc07a36e53e1a1640f42cfd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A simple webpage snapshot tool | |
# Try to get a free proxy, and then wget a webpage via the proxy | |
for ((;;)) | |
do | |
wget https://free-proxy-list.net/anonymous-proxy.html -O proxy.html | |
proxy=$(grep '<td>[0-9\.]\+</td>' proxy.html | sed -e 's,.*<td>\([0-9\.]*\)</td><td>\([0-9]\+\)</td>.*,\1:\2,' | head -n 1) | |
#echo "proxy is $proxy" | |
wget --connect-timeout=1 -e use_proxy=yes -e http_proxy=$proxy -e https_proxy=$proxy <a URL of a webpage> | |
sleep 30 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment