Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract all the current video files and its address in the web page with js?

 var imgs=document.images.length;

It can extract all the images on the web page.
How extract all the flv files whose suffix is flv such as sample.flv in the web page with js?Not all the flv files on my local directory but web page.
The plugin Video DownloadHelper in firefox can get the current mp4 file.
enter image description here Why my js code can't do the same task?

var Links = document.querySelectorAll('a[href$=".mp4"]');
console.log(Links);

enter image description here

How to extract the current video files with js such as the plugin Video DownloadHelper in firefox?

like image 545
showkey Avatar asked Nov 02 '16 11:11

showkey


People also ask

How do I find the HTML URL?

The website's URL is in the address bar, which is usually at the top of your web browser window. This bar may be at the bottom of the window in Chrome on some Androids. Copy the URL. If you want to paste the URL into a message, post, or another app, you can copy and paste it from the address bar.


1 Answers

Yahoo Movies use blob stream to transfer video data. There are no direct mp4/flv links anywhere, nor can you get such links directly. The src of the <video> tag refers to a blob stream link:

<video class="yvp-html5-video" preload="" id="2413371376" src="blob:https://www.yahoo.com/1dfafd99-a1ff-4cc8-bcff-255e69db9977"></video>

When you hit to download MP4 from Video DownloadHelper, the plugin actually reads the blob stream and writes it to disk in an MP4 file. It doesn’t download a MP4 file. If you try to Copy URL, you’ll get something like this to your clipboard:

https://roarack01.vpg.cdn.yimg.com/yahoomovies/61fb473f-04a2-381e-b2ae-9496dfba5e66_VYtMtix1DscECbXMT9tHT7yf2P9BZF-mRCMjBejFgALFHl7NSm1ZXPOMICAOr949v2xUgEASYLw-_1_0_vtt.m3u8?a=yahoomovies&ib=sapi&m=application%2fvnd.apple.mpegurl&mr=0&ns=c+i+ci+cii&vid=61fb473f-04a2-381e-b2ae-9496dfba5e66&x=1479599999&s=370695a7063b6aae06fb7f537c85773a

You can record a blob stream, but it’s not an easy task.

For more details on video blob stream, check these links:

What is blob in the <video src=blob:url>?

Export HTML5 blob video to MP4

W3C Media Source Extensions

A URL for Blob and File reference

like image 102
Christos Lytras Avatar answered Oct 01 '22 13:10

Christos Lytras