Advertisement
Guest User

Untitled

a guest
Nov 25th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. pi@icebreaker:/storage/trle $ cat get.sh
  2. #!/bin/bash
  3.  
  4. get_game(){
  5.     lid="$1"
  6.     base_url='https://www.trle.net/sc/levelfeatures.php?lid='
  7.     curl -s -k "$base_url$lid" | grep 'TR[12345]</td>' | grep -o 'TR[12345]'
  8. }
  9.  
  10. first_id=1
  11. last_id=3428
  12.  
  13. for i in $(seq $first_id $last_id); do
  14.     out_dir=$(get_game $i)
  15.     wget --continue --content-disposition --no-check-certificate -P $out_dir "https://www.trle.net/scadm/trle_dl.php?lid=$i"
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement