.DokiDoki

导航

2020年12月14日 #

python html页面

摘要: from bs4 import BeautifulSoup import re soup=BeautifulSoup('''<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </h 阅读全文

posted @ 2020-12-14 19:41 .DokiDoki 阅读(82) 评论(0) 推荐(0) 编辑

python 爬虫goole主页

摘要: import requests url="https://www.google.cn/" def gethtml(url): try: r=requests.get(url) r.raise_for_status() r.encoding="utf-8" print("text内容:",r.text 阅读全文

posted @ 2020-12-14 19:13 .DokiDoki 阅读(85) 评论(0) 推荐(0) 编辑