-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update batch files to continue downloading after the DNS stopped.
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
@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 ( | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |