摘要: from bs4 import BeautifulSoup import re soup=BeautifulSoup("<head><title>菜鸟教程(runoob.com)</title></head><body><h1>我的第一个标题</h1><p id="frist">我的第一个段落。</ 阅读全文
posted @ 2020-05-13 14:50 Leeingli 阅读(533) 评论(0) 推荐(0) 编辑
摘要: import requests def getHTMLText(_): try: r=requests.get(url,timeout=30) r.raise_for_status() r.encoding='utf-8' return r.text except: return "" url="h 阅读全文
posted @ 2020-05-13 14:16 Leeingli 阅读(121) 评论(0) 推荐(0) 编辑