Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrapy splash: screenshot specific element

Is there a way to screenshot a specific element in splash? I cannot seem to find a solution for this, The only option that I found is using "render.png" which takes a screenshot of the full page, I only need a specific element for example "//table".

I found this which I am currently using (solution in selenium), Splash seems faster with less overhead.

Thanks a lot.

like image 855
SphinX Avatar asked Jan 24 '26 21:01

SphinX


1 Answers

you can use this :

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

for more details look document

like image 95
zana saedpanah Avatar answered Jan 26 '26 09:01

zana saedpanah