SHARE
TWEET

MassPriceCheck

KiteX3 Jan 13th, 2014 189 Never
  1. #!/bin/bash
  2.  
  3. curl -s 'http://magic.tcgplayer.com/magic_price_guides.asp' | grep -o '/db/price_guide.asp?setname=[a-zA-Z0-9'\''() ,.-]*' | sed 's/ /%20/g' | shuf > urlendings
  4. rm setnames ; touch setnames
  5.  
  6. for i in $(seq 1 $(wc -l urlendings | awk '{print $1}'))
  7. do
  8.         seturl="magic.tcgplayer.com$(head -n $i urlendings | tail -n 1)"
  9.         setname=$(head -n $i urlendings | tail -n 1 | grep -o 'setname=[0-9a-zA-Z'\''% ()-]*' | sed 's/^setname=//g' )
  10.         echo $setname >> setnames
  11.         wget -q "$seturl" -O junk/$setname
  12. done
  13.  
  14. for i in $(cat setnames)
  15. do
  16.         echo $(./PriceCheck -s junk/$i) $(echo $i | sed 's/%20/ /g')
  17. done
RAW Paste Data
Top