You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Python BeautifulSoup从证书验证后的网页提取URL

提取证书验证后的目标URL
  • 使用curl搭配你的PEM证书发起认证请求,获取页面完整内容:
    curl --cert /path/to/your/cert.pem https://目标网站域名
    
    替换/path/to/your/cert.pem为你的PEM文件实际路径,https://目标网站域名替换为图片对应页面的域名。
  • 从返回内容中过滤提取目标URL:
    用grep直接匹配mis.ercot.com/misdownload开头的链接:
    curl --cert /path/to/your/cert.pem https://目标网站域名 | grep -o "mis.ercot.com/misdownload[^\"']*"
    
  • 若页面是JS动态渲染的,curl无法抓取动态加载内容,改用Chrome无头模式:
    chrome --headless --disable-gpu --certificate-file=/path/to/your/cert.pem --dump-dom https://目标网站域名 | grep -o "mis.ercot.com/misdownload[^\"']*"
    
    需确保Chrome已配置正确的证书参数,能加载你的PEM文件完成认证。

内容的提问来源于stack exchange,提问作者Zanam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 05:52:01