google-chrome - 使用 Chrome --headless + cookies/oauth token 截取页面截图
问题描述
我发现,可以轻松地截取页面截图 - https://superuser.com/questions/1410641/how-to-take-screenshots-of-a-list-of-urls - 通过调用:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --enable-logging --screenshot="C:\path\to\screenshot.png" http://example.com/
但是它正在启动新的 Chrome 进程,这导致我能够截取简单页面的屏幕截图,但是页面和身份验证(如 Oauth2)呢?我可以以某种方式使用 chrome,使用已经存在的浏览器“会话”,我登录到感兴趣的页面,我将要截取屏幕截图或传递 oauth2 令牌甚至 cookie,不知何故?
解决方案
推荐阅读
- python - 在python中完成前一个线程后启动一个新的基于计时器的线程
- google-apps-script - UrlFetchApp 超时
- r - R Copula 包。定义具有不同 copula 系列的 mvdc 时出错
- amazon-web-services - 如何在 aws cdk 中导入现有 VPC?
- entropy - 将生病标签提取为 Numpy 数组?
- javascript - 如何在 SVG 中计算法国曲线?
- sql - Presto - 使用唯一标识符连接多个表
- java - 连接它们时意外关闭流
- c# - 与其他工具相比,C# SerialPort 接收到不正确的数据
- python - 无法在python中使用google earth引擎的reduceRegion功能