Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set USER=me@domain.com
- set PWD=password
- call :login
- for /L %%y in (1990,1,2012) do for %%m in (01,02,03,04,05,06,07,09,10,11,12) do call :download %%y %%m
- for /L %%y in (2013,1,2016) do for %%m in (01,03,04,05,06,07,09,10,11,12) do call :download %%y %%m
- goto :eof
- :login
- wget --keep-session-cookies --cookies=on --save-cookies cookies_mag.txt -O login.htm --no-check-certificate --post-data "username=%USER%&password=%PWD%&remember=1" https://www.elektormagazine.fr/account/login
- goto :eof
- :download
- echo.
- echo ======================= %1 %2 ============================
- echo ======================= %1 %2 ============================
- echo ======================= %1 %2 ============================
- echo.
- if %2 EQU 12 call :login
- wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" -N -I *.pdf -e robots=off --no-check-certificate --load-cookies cookies_mag.txt -p https://www.elektormagazine.fr/files/magazine/%1/magazine/FR%1%2.pdf
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement