|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 nanrenne 于 2020-3-24 23:08 编辑
我这个正则为什么无法匹配到中文那一段
def fenxi(html):
zhen_url = re.compile('<div.*?data-hint-title="(.*?)"', re.S)
zhen = re.findall(zhen_url,html)
print(zhen)
#re.compile('')
以下为网页原内容
<div class="book-wrapper show-none" data-index="1121670" data-id="0" data-toggle="hintpoint" data-hint-title="语文一年级下册(部编版)" style="width: 72.9429px; height: 111px; left: 13.5286px; top: 0px;"><div class="book-face"><div class="book-qrurl" style="width: 61px; height: 61px; left: 0px; top: 19px; padding: 6px; border: 0px;"><canvas width="61" height="61"></canvas></div></div><img class="book-img"
当然,他上边还有很多div
已找到答案,源文件全是JS |
|