#-*-coding:utf-8-*- __author__ = 'qinlan' import requests import time,os,random,pymongo from prettytable import PrettyTable as pt from bs4 import BeautifulSoup from multiprocessing import Pool proxies = [ '115.224.163.58:61202','179.184.9.172:20183', '177.37.166.164:20183','103.55.69.242:53281', '217.61.106.183:80','45.125.220.242:8080', '103.88.140.85:8080','218.26.227.108:80', '110.171.230.47:8080','118.81.108.77:9797', '31.145.83.198:8080','195.88.208.115:3128' ] agent = [ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1',
python爬虫(轻音乐网)
最新推荐文章于 2022-04-15 13:13:41 发布
该Python爬虫程序用于从轻音乐网站抓取并下载不同类型的音乐,包括纯音乐、新世纪、钢琴曲等。它使用requests库处理HTTP请求,通过BeautifulSoup解析HTML页面,同时使用多进程Pool进行并行下载,提高效率。爬虫还包含代理IP池以应对可能的反爬策略,并能根据网站结构抓取歌曲名称和ID,将MP3文件保存到本地。
摘要由CSDN通过智能技术生成