The youtube-dl parser for BFMTV* is broken as of 01/2021, this is an implementation of moimadmax method as explained in his comment that works for single item and batch download.
You can now eaisily watch your favorite BFMTV* replay programs in VLC or download them to view them while offline (during a plane travel for instance)
*Works for their whole network: BFMTV, BFM Business, RMC, RMC Sport, RMC Découverte, RMC Story, BFM Régions, BFM Bourse
Bookmarklet | Bash Shell Script |
---|---|
For single use | For batch download |
- several solutions for each use case
- error reporting (so that I know when an update is needed)
- argument input with STDIN, as a batch text file (one line = one bfmtv link) or as argument
- bookmarklet and simple js grabber for easy tinkering in your web browser
- add BFM icons in the README
- error reporting on the js version (not an emergency as it is obvious to the user when he doesn't get the link he asked for)
- tell someone who can repair the native youtubedl parser
This bookmarklet displays the youtube-dl command to type to download this program and it's URL (useful to play it in VLC mpv... or use another extractor). Double click on the line you want and press Ctrl+C (Cmd+C on mac) to copy in your clipboard.
Just select the code below (triple click works) and drop it on your bookmark bar (disabled by default on firefox --- > Customize > Toolbars (in the bottom) > tick Personal bar)
For convenience, rename it to BFMtoURL by right clicking the new bookmark.
javascript:void((function(){let iddecomptea=document.querySelectorAll('[data-account]')[0];if(iddecomptea===undefined){var iddecompte=document.querySelectorAll('[accountid]')[0].getAttribute("accountid")}else{var iddecompte=iddecomptea.getAttribute("data-account")}let iddevideo=document.querySelectorAll('[data-video-id]')[0].getAttribute("data-video-id");let urldevideo="http://players.brightcove.net/"+iddecompte+"/default_default/index.html?videoId="+iddevideo;alert('youtube-dl --write-info-json '+urldevideo+'\r\n\r\nURL:\r'+urldevideo)})());
Download BFMtoURL.sh, go to the directory of the download with a terminal and do sudo chmod +x
to make it executable, you can now use it as such.
The current shell implementation outputs an empty line for unavailable videos (and if an error or update of the site should happen on their end), this behaviour is easily editable (three of the echo ""
to comment with #
(l. 15,30,46)).
./BFMtoURL.sh https://www.bfmtv.com/paris/replay-emissions/bonjour-paris/comment-est-transporte-le-vaccin-une-entreprise-de-rueil-malmaison-a-mis-au-point-une-boite-refrigeree_VN-202101060214.html
you can easily create an alias for the script to get the url or give it to youtubedl, if the .sh is in your home directory (~), type:
alias bfmtv="bash ~/BFMtoURL.sh"
to create a temporary alias for the script, you may now type bfmtv
in the shell instead, to make it permanent, see: https://www.tecmint.com/create-alias-in-linux/#Creating%20Permanent%20Aliases
./BFMtoURL.sh https://www.bfmtv.com/paris/replay-emissions/bonjour-paris/comment-est-transporte-le-vaccin-une-entreprise-de-rueil-malmaison-a-mis-au-point-une-boite-refrigeree_VN-202101060214.html
./BFMtoURL.sh filename or /path/to/file
somecommand* | ./BFMtoURL.sh
echo "https://www.bfmtv.com/paris/replay-emissions/bonjour-paris/comment-est-transporte-le-vaccin-une-entreprise-de-rueil-malmaison-a-mis-au-point-une-boite-refrigeree_VN-202101060214.html" | ./BFMtoURL.sh
*the command must output a single URL at a time
You'll need Absolute enable right click and copy for Firefox link or a similar Chrome/Chromium extension.
Go to the page you want the video from and press F12, type or paste the code here in the console tab, it'll return the id, link or complete youtube-dl command to get your video.
document.querySelectorAll('[data-video-id]')[0].getAttribute("data-video-id");
console.log("http://players.brightcove.net/"+document.querySelectorAll('[accountid]')[0].getAttribute("accountid")+"/default_default/index.html?videoId="+document.querySelectorAll('[data-video-id]')[0].getAttribute("data-video-id"));
console.log("youtube-dl http://players.brightcove.net/"+document.querySelectorAll('[accountid]')[0].getAttribute("accountid")+"/default_default/index.html?videoId="+document.querySelectorAll('[data-video-id]')[0].getAttribute("data-video-id"));
console.log("youtube-dl --write-info-json http://players.brightcove.net/"+document.querySelectorAll('[accountid]')[0].getAttribute("accountid")+"/default_default/index.html?videoId="+document.querySelectorAll('[data-video-id]')[0].getAttribute("data-video-id"));