Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # USAGE: curl -s 'https://pastebin.com/raw/NNEvFPYY' | tr -d '\r' | bash
- url='https://free-proxy-list.com/'
- i=1
- while true; do
- html=$(curl -s "$url")
- tr -d '\r\n' <<<"$html" |
- grep -Po -e '<table [^>]+proxy-list[^>]*>.*?</table>' |
- grep -Po '<tr>.*?</tr>' |
- grep -Fv '</th>' |
- sed -E -e 's/<!--.*?-->//g' -e 's/\s*<\/t[dh]>\s*<t[dh][^>]*>\s*/|/g' -e 's/\s*<[^>]+>\s*//g'
- last=${last:-$(grep -Po 'class="pager-item"[^/]+ data="\K\d+' <<<"$html" | tail -1)}
- ((i >= last)) && break
- url='https://free-proxy-list.com/?page='$((++i))'&port=&up_time=0'
- done
Add Comment
Please, Sign In to add comment