我正在尝试使用 src url 下载视频blob:https%3A//www.youtube.com/23aea5c8-9ae2-40dc-9417-e675ea99b386
。
是否有一个可以遵循的流程来下载所有此类视频?
答案1
我找到了一种方法来下载视频(blob url
阅读Vimeo
这里我明白该怎么做了。我在这里写下简单的步骤。我使用的是 Google Chrome:
- 打开
More Tools
→Developer Tools
检查视频标签中是否有如下内容:
<video preload="" src="blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"></video>
- 复制 iframe 标签的 src(如果有),
http://player.vimeo.com/video/XYZ
如果找到,则可以直接转到第 7 点,否则请按照步骤 4、5、6 进行操作。 https://skyfire.vimeocdn.com/.../master.json?base64_init=1
现在在页面内查找这个字符串(使用开发人员视图),你应该在 javascript 函数中找到它,如下所示:(function(e,a){var t={"cdn_url":"https://f.vimeocdn.com","view":1,"request":{"files":{"dash":{"origin":"gcs","url":"https://48skyfiregce-a.akamaihd.net/.../master.json?base64_init=1","cdn":"
在新的 Chrome 选项卡上复制 url 字段内的链接,例如
https://48skyfiregce-a.akamaihd.net/.../master.json?base64_init=1
使用浏览器打开它,它将打开一个如下 json 文件:{ "clip_id": XYZ, "base_url": "../", "video": [ { ... ... ...
现在用你的 id 编写一个 url,
XYZ
如下所示:https://player.vimeo.com/video/XYZ
- 将视频标签内部替换
blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
为最后的 URL(在上一步#6 中创建的 URL)。 现在您会注意到视频标签内的 src 字段神奇地发生了变化(如果没有,请多次尝试步骤 7)...
<video preload="none" src="https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg"></video>
使用该新链接直接下载,如下所示: https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg
答案2
<video src="blob:https://www.example.tv/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
<source src="https://cdn.example.tv/api/media/tv/xyzxyz/index" type="application/x-mpegurl">
</video>
我也在blob:
中设置了 URL video/@src
,但在播放过程中观看Developer tools
>Network
后发现那video/source/@src
是播放列表的 URL m3u8
。
m3u8
可以通过以下任一方式轻松下载支持的视频:
ffplay -i "https://cdn.example.tv/api/media/tv/xyzxyz/1080/index.m3u8"
ffmpeg -i "https://cdn.example.tv/api/media/tv/xyzxyz/1080/index.m3u8" -codec copy file.mkv
tl;dr - blob URL 听起来像是您想要获取的二进制文件,但可能有更简单的方法来获取视频。只需在播放视频时查看 Dev 工具中的“网络”选项卡,即可查看您实际获取的内容。
答案3
这个答案是关于 Twitter URL 的 -
- 右键单击视频,然后单击“检查元素”-
你会发现这样的代码
<div id="playerContainer" class="player-container full-screen-enabled" data-config="{"is_360":false,"duration":28617,"scribe_widget_origin":true,"heartbeatEnabled":true,"video_url":"https:\/\/video.twimg.com\/ext_tw_video\/844504104512749568\/pu\/pl\/e91Du5N2TZ09ZaW_.m3u8","disable_embed":"0","videoInfo":{"title":null,"description":null,"publisher":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_normal.jpg"}},"cardUrl":"https:\/\/t.co\/SdSorop3uN","content_type":"application\/x-mpegURL","owner_id":"14120461","looping_enabled":true,"show_cookie_override_en":true,"visit_cta_url":null,"scribe_playlist_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","source_type":"consumer","image_src":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","heartbeatIntervalInMs":5000.0,"use_tfw_live_heartbeat_event_category":true,"video_loading_timeout":45000.0,"status":{"created_at":"Wed Mar 22 11:05:14 +0000 2017","id":844505243538931714,"id_str":"844505243538931714","text":"Took my Goddaughter to meet the pope. She stole his hat! https:\/\/t.co\/SdSorop3uN","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":844504104512749568,"id_str":"844504104512749568","indices":[57,80],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","url":"https:\/\/t.co\/SdSorop3uN","display_url":"pic.twitter.com\/SdSorop3uN","expanded_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","type":"photo","sizes":{"small":{"w":340,"h":604,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":576,"h":1024,"resize":"fit"},"medium":{"w":576,"h":1024,"resize":"fit"}}}]},"source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"show_cookie_override_all":true,"video_session_enabled":false,"media_id":"844504104512749568","view_counts":null,"statusTimestamp":{"local":"4:05 AM - 22 Mar 2017"},"media_type":1,"user":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_bigger.jpg"},"watch_now_cta_url":null,"tweet_id":"844505243538931714"}" data-source-type="consumer">
2.将上述代码复制粘贴到 notepad++ 中。将所有"
和"
和\/
wth/
在 notepad++ 中。(使用 CTRL+H)
你会得到类似
{
"is_360": false,
"duration": 28617,
"scribe_widget_origin": true,
"heartbeatEnabled": true,
"video_url": "https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8",
"disable_embed": "0",
"videoInfo": {
"title": null,
"description": null,
"publisher": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_normal.jpg"
}
},
"cardUrl": "https://t.co/SdSorop3uN",
"content_type": "application/x-mpegURL",
"owner_id": "14120461",
"looping_enabled": true,
"show_cookie_override_en": true,
"visit_cta_url": null,
"scribe_playlist_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"source_type": "consumer",
"image_src": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"heartbeatIntervalInMs": 5000.0,
"use_tfw_live_heartbeat_event_category": true,
"video_loading_timeout": 45000.0,
"status": {
"created_at": "Wed Mar 22 11:05:14 +0000 2017",
"id": 844505243538931714,
"id_str": "844505243538931714",
"text": "Took my Goddaughter to meet the pope. She stole his hat! https://t.co/SdSorop3uN",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": [],
"media": [{
"id": 844504104512749568,
"id_str": "844504104512749568",
"indices": [57, 80],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"url": "https://t.co/SdSorop3uN",
"display_url": "pic.twitter.com/SdSorop3uN",
"expanded_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"type": "photo",
"sizes": {
"small": {
"w": 340,
"h": 604,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 576,
"h": 1024,
"resize": "fit"
},
"medium": {
"w": 576,
"h": 1024,
"resize": "fit"
}
}
}]
},
"source": "\u003ca href=\"http://twitter.com/download/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c/a\u003e",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
"show_cookie_override_all": true,
"video_session_enabled": false,
"media_id": "844504104512749568",
"view_counts": null,
"statusTimestamp": {
"local": "4:05 AM - 22 Mar 2017"
},
"media_type": 1,
"user": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_bigger.jpg"
},
"watch_now_cta_url": null,
"tweet_id": "844505243538931714"
}
从上面的 JSON 格式中,查看值视频网址
https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8
这里的问题是,2016 年 8 月 1 日之后,Twitter 不再使用 .mp4 视频,而是转换为新的 HLS 自适应流媒体格式,具有.m3u8文件扩展名。
.m3u8 文件基本上只是一个文本文件包装器,它们非常小(300-500 字节),当您使用文本编辑器打开它们时,它们包含指向不同视频大小的链接
- 在 notepad++ 中打开文件 m3u8,它将包含如下代码
EXTM3U EXT-X-独立段 EXT-X-流-INF:程序ID=1,带宽=256000,分辨率=180x320,CODECS="mp4a.40.2,avc1.42001f" /ext_tw_video/844504104512749568/pu/pl/180x320/_Z42SY5zwMlLdFYx.m3u8 EXT-X-STREAM-INF:程序ID=1,带宽=832000,分辨率=360x640,CODECS="mp4a.40.2,avc1.42001f" /ext_tw_video/844504104512749568/pu/pl/360x640/-Phfjbbx2yinirLi.m3u8
- 根据你的分辨率需求,从上面复制相应的链接。重复相同的步骤,直到你得到.ts文件。下载.ts文件(视频文件)。
答案4
这是来自的 blob 视频Facebook. 需要最低限度的技术专长。
- 在视频上,点击右上角三个点并点击'复制链接'。链接将如下所示: https://fb.watch/1F3iBykxNf/
- 在浏览器中打开 URL。
- 现在您可以右键单击视频热区。 右键单击视频命中框,然后点击'复制当前时间的视频 URL'。URL 看起来将类似于以下内容: https://www.facebook.com/686268088027568/videos/784217565526864/?t=0
- 将该 URL 粘贴到https://fbdown.net/。我能够获得 mp4 视频。
我与 fbdown.net 没有任何关系。