We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb3279a commit 14718faCopy full SHA for 14718fa
1 file changed
moumoubaimifan/wxsp.py
@@ -0,0 +1,19 @@
1
+import requests,re
2
+
3
+url = 'https://mp.weixin.qq.com/s/C6P5RwIejmUrnovom3lZFg'
4
5
+result = requests.get(url).text
6
+biz = re.search(r'__biz=(.*?)&',result)[1]
7
+mid = re.search(r'mid=(.*?)&',result)[1]
8
+vid = re.search(r'wxv_(.*?)\"',result)[0].replace('\"', '')
9
10
+video_url = f'https://mp.weixin.qq.com/mp/videoplayer?action=get_mp_video_play_url&preview=0&__biz={biz}&mid={mid}&idx=1&vid={vid}&uin=&key=&pass_ticket=&wxtoken=777&devicetype=&clientversion=&__biz={biz}&appmsg_token=&x5=0&f=json'
11
12
+url_info = requests.get(video_url).json()['url_info'][0]['url']
13
14
+resp = requests.get(url_info, stream=True )
15
16
+with open('day10.mp4', 'wb') as f:
17
+ f.write(resp.content)
18
19
+print('视频下载完成')
0 commit comments