Skip to content
项目

关于

Bypass paywall sites — search, discover, and batch fetch articles as Markdown. 936 sites supported.

开发工具

这些数字如何统计

可以做什么

  • Full bypass coverage — Replicates all BPC extension strategies: custom User-Agent, Googlebot/Bingbot spoofing, referer manipulation, Playwright JS interception, archive.org fallback
  • Auto fallback chain — Each URL tries the optimal strategy, degrades gracefully until content is retrieved
  • Article discovery — Find recent articles via RSS, sitemap, or browser-rendered homepage
  • Cross-site crawl — Search + time filter + batch download in one command

实测星标增长

24小时
0
7天
+1
15天
+2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README_CN.md

原文

bpc-fetch logo

bpc-fetch

付费墙绕过 — 搜索, 发现, 批量抓取新闻文章为 Markdown

936 个站点 • 功能 • 安装 • 使用 • 致谢

LINUX DO Community


这是什么?

命令行工具, 覆盖全球 936 个付费新闻站点, 自动绕过 paywall 并将文章保存为 Markdown + 图片. 复用 Bypass Paywalls Clean 浏览器扩展的绕过逻辑, 无需安装浏览器扩展即可运行.

支持站点

936 个站点, 覆盖 40+ 国家/地区:

类别 代表站点
财经商业 The Economist, Financial Times, Bloomberg, WSJ, Reuters, Forbes, Business Insider
美国新闻 New York Times, Washington Post, LA Times, Chicago Tribune, Politico
英欧新闻 The Telegraph, The Times, Der Spiegel, Le Monde, El País
科技科学 Wired, The Atlantic, Nature, Science, Scientific American, MIT Tech Review
杂志 The New Yorker, Vanity Fair, Vogue, National Geographic, Esquire
德语区 76 站 (FAZ, Handelsblatt, Süddeutsche Zeitung...)
法语区 69 站 (Le Figaro, Libération, Les Echos...)
其他 荷兰 30, 意大利 28, 西班牙 26, 比利时 22, 澳大利亚 39...

运行 bpc-fetch sites 查看完整列表.

功能特点

  • 全策略覆盖 — 复用 BPC 扩展全部绕过逻辑: 自定义 UA, Googlebot 伪装, Referer 伪装, Playwright 拦截 paywall JS, archive.org 兜底
  • 自动降级链 — 每个 URL 自动尝试最优策略, 逐级降级直到成功
  • 文章发现 — RSS / sitemap / 首页解析 / 浏览器渲染, 获取任意站点最近文章列表
  • 跨站爬取 — 关键词搜索 + 时间范围过滤 + 并发下载, 一条命令完成
  • Agent 友好 — JSON 输出, stderr 进度信号, 每个命令返回 next_command
  • 跨平台 — pip install 即用 (Win/Linux/Mac), 也可打包为 Windows 单 exe

绕过策略

策略 站点数 方法
ua:custom 7 自定义 User-Agent (Liskov, Google-InspectionTool 等)
ua:googlebot 85 Googlebot UA 伪装
ua:facebookbot 5 Facebook 爬虫 UA
referer:google 2 Google Referer 头
block_js 425 Playwright 通过 Page.route() 拦截 paywall 脚本
archive 274 从 archive.org / archive.is 获取缓存
cookies 138 不带追踪 cookie 访问

安装

pip 安装 (推荐)

pip install bpc-fetch
playwright install chromium

从源码安装

git clone https://github.com/Sophomoresty/bpc-fetch.git
cd bpc-fetch
pip install -e .
playwright install chromium

Windows exe

从 Releases 下载 bpc-fetch.exe, 然后:

bpc-fetch.exe install-browser
bpc-fetch.exe doctor

使用方法

# 环境检测
bpc-fetch doctor

# 查看支持站点
bpc-fetch sites --filter economist

# 发现某站今日文章
bpc-fetch discover economist.com --since today

# 抓取单篇文章
bpc-fetch fetch "https://www.economist.com/..." --out-dir ./articles

# 批量抓取
bpc-fetch batch --file urls.txt --out-dir ./articles

# 跨站爬取: 关键词 + 时间范围
bpc-fetch crawl "AI regulation" --sites economist.com,ft.com --since 7d --out-dir ./ai-articles

输出格式

article-title/
├── article-title.md      # YAML frontmatter + 正文 + 图片引用
└── images/
    ├── img_000_abc1.jpg
    └── img_001_def2.png

Agent 集成

所有命令输出 JSON, 使用 --compact 获取精简输出:

bpc-fetch discover ft.com --since today --compact
# → {"ok": true, "domain": "ft.com", "count": 15, "articles": [...], "next_command": "bpc-fetch batch ..."}

打包 Windows exe

pip install pyinstaller
python build/build_win.py
# 产出: dist/bpc-fetch.exe

致谢

本工具基于以下项目的绕过逻辑构建:

  • Bypass Paywalls Clean by magnolia1234 — 提供站点数据库和绕过策略的原始浏览器扩展. 所有 paywall 绕过研究的功劳归属于 BPC 项目维护者.
  • LINUX DO — 社区支持与反馈.

许可证

MIT — 见 LICENSE.

data/sites.js 文件来自 Bypass Paywalls Clean 项目 (MIT License).

探索相关项目

加载中…