Thunder Account Fetcher - fix1

From NAT, 6 Years ago, written in Bash, viewed 779 times. This paste is a reply to Thunder Account Fecther from NAT - view diff
URL https://code.nat.moe/view/29f11405 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2. # Fetch Thunder VIP accoun
  3.  
  4. FORUM_URL='http://www.521xunlei.com/forum-xunleihuiyuan-1.html'
  5. PREFIX='http://www.521xunlei.com/'
  6.  
  7. function showAcct {
  8.         curl $1 2> /dev/null | iconv -f gbk -t utf-8 | grep -E '爱密码|午夜共享' | grep br | awk -F"账号|密码|共享|分享" '{print $3,$4,$5}' | sed -e 's/首发/ /g; s/<br.*//g; s/<.*font.*//g; s/会更加.*\|迅雷\|登陆不上\|独家\|爱\|,.*//g; '
  9. }
  10.  
  11. function getAcctPage {
  12.         echo $PREFIX$(curl $FORUM_URL 2> /dev/null | iconv -f gbk -t utf-8 | grep "s xst" | head -n2 | tail -n1 | awk -F\" '{print $2}')
  13. }
  14.  
  15. [[ -z $1 ]] && showAcct $(getAcctPage) || showAcct $1

Reply to "Thunder Account Fetcher - fix1"

Here you can reply to the paste above

captcha