from lxml import etree
import requests
import os
from urllib import request,parse
url = 'https://www.ximalaya.com/lishi/4164479/'
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
}
response = requests.get(url,headers=headers)
# print(response)
html = response.text
html_ele = etree.HTML(html)
mp_list = html_ele.xpath('//ul[@class="dOi2"]/li/div[2]/a/@href')
# print(mp_list)
# 遍历春秋尾部链接
Python爬虫 爬取音频文件 #只用于学习
最新推荐文章于 2024-08-16 11:38:09 发布
