把 BytesFlows 代理配置到 Scrapling Fetcher
实例化 Fetcher 时直接传入代理认证连接字符串即可开启物理匿迹。
example.py
from scrapling import Fetcher
# 初始化并注入自动轮换住宅代理
fetcher = Fetcher(
proxy="http://user-youraccount-rotate:password@proxy.bytesflows.com:31112",
headless=True,
stealth=True
)
page = fetcher.get("https://example.com/protected-dataset")
print("解析到目标页面标题:", page.title)
print("通过住宅 IP 成功跳过反爬验证并拿取正文。")