diff --git a/.gitignore b/.gitignore index 14fe766..1a79499 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .idea/ *.iml *.iws -*.ipr \ No newline at end of file +*.ipr +*.mp3 +*.mp4 \ No newline at end of file diff --git a/test/001.六星/2024/requests使用/网易/WY-music.py b/test/001.六星/2024/requests使用/网易/WY-music.py new file mode 100644 index 0000000..2871bf9 --- /dev/null +++ b/test/001.六星/2024/requests使用/网易/WY-music.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# @Time : 2026/5/8 10:37 +# @Author : cmk +# @File : WY-music.py +# @Email : 15726649712@163.com + +''' +简单暴力获取网易云音乐照片或者mv +简单测试,无法大批量下载,vip歌曲无法下载 +''' + +import requests +from fake_useragent import UserAgent + +class music(): + def __init__(self): + self.headers = { + 'User-Agent': UserAgent().random, + } + def get_data(self,name,url): + res = requests.get(url, headers=self.headers) + with open(name, 'wb') as f: + f.write(res.content) + +if __name__ == '__main__': + music_ = music() + name = input("输入音乐 or mv or 照片的名称以及格式.mp3,jpg,mp4:") + url = input('输入F12抓包的url:') + music_.get_data(name,url) \ No newline at end of file diff --git a/test/001.六星/2024/requests使用/网易/aaa.mp3 b/test/001.六星/2024/requests使用/网易/aaa.mp3 deleted file mode 100644 index d56dfff..0000000 Binary files a/test/001.六星/2024/requests使用/网易/aaa.mp3 and /dev/null differ diff --git a/test/001.六星/2024/requests使用/网易/aaa.mp4 b/test/001.六星/2024/requests使用/网易/aaa.mp4 deleted file mode 100644 index acd8986..0000000 Binary files a/test/001.六星/2024/requests使用/网易/aaa.mp4 and /dev/null differ diff --git a/test/001.六星/2024/requests使用/网易/get_wangyi.py b/test/001.六星/2024/requests使用/网易/get_wangyi.py deleted file mode 100644 index b1f3978..0000000 --- a/test/001.六星/2024/requests使用/网易/get_wangyi.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# @Time : 2024/7/28 下午5:57 -# @Author : cmk -# @File : get_wangyi.py -# @Email : 15726649712@163.com - -''' -分别获取网易一张照片,一个非vip歌曲,一个mv -''' - -import requests - -headers = { -'user_agents':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60', -} - -#get image -url = 'http://p1.music.126.net/psth_fcCEKjDVXRtijL_DQ==/1383185632930533.jpg' - -res = requests.get(url, headers=headers) -with open('test.jpg', 'wb') as f: - f.write(res.content) - -#get music -url = 'https://m10.music.126.net/20240728182859/1252bdf0083d4ef2fbc4bccd1eff5f4a/yyaac/obj/wonDkMOGw6XDiTHCmMOi/3406609822/defb/9e18/d07d/d1c842849986e5c89dbc4a5cd0358ae6.m4a' - -res = requests.get(url, headers=headers) -with open('aaa.mp3', 'wb') as f: - f.write(res.content) - -#get mv -url = 'https://vodkgeyttp8.vod.126.net/cloudmusic/YiAgMSAgMDUwISAxMiAyYA==/mv/5555628/7508db79ce7ac7c34375f32aec1468ca.mp4?wsSecret=0051ba644c2551997f8b737a114c427f&wsTime=1722161256' -res = requests.get(url, headers=headers) -with open('aaa.mp4', 'wb') as f: - f.write(res.content) \ No newline at end of file diff --git a/test/001.六星/2024/requests使用/网易/test.jpg b/test/001.六星/2024/requests使用/网易/test.jpg deleted file mode 100644 index 39051fb..0000000 Binary files a/test/001.六星/2024/requests使用/网易/test.jpg and /dev/null differ