摘要: import requests from lxml import etree # //ul[@id = "showImg"]/li/a/img/@src text = requests.get('your url').text # html = etree.HTML(text) # result = 阅读全文
posted @ 2020-01-21 17:29 酷酷的城池 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Scrapy依赖的包有如下:lxml:一种高效的XML和HTML解析器w3lib:一种处理URL和网页编码多功能辅助twisted:一个异步网络框架cryptography 和 pyOpenSSL:处理各种网络级安全需求——————————————————————————1.先运行一次pip安装 p 阅读全文
posted @ 2020-01-21 15:30 酷酷的城池 阅读(1304) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image import pytesseract im = Image.open('./1.jpg') imgry = im.convert('L') threshold = 140 table = [] for i in range(256): if i < thr 阅读全文
posted @ 2020-01-21 14:15 酷酷的城池 阅读(142) 评论(0) 推荐(0) 编辑