使用 Scrapling 获取网页内容,返回纯文本或选择器结果。
pip install "scrapling[all]"
scrapling install
pip install httpx
python scripts/scrape_web.py --url "https://example.com"
python scripts/scrape_web.py --url "https://example.com" --selector "title::text"
python scripts/scrape_web.py --url "https://example.com" --out "output.txt"
共 1 个版本