我想下载一个视频,它的URL不是一个简单的MP4文件,而是一个blob类型的例子:
<video id="playerVideo" width="450px" autoplay="autoplay" height="338px"
style="height:100%;width:100%;" class="mejs-rai-e"
src="blob:http://www.example.com/d70a74e1-0324-4b9f-bad4-84e3036ad354">
</video>
有没有任何chrome扩展或软件,可以用来从blob url下载视频?
我刚刚想出了一个通用的解决方案,这应该适用于大多数网站。
我只在Chrome上尝试了这个方法,但这个方法应该适用于任何其他浏览器,因为Dev Tools在它们中几乎是相同的。
步骤:
Open the browser's Dev Tools (usually F12, or Ctrl-Shift-I, or right-click and then Inspect in the popup menu) on the page with the video you are interested in.
Go to Network tab and then reload the page. The tab will get populated with a list of requests (may be up to a hundred of them or even more).
Search through the names of requests and find the request with .m3u8 extension. There may be many of them, but most likely the first or largest is the one you are looking for. It may have any name, e.g. playlist.m3u8.
Click its name to open the request. Under the Headers subsection you will see request's full URL in the Request URL field. Copy it.
Extract the video from m3u8. There are many ways to do it, I'll give you those I tried, but you can google more by "download video from m3u8".
Option 1. If you have VLC player installed, feed the URL to VLC using the "Open Network…" menu option. I'm not going to go into details on this part here, there are a number of comprehensive guides in many places, for example, here. If the page doesn't work, you can always google another one by "vlc download online video".
Option 2. If you are more into command line, use FFMPEG or your own script, as directed in this SuperUser question.
如果你找不到.m3u8文件,你需要做几个不同的步骤。
1)进入网络选项卡,按媒体排序
2)你会在这里看到一些东西,然后选择第一项。在我的例子中,它是一个mpd文件。然后复制请求URL。
3)接下来,使用您最喜欢的命令行工具,使用步骤2中的URL下载文件。
youtube-dl -f bestvideo+bestaudio https://url.com/destination/stream.mpd
4)根据编码,您可能需要将音频和视频文件连接在一起,但这将取决于视频的视频情况。
Find the playlist/manifest with the developer tools network tab. There is always one, as that's how it works. It might have an m3u8 extension that you can type into the Filter. (The youtube-dl tool can also find the m3u8 tool automatically some time give it a direct link to the webpage where the video is being displayed.)
Give it to the youtube-dl tool (Download). It can download much more than just YouTube. It'll auto-download each segment then combine everything with FFmpeg then discard the parts. There is a good chance it supports the site you want to download from natively, and you don't even need to do step #1.
If you find a site that is stubborn and you run into 403 errors... Telerik Fiddler to the rescue. It can catch and save anything transmitted (such as the video file) as it acts as a local proxy. Everything you see/hear can be downloaded, unless it's DRM content like Spotify.
注意:在窗口中,您可以使用“命令提示符”或创建批处理文件使用youtube-dl.exe。即
谢谢
我刚刚想出了一个通用的解决方案,这应该适用于大多数网站。
我只在Chrome上尝试了这个方法,但这个方法应该适用于任何其他浏览器,因为Dev Tools在它们中几乎是相同的。
步骤:
Open the browser's Dev Tools (usually F12, or Ctrl-Shift-I, or right-click and then Inspect in the popup menu) on the page with the video you are interested in.
Go to Network tab and then reload the page. The tab will get populated with a list of requests (may be up to a hundred of them or even more).
Search through the names of requests and find the request with .m3u8 extension. There may be many of them, but most likely the first or largest is the one you are looking for. It may have any name, e.g. playlist.m3u8.
Click its name to open the request. Under the Headers subsection you will see request's full URL in the Request URL field. Copy it.
Extract the video from m3u8. There are many ways to do it, I'll give you those I tried, but you can google more by "download video from m3u8".
Option 1. If you have VLC player installed, feed the URL to VLC using the "Open Network…" menu option. I'm not going to go into details on this part here, there are a number of comprehensive guides in many places, for example, here. If the page doesn't work, you can always google another one by "vlc download online video".
Option 2. If you are more into command line, use FFMPEG or your own script, as directed in this SuperUser question.