diff --git a/source/standalone/getraw.bat b/source/standalone/getraw.bat index b48a8f2..517970e 100644 --- a/source/standalone/getraw.bat +++ b/source/standalone/getraw.bat @@ -1,10 +1,17 @@ @echo off +set Proxy=http://proxy.example.com:8888 +set Host=203.119.244.126 +set Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko set /p T=Type: set /p L=List: if not exist "%L%" exit if not exist "%T%" mkdir "%T%" for /f %%I in (%L%) do ( +if not exist %T%\%%I.html ( echo Get %T% %%I -curl -x http://proxy.example.com:8888 -A "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" -m 20 --retry 2 https://www.xiami.com/%T%/%%I >%T%\%%I.html +curl -x "%Proxy%" -m 20 --retry 2 -A "%Agent%" -H "Host:www.xiami.com" -k https://%Host%/%T%/%%I >%T%\%%I.html +) else ( +echo Found %T% %%I +) ) pause diff --git a/source/standalone/media.bat b/source/standalone/media.bat index ee183e9..a360b6b 100644 --- a/source/standalone/media.bat +++ b/source/standalone/media.bat @@ -1,4 +1,5 @@ @echo off +set Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko set /p L=List: if not exist "%L%" exit for /f "tokens=1,2 delims= " %%E in (%L%) do ( @@ -6,7 +7,9 @@ if not exist media\%%F ( echo Get %%E mkdir media\%%F rmdir media\%%F -curl -A "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" -m 10 --retry 2 https:%%E >media\%%F +curl -m 10 --retry 2 -A "%Agent%" https:%%E >media\%%F +) else ( +echo Found %%F ) ) pause diff --git a/source/standalone/retry.bat b/source/standalone/retry.bat index 8084a96..ec5f671 100644 --- a/source/standalone/retry.bat +++ b/source/standalone/retry.bat @@ -1,10 +1,13 @@ @echo off +set Proxy=http://proxy.example.com:8888 +set Host=203.119.244.126 +set Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko set /p T=Type: if not exist "%T%" exit for %%F in (%T%\*.html) do ( if %%~zF lss 30720 ( echo Retry %T% %%~nF -curl -x http://proxy.example.com:8888 -A "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" -m 20 --retry 3 https://www.xiami.com/%T%/%%~nF >%%F +curl -x "%Proxy%" -m 20 --retry 3 -A "%Agent%" -H "Host:www.xiami.com" -k https://%Host%/%T%/%%~nF >%%F ) ) pause