摘要:
代码: import requests from lxml import etree text = requests.get("https://music.163.com/discover/toplist?id=3778678").text html = etree.HTML(text) id_li 阅读全文
摘要:
代码: import requests from pyquery import PyQuery as pq # 比xpath还要灵活的html解析工具 # 定义请求 headers = { "Accept": "text/html,application/xhtml+xml,application/ 阅读全文
摘要:
代码: import requests from lxml import etree import pandas as pd from pyecharts.charts import Bar from pyecharts.charts import WordCloud from pyecharts 阅读全文
摘要:
代码: import requests from bs4 import BeautifulSoup as bs import time def get_movie(url): headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64 阅读全文
摘要:
代码: import requests from lxml import etree # html解析库 source = requests.get("https://www.huya.com/g/4079").text html = etree.HTML(source) # 获取所有的<img c 阅读全文
摘要:
代码: import requests json_headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/96.0.46 阅读全文
摘要:
代码: import requests from lxml import etree headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 阅读全文