2019-01-21
阅读量:
755
如何利用python进行屏幕抓取?
可以通过使用Tidy外部库来连接,具体代码如下:
from subprocess import Popen, PIPE
text = open('messy.html').read()
tidy = Popen('tidy', stdin=PIPE, stdout=PIPE, stderr=PIPE)
tidy.stdin.write(text)
tidy.stdin.close(0)
print(tidy.stdout.read())






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
3条评论