Advertisement
Io-EE

downloading comics url batch script

Jan 31st, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.93 KB | None | 0 0
  1. @echo off
  2. GOTO:REM
  3. ==========================================
  4.  
  5. downloads all the html files of the comics from explosm until page 3450
  6. I have then to get the names of the images stored in the urls
  7. This is part 1 of the idea
  8.  
  9. Learned lots of interesting stuff with this:
  10. -how to increase a variable in batch
  11. -how to create an alternative kind of loop in batch
  12. -how to give variables to wget in batch
  13. -how to add text variables in batch
  14. -how to make comments in batch
  15. -how to rename a url or file with wget
  16.  
  17. The code may be dirty, never learned batch so idk.
  18. Would probably been way simpler with greasemonkey and javascript, best would have been chickenfoot with firefox 3.6
  19.  
  20. ==========================================
  21. :REM
  22. set a=http://explosm.net/comics/
  23. set b=/
  24.  
  25. set i=15
  26. set limit=3450
  27.  
  28. :loop
  29. set url=%a%%i%%b%
  30. wget -A jpg %url% --output-document="file"%i%".html"
  31. set /a i+=1
  32. if not %i%==%limit% goto loop
  33. pause > nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement