立即学习:https://edu.csdn.net/course/play/26899/344222?utm_source=blogtoedu
1.导入re模块
2.with open(‘路径’,‘已读’,编码格式) as f :
3. 方法内去掉换行符打印
html=re.sub('\n','',f.read())
4.声明正则表达式
5.用re.findall(正则表达式,截取字符串)方法爬取内容
6.可根据具体业务继续编订正则表达式,
立即学习:https://edu.csdn.net/course/play/26899/344222?utm_source=blogtoedu
1.导入re模块
2.with open(‘路径’,‘已读’,编码格式) as f :
3. 方法内去掉换行符打印
html=re.sub('\n','',f.read())
4.声明正则表达式
5.用re.findall(正则表达式,截取字符串)方法爬取内容
6.可根据具体业务继续编订正则表达式,