Advertisement
Guest User

Work in progress - linux ffxiah scraper by Empathy.bismarck

a guest
Feb 7th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. ffxiah ()
  2. {
  3.     export server=$1;
  4.     export player=$2;
  5.     ( export FIELDS=$(curl -sL ffxiah.com/player/$server/$player |& grep -i player.sales | sed -e 's/,/\n/g' | awk -F\" '{print $2}' | sort -u |tail -n +2 | awk '{print "s/"$0"//g;"}'|tr -d '\n' ) && echo $FIELDS;
  6.     curl -sL ffxiah.com/player/$server/$player 2>&1 | grep --colour=auto -i player.sales | sed -e 's/"//g' -e 's/:/\t/g' -e 's/}/\n/g' | cut -d '{' -f 2 | while read line; do
  7.         printf "%s\n" "$line";
  8.     done | perl -ne 'while(<>){'$FIELDS';s/ u[[:alnum:]]+, //;s/\];.*$//g;print}' | perl -F/,/ -lane 'chomp(@F[1]);$d = @F[1];;my $saledate = `date -d "\@$d"`;printf("$saledate "."@F[0] "." @F[4] "." @F[6] "." @F[7] "." @F[9] ")' ) 2> /dev/null
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement