Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 puppeteer 从网站上抓取内容,我需要打开多个页面。我想知道一个浏览器中的多个页面和多个浏览器中的多个页面有什么区别?
即使使用 Selenium 的线程,也不能单独运行多个选项卡。
同时打开多个页面需要为每个线程提供一个 WebDriver 实体(如果您并行运行它们)。这将消耗更多内存,但如果您确实需要一次管理多个选项卡,这是唯一的解决方法。