Advertisement
metalx1000

Get a list of Playstation ROM's URLs

Mar 11th, 2015
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4.  
  5. dots(){
  6.   while [ 1 ]
  7.   do
  8.     sleep 1
  9.     echo -n "."
  10.   done
  11. }
  12.  
  13. echo -n "Getting URLs of ROM pages."
  14. dots&
  15. dotid=$!
  16.  
  17. for i in {A..Z};
  18. do
  19.   wget -O- -q "http://www.freeroms.com/psx_roms_$i.htm"|\
  20.   grep "game_id.value"|\
  21.   sed 's/http/\nhttp/g'|\
  22.   grep "^http"|\
  23.   cut -d\" -f1|\
  24.   grep htm
  25. done > page.lst
  26.  
  27. echo ""
  28. echo "Creating ROM list."
  29. echo "This will take a while."
  30. cat page.lst|while read line;do
  31.   wget "$line" -O- -q|\
  32.   grep ".zip"|\
  33.   grep "product_download_url"|\
  34.   sed 's/http/\nhttp/g'|\
  35.   grep "freeroms"|\
  36.   cut -d\" -f1;
  37. done > rom.lst
  38.  
  39. echo ""
  40. echo "ROM list complete!"
  41. kill $dotid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement