gpt4 book ai didi

python - Scrapy 飞溅 : screenshot specific element

转载 作者:行者123 更新时间:2023-12-05 06:34:52 25 4
gpt4 key购买 nike

有没有办法截取 splash 中的特定元素?我似乎无法为此找到解决方案,我找到的唯一选择是使用“render.png”,它会截取整个页面的屏幕截图,我只需要一个特定的元素,例如“//table”。

我找到了 this我目前正在使用( Selenium 中的解决方案),Splash 似乎速度更快,开销更少。

非常感谢。

最佳答案

你可以使用这个:

return splash:select('#my-element'):png()

更多详情请看document

关于python - Scrapy 飞溅 : screenshot specific element,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49971106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com