摘要: 获取url 设定请求头 requests发出get请求 实例化BeautifulSoup对象 BeautifulSoup提取数据 import requests 2 from bs4 import BeautifulSoup 3 4 url = "https://s.weibo.com/top/su 阅读全文
posted @ 2020-10-16 15:41 zou-ting-rong 阅读(471) 评论(0) 推荐(0)
摘要: html =""" 2 <!DOCTYPE html> 3 <html> 4 <head> 5 <meta charset = "utf-8"> 6 <title>this is a Demo</title> 7 </head> 8 <body> 9 <div id = "container"> 1 阅读全文
posted @ 2020-10-16 14:48 zou-ting-rong 阅读(169) 评论(0) 推荐(0)