# Pexels 股票适配器在每次请求中都失败——缺失 " User-Agent " 头条(Cloudflare 401/403)
作者: churchofcool创建于 2026年8月30日更新于 2026年8月31日
标签bug
Summary
tools/video/stock_sources/pexels.py sends requests to the Pexels API and CDN with no User-Agent header. The default Python (Python-requests/x.y.z) is blocked by Pexels' edge (Cloudflare), so every search returns 401 Unauthorized / 403 Forbidden even with a valid PEXELS_API_KEY. Adding a browser-like UA makes the identical key return 200.
Impact
direct_clip_searchandcorpus_builderreturn zero clips whenever Pexels is a source.- Preflight (
provider_menu_summary()) reports Pexels asconfiguredbecause the env var is present, so the failure only surfaces mid-run at the asset stage. - Blocks the
documentary-montagepipeline (Pexels is its primary source) and any pipeline relying on Pexels stock.
内容来源: calesthio/OpenMontage