微信视频号下载器 v1.0(2023.10.16已失效)
本帖最后由 我真的爱发明 于 2023-10-16 12:42 编辑# 前言
- 不得不说,微信视频号的下载真的是一个老大难问题,每隔一段时间,之前的方法总会失效,然后又需要去找新的工具。翻来覆去颠倒几次之后烦的不行,于是想着直接通过抓包的方法来下载微信视频号,只要自己实时更新一下微信的解析规则,那么这种手动抓包下载的方法基本上就永久可用,说干就干,我们马上开始搞起来。
# 具体操作
## 下载标清版本
- 将要下载的视频分享到微信的文件传输助手中,防止下载错了,之后打开这个视频
![](https://remnote-user-data.s3.amazonaws.com/ypZSinCASQKbUf4un2C3j5lLHFWkfBtznGQp5Ru4kTnES8rG-o86NEA60MzhOJsuWua_tqqgPd2M7cRksqhhF-tUBhs9XveRWXpPR3rXwyTz2hwJd9cg4lN3yXO8yz3n.png)
- 然后打开Http debug进行抓包,找到finder开头的网址,应该是get方法,资源类型为mp4,复制出来这个网址
![](https://remnote-user-data.s3.amazonaws.com/eiZPJOZ2LXrhY8hueiZmN1GfcDo5ZFYmHRSsidwbbzSfYuAZx8JerKMwHgsGbkbJtVQ-9s5xS9ZVTUlq0-ZrRWL8UpQ1uGC9r852vaxRt30ZZ8eclDfNhV71LAnKrjyO.png)
```
https://finder.video.qq.com/251/20302/stodownload?encfilekey=Cvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQDtxG4xibUK1iceLfkxcFazFHEwU39NworItlIaibb4CKaA4GFibfcCmeicicX7a9Fw1BZK9kYr1YtcpQIL2iawt1DvmPN&bizid=1023&dotrans=0&hy=SH&idx=1&m=&upid=0&web=1&token=6xykWLEnztKNJfMkDJQkqv7NTNo7B8TYJljUNmdpz0wQiaQhxbdvZXsJiapiapSibPzSajy3BRO9QJhmUicOcMeZcYibsxib6ica0T4pj99Pkic1lGe1ibSdLGMF9XBTXUJ4db4Gkib&extg=10f002e&svrbypass=AAuL%2FQsFAAABAAAAAAAXIkT4jXzES8%2BxLuTeZBAAAADnaHZTnGbFfAj9RgZXfw6VXkxwlWjwX%2BxfEW6SmjDgkchRBCMywhVTMnVoJS5LWXuv&svrnonce=1692329006&fexam=1&X-snsvideoflag=xWT96
```
- 之后将这个网址中的20302修改成20304,
![](https://remnote-user-data.s3.amazonaws.com/70Dx2OICb0FF8S4TQCrtdKyQknnT_Uwp7xZ2Lw_rYCOfKfx7gVNnkZYCmdJSfW02hzzbvTGdqxcWMzcSSHybXkylgT5P5EnVFJSkNrsX4pCXzjwlenOiIgtf0Z44tdZP.png)
一个样例
```
https://finder.video.qq.com/251/20304/stodownload?encfilekey=Cvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQDtxG4xibUK1iceLfkxcFazFHEwU39NworItlIaibb4CKaA4GFibfcCmeicicX7a9Fw1BZK9kYr1YtcpQIL2iawt1DvmPN&bizid=1023&dotrans=0&hy=SH&idx=1&m=&upid=0&web=1&token=6xykWLEnztKNJfMkDJQkqv7NTNo7B8TYJljUNmdpz0wQiaQhxbdvZXsJiapiapSibPzSajy3BRO9QJhmUicOcMeZcYibsxib6ica0T4pj99Pkic1lGe1ibSdLGMF9XBTXUJ4db4Gkib&extg=10f002e&svrbypass=AAuL%2FQsFAAABAAAAAAAXIkT4jXzES8%2BxLuTeZBAAAADnaHZTnGbFfAj9RgZXfw6VXkxwlWjwX%2BxfEW6SmjDgkchRBCMywhVTMnVoJS5LWXuv&svrnonce=1692329006&fexam=1&X-snsvideoflag=xWT96
```
- 之后就可以放到IDM中进行下载了
![](https://remnote-user-data.s3.amazonaws.com/Ehd9K9U2HP31X_e2sHmQpcas8_-ispW_uMEgYFUSjuMCeQjE9WBTTHRGJQlnLDAqUJtecNMl1hetMx-Y2lHqEsjYgnTWU-MhIIIKVDmqvtnOm-rkoVaOojo7z3H4IwQf.png)
- 如果下载的格式是jpg的,不用管它,直接强制改成mp4的就行了
![](https://remnote-user-data.s3.amazonaws.com/fktruUTDc-m8rLJDi7mSIpX12_rzmbgtLLTRYH2U6S1z8w0gs0t7OSCq5c-KQVIIR3ium9RyfcqH0J2XrLSgOGF-rF-5v3SG5fP_PWcWwqKxm8ouTXDpzSw7wp8cv1q2.png)
![](https://remnote-user-data.s3.amazonaws.com/EqLZ1atGiqs7j-13MdI4wc2VHddzoSikJsSBfqyEdd3SapEkIjBF8Gd5aFodK0OGhkcloY6kOtGGGQ7aTGZlwImP-ejUlmfSNbdtv9QGwvato6uDqE2eh1nRJEdr92V6.png)
- 可以看到这个视频是可以正常查看与播放的
![](https://remnote-user-data.s3.amazonaws.com/9GuLVdmlc0NaKuTCrN06F1n15tITdxZs0H2mrbjHwHk_7vD9XOFA5bqz-OOwDa9jzVS7E1qGH2ANd29f93jvGcg5iS9GSzG7YD1NPbDtRSVIsO5ybJk6kLfGU7lnnIO4.png)
## 下载高清的微信号视频
- 不过这个视频下载的是标清版的,如果想下载高清版的还需要对链接进行进一步的处理
- 保留**encfilekey**以及**token**部分,其他的参数全部删掉
### 标清的视频链接
```
### https://finder.video.qq.com/251/20304/stodownload?encfilekey=Cvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQDtxG4xibUK1iceLfkxcFazFHEwU39NworItlIaibb4CKaA4GFibfcCmeicicX7a9Fw1BZK9kYr1YtcpQIL2iawt1DvmPN&bizid=1023&dotrans=0&hy=SH&idx=1&m=&upid=0&web=1&token=6xykWLEnztKNJfMkDJQkqv7NTNo7B8TYJljUNmdpz0wQiaQhxbdvZXsJiapiapSibPzSajy3BRO9QJhmUicOcMeZcYibsxib6ica0T4pj99Pkic1lGe1ibSdLGMF9XBTXUJ4db4Gkib&extg=10f002e&svrbypass=AAuL%2FQsFAAABAAAAAAAXIkT4jXzES8%2BxLuTeZBAAAADnaHZTnGbFfAj9RgZXfw6VXkxwlWjwX%2BxfEW6SmjDgkchRBCMywhVTMnVoJS5LWXuv&svrnonce=1692329006&fexam=1&X-snsvideoflag=xWT96
```
### 高清的视频链接
```
### https://finder.video.qq.com/251/20304/stodownload?encfilekey=Cvvj5Ix3eewK0tHtibORqcsqchXNh0Gf3sJcaYqC2rQDtxG4xibUK1iceLfkxcFazFHEwU39NworItlIaibb4CKaA4GFibfcCmeicicX7a9Fw1BZK9kYr1YtcpQIL2iawt1DvmPN&bizid=1023&dotrans=0&hy=SH&idx=1&m=&upid=0&web=1&token=6xykWLEnztKNJfMkDJQkqv7NTNo7B8TYJljUNmdpz0wQiaQhxbdvZXsJiapiapSibPzSajy3BRO9QJhmUicOcMeZcYibsxib6ica0T4pj99Pkic1lGe1ibSdLGMF9XBTXUJ4db4Gkib
```
- ![](https://remnote-user-data.s3.amazonaws.com/4OKnbESK3ov5r4TbWiPKFPZPTvE3uiUGflQT9eUzEodnvkKCydYsMdnpLvu7k-kFEmH3SF3DUo2HEJzvu-4ix9DKnQkFcwZiyW-kQuKgt8cRyKO8j-8VNZEUYvHEAucK.png)
###
- 可以看到这个视频的尺寸已相较之前大了很多
![](https://remnote-user-data.s3.amazonaws.com/xcqv1rNijBjn4EVUGxlBf2OOlDSm1Rg6Q3ICpTl5KaPTMmsHOEVkbpz7M-3TY2evnQkghzO87DnufgHdz1ahU5inpNfn40urkgLzbtfz8aIFpZ7wW7NS0zT9R-qn1-qX.png)
- 播放起来的清晰度也相较之前清晰了很多
![](https://remnote-user-data.s3.amazonaws.com/A7j_39iIdGNW3cvNvcQIBV5YWxljhXofcalGrcaw45lbdQzfMOyOMqRo25JR5E1EtQEux-lQZWo7Sy1BWEiJHXzMDwUlWVyncFyAnXpZxKKJq7n0xuCFM9xbahJQb11k.png)
###
###
## 自动化操作
- 当然了,这个删除参数的操作很繁琐,而且一不小心就容易出错,因此我把它写成一个Python小程序,可以直接下载下来这个地址中的视频
### 代码
```
import tkinter as tk
from tkinter import filedialog
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
import tkinter.font as tkfont
from datetime import datetime
import warnings
import requests
warnings.filterwarnings("ignore")
class AutoClosingDialog(tk.Toplevel):
def __init__(self, parent, text='', title=None, timeout=2000):
super().__init__(parent)
if title:
self.title(title)
self.timeout = timeout
tk.Label(self, text=text).pack()
self.after(self.timeout, self.destroy)
def remove_parameters(url, params_to_keep):
parsed_url = urlparse(url)
query_params = parse_qs(parsed_url.query)
query_params = {param: query_params for param in params_to_keep if param in query_params}
encoded_query = urlencode(query_params, doseq=True)
new_url = urlunparse((
parsed_url.scheme,
parsed_url.netloc,
parsed_url.path,
parsed_url.params,
encoded_query,
parsed_url.fragment
))
return new_url
def download_file(url, save_path):
response = requests.get(url, stream=True, verify=False)
response.raise_for_status()
with open(save_path, 'wb') as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)
def process_url(quality):
url = entry.get().replace('20302', '20304')
if quality == 'hd':
# params_to_keep = ['encfilekey', 'token']
# new_url = remove_parameters(new_url, params_to_keep=params_to_keep)
video_type = '(高清)'
else:
new_url = url
video_type = '(标清)'
current_datetime = datetime.now()
current_date = current_datetime.strftime("%Y.%m.%d")
current_time = current_datetime.strftime("%H%M%S")
filename = f'{current_date}-{current_time}-{quality}{video_type}.mp4'
save_path = save_path_var.get() + '/' + filename
print(f"下载链接:{new_url}")
print(f"保存路径:{save_path}")
try:
download_file(new_url, save_path)
AutoClosingDialog(window, text=f"{quality.upper()} 视频已成功下载到:" + save_path, title="成功")
except Exception as e:
AutoClosingDialog(window, text=f"下载{quality.upper()}视频时发生错误:" + str(e), title="错误")
def process_normal_url():
download_button.config(state='disabled')
download_hd_button.config(state='disabled')
process_url('normal')
download_button.config(state='normal')
download_hd_button.config(state='normal')
def process_hd_url():
download_button.config(state='disabled')
download_hd_button.config(state='disabled')
process_url('hd')
download_button.config(state='normal')
download_hd_button.config(state='normal')
window = tk.Tk()
window.title("微信视频号下载工具 v1.0")
window_width = 700
window_height = 300
screen_width = window.winfo_screenwidth()
screen_height = window.winfo_screenheight()
position_top = int(screen_height / 2 - window_height / 2)
position_right = int(screen_width / 2 - window_width / 2)
window.geometry(f'{window_width}x{window_height}+{position_right}+{position_top}')
font_style = tkfont.Font(family="Arial", size=16)
label = tk.Label(window, text="请输入微信视频号链接", font=font_style)
label.pack()
entry = tk.Entry(window, font=font_style, width=50)
entry.pack()
save_path_var = tk.StringVar()
save_path_var.set("E:/Documents/Desktop")
def choose_save_path():
save_path = filedialog.askdirectory()
save_path_var.set(save_path)
save_path_button = tk.Button(window, text="选择保存路径", command=choose_save_path, font=font_style)
save_path_button.pack()
save_path_entry = tk.Entry(window, textvariable=save_path_var, font=font_style, width=50)
save_path_entry.pack()
download_button = tk.Button(window, text="下载普通质量", command=process_normal_url, font=font_style)
download_button.pack()
download_hd_button = tk.Button(window, text="下载高清质量", command=process_hd_url, font=font_style)
download_hd_button.pack()
window.mainloop()
```
- 操作界面很简单,没有什么需要说明的地方
- ![](https://remnote-user-data.s3.amazonaws.com/T3hzfEoWFdCSCtzKJm_v1nnc0g-waZfYlljaoNg6dOTfFkWk8PyYoQOkHSXxPD8khEIuROvPDNFFUdvaKn22wqWYzthhDIqngOm8-PtezqQvxN_ZDAozO3GDWvmNT9a8.png)
- ![](https://remnote-user-data.s3.amazonaws.com/6PoBlEyz15XWDxiHToajG-aKeWrqJURF6VXeI0_6Pw3Y2y-RCYIZkegdcj7CguhIxdH3V1hphucItkIvt7ztdZ3poaAPYbNfVplG44aogOze1aUvS1lweTUOTZaCXvAy.png)
我用Win11 x64编译了一个开箱即用的exe
https://www.123pan.com/s/UajA-WRUaH.html 本帖最后由 djxding 于 2023-8-29 13:55 编辑
cao_jf 发表于 2023-8-18 17:30
我下载的也不是楼主截图的成品小程序
扩展名是.py,要Python环境的。
运行后就看到界面了。
发一个打包好了的,WIN7能运行,需要的自取。
https://gangwan.lanzoul.com/imkcH15vheti
有坛友反馈说:“ 链接能打开,但是不能下载。 ”
我这边是能正常下载到本地电脑上的呢,应该是你自己的系统有问题吧。
环境是越来越封闭了,要减轻对腾讯的依赖 sexbomb 发表于 2023-10-9 12:41
楼主快来,现在下载下来的不能播放了!估计又升级了,可恶的tx
哈哈,我随后再研究一下新的抓包规则 感谢楼主 dazhi1882 发表于 2023-8-23 21:01
安装好了,已经解决了。要用原版的微信才可以,总之要放得出视频才可以的。但有个问题是,HTTPDebuggerUI ...
在播放视频时,鼠标不要乱停留,多注意一下细节,就明白了。
最好是:鼠标只停留在要播放的视频区域 ! 实际这个小程序需要安装python,才能用,这是其一,其二是如何获取视频号链接也是个问题
@我真的爱发明 麻烦想问一下
请输入微信视频号链接
这个链接需要怎么拿到?
这个没太搞明白,也需要用HTTP Debugger捕获吗?还是有比较直接的获取方式?
牛皮克拉斯 不懂就问:为什么下载不是楼主截图的成品小程序呀,是因为没有Python环境吗? 前排支持,谢谢分享 前排支持,谢谢分享
我没有Python环境 不能使用是么? 感谢楼主的无私奉献 有没有在Windows领域环境下 可以自由打开的方式,求大神帮助