700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > python网页屏幕截图 如何使用Python拍摄网站的屏幕截图/图片?

python网页屏幕截图 如何使用Python拍摄网站的屏幕截图/图片?

时间:2021-04-02 11:24:45

相关推荐

python网页屏幕截图 如何使用Python拍摄网站的屏幕截图/图片?

What I want to achieve is to get a website screenshot from any website in python.

Env: Linux

解决方案

On the Mac, there's webkit2png and on Linux+KDE, you can use khtml2png. I've tried the former and it works quite well, and heard of the latter being put to use.

I recently came across QtWebKit which claims to be cross platform (Qt rolled WebKit into their library, I guess). But I've never tried it, so I can't tell you much more.

The QtWebKit links shows how to access from Python. You should be able to at least use subprocess to do the same with the others.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。