Bisix

freeproxylist_fullcolumn.sh

Jan 8th, 2021 (edited)
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. # USAGE: curl -s 'https://pastebin.com/raw/NNEvFPYY' | tr -d '\r' | bash
  2.  
  3. url='https://free-proxy-list.com/'
  4. i=1
  5.  
  6. while true; do
  7.     html=$(curl -s "$url")
  8.     tr -d '\r\n' <<<"$html" |
  9.         grep -Po -e '<table [^>]+proxy-list[^>]*>.*?</table>' |
  10.         grep -Po '<tr>.*?</tr>' |
  11.         grep -Fv '</th>' |
  12.         sed -E -e 's/<!--.*?-->//g' -e 's/\s*<\/t[dh]>\s*<t[dh][^>]*>\s*/|/g' -e 's/\s*<[^>]+>\s*//g'
  13.     last=${last:-$(grep -Po 'class="pager-item"[^/]+ data="\K\d+' <<<"$html" | tail -1)}
  14.     ((i >= last)) && break
  15.     url='https://free-proxy-list.com/?page='$((++i))'&port=&up_time=0'
  16. done
Add Comment
Please, Sign In to add comment