In newly Post I made about youtube-dl I was left with a question, if when downloading a video with youtube-dl it puts the title of the video from YouTube to the file, how do you do it? How is it possible for applications to extract data from videos posted on online video or movie sites?
I imagine parsing the HTML code, which means that it reads all the HTML up to where it says "title" or something like that, and that text (the video title) is what gives the file its name. Well, it does (or at least I think so), but, here is my question, How to parse a page to get video data from the terminal?
what it is an excellent option to use!
Take for example the official video of Movistar Unboxing ZTE Open. but first we will install what:
In Debian, Ubuntu or derivatives, a:
sudo apt-get install quvi
In ArchLinux or derivatives:
sudo pacman -S quvi
Once installed, we go on to use it.
Taking as an example the URL of the video that I put above, we are going to extract its information:
quvi dump http://www.youtube.com/watch?v=Wjs3_hY29Q8
We will see all the information related to the video, for example, its title, URL, ID of the video on the site, duration in milliseconds, thumbnail, format ... etc:
Also, using the command grep As you can see, we can filter the output and show only what we want 😉
Ah, also, if they do a man quvi-dump It will show you many options for this parameter, since it allows you to save that information in a json, xml, check subtitles, etc.
That's what the parameter does dump, shows us video information, but, What to use if i want to save the video on my computer?
To save it we use the parameter get, as simple as:
quvi get http://www.youtube.com/watch?v=Wjs3_hY29Q8
… Don't look at the download speed hehe.
In the latest versions of quvi you cannot do the following, but in versions like the one in Debian you can see the video directly without downloading it, you can see how in the Wiki of Arch. Yes, as you read, in the ArchLinux Wiki there is something wrong 😀
Well, this is all.
I really recommend that you read the help for each parameter, you will find a lot of information and interesting options.