mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-06-06 05:49:01 +08:00
24 lines
572 B
Batchfile
24 lines
572 B
Batchfile
@ECHO OFF
|
|
SETLOCAL
|
|
SET DOWNLOAD_RESOURCE_PY=download_resource.py
|
|
IF NOT EXIST %DOWNLOAD_RESOURCE_PY% (
|
|
SET DOWNLOAD_RESOURCE_PY=%CD%\download_resource.py
|
|
IF NOT EXIST %DOWNLOAD_RESOURCE_PY% (
|
|
IF DEFINED SCRIPTS_DIR (
|
|
SET DOWNLOAD_RESOURCE_PY=%SCRIPTS_DIR%\download_resource.py
|
|
)
|
|
)
|
|
)
|
|
IF NOT EXIST %DOWNLOAD_RESOURCE_PY% (
|
|
EXIT /B 1
|
|
)
|
|
python %DOWNLOAD_RESOURCE_PY% %*
|
|
IF ERRORLEVEL 2 (
|
|
python -m pip install --upgrade requests
|
|
python %DOWNLOAD_RESOURCE_PY% %*
|
|
)
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
EXIT /B %ERRORLEVEL%
|
|
)
|
|
ENDLOCAL
|