Files
OnebotCatalog/blog_mirror/一键抓取.bat

38 lines
969 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
cd /d "%~dp0"
echo ============================================
echo 网站镜像抓取脚本
echo 目标: http://171.80.3.206:39897/
echo ============================================
echo.
where python >nul 2>nul
if errorlevel 1 (
echo [错误] 没找到 python请先安装 Python 3.8+
pause
exit /b 1
)
echo [1/3] 检查依赖...
python -c "import requests, bs4" >nul 2>nul
if errorlevel 1 (
echo [1/3] 缺少依赖,正在安装 requests beautifulsoup4 ...
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests beautifulsoup4
) else (
echo [1/3] 依赖已就绪
)
echo.
echo [2/3] 开始抓取(会持续几分钟到几十分钟,请勿关闭窗口)...
echo.
python -u mirror.py http://171.80.3.206:39897/
echo.
echo [3/3] 完成!离线站点在 mirror 目录下:
echo %~dp0mirror\171.80.3.206_39897\
echo 入口文件:用浏览器打开上面的 index.html
echo.
pause