import re
import requests
f=open('search.txt','r')
html=f.read
f.close
pic_S=re.findall('data-echo=(.?)data-size="335" >',html,re.S)这句报错
print(pic_S)
报错内容:
Exception has occurred: TypeError
expected string or bytes-like object
File "C:\Users\Administrator.DESKTOP-MP1O82P\Desktop\py\scrach\try1.py", line 6, in pic_S=re.findall('data-echo=(.?)data-size="335" >',html,re.S)
这句报错该怎么出理?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-