ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.32k stars 10.03k forks source link

[francetv] live messages are not supported #27683

Open B0pol opened 3 years ago

B0pol commented 3 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.francetvinfo.fr/live/message/5ff/497/388/256/bf4/7a2/011/425.html']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.01.03
[debug] Python version 3.9.1 (CPython) - Linux-5.9.16-200.fc33.x86_64-x86_64-with-glibc2.32
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
[debug] Proxy map: {}
[francetvinfo.fr] 425: Downloading webpage
ERROR: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 803, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 824, in __extract_info
    ie_result = ie.extract(url)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/francetv.py", line 399, in _real_extract
    video_id = self._search_regex(
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 1010, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Live messages are not supported. They may contain videos, such as this one https://www.francetvinfo.fr/live/message/5ff/497/388/256/bf4/7a2/011/425.html

and you can access the live from https://www.francetvinfo.fr/en-direct/ or https://www.francetvinfo.fr/live/ It may also be geo-restricted (France, maybe Europe, maybe no-restrictions?)

fossdd commented 3 years ago

If I understanding right, is FranceTV Live messages just another form of showing FranceTV Video in an Embed.

In Germany I can watch it from my browser.

B0pol commented 3 years ago

Yes basically

Mennaruuk commented 3 years ago

The linked video (https://www.francetvinfo.fr/live/message/5ff/497/388/256/bf4/7a2/011/425.html) has an iFrame (https://embedftv-a.akamaihd.net/ced663cc130b667f20115ab89ea4bcf0). I opened it and it played here in the United States (so I don't know the extent of the possible geo-restriction on this video). This is the error I get when trying to download the embedded video:

C:\Users\Menna\Downloads>youtube-dl --verbose "https://embedftv-a.akamaihd.net/ced663cc130b667f20115ab89ea4bcf0"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://embedftv-a.akamaihd.net/ced663cc130b667f20115ab89ea4bcf0']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.01.24.1
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[generic] ced663cc130b667f20115ab89ea4bcf0: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ced663cc130b667f20115ab89ea4bcf0: Downloading webpage
[generic] ced663cc130b667f20115ab89ea4bcf0: Extracting information
ERROR: Unsupported URL: https://embedftv-a.akamaihd.net/ced663cc130b667f20115ab89ea4bcf0
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp_eeieglg\build\youtube_dl\YoutubeDL.py", line 806, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp_eeieglg\build\youtube_dl\YoutubeDL.py", line 827, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp_eeieglg\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp_eeieglg\build\youtube_dl\extractor\generic.py", line 3467, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://embedftv-a.akamaihd.net/ced663cc130b667f20115ab89ea4bcf0

One (painful) workaround is to open up Network in Inspect Element on the embeded video's page. Find/search for hdfauthftv. You'll see a URL like this: 4c56ffc5-1ee6-4049-9511-165cca5fa138 sketchpad-layerExport Double click it. Copy the URL in the JSON file, then paste it into youtube-dl: image

youtube-dl "https://cloudingest.ftven.fr/2453eb4b74ff5/NI_1701713_monde_TA.ism/manifest.mpd?hdnea=exp=1612236135~acl=%2f2453eb4b74ff5%2fNI_1701713_monde_TA.ism*~hmac=ee66917d70f56647c3184004b1a5c93825c63e7b774959886464640d18ddd355" (This is the URL I got, but yours will be certainly different.)

That's not all, folks, though: you'll get two files: one MP4 (video stream), another M4A (audio stream). So you'll need to mux 'em with FFMPEG or another muxing tool.

B0pol commented 3 years ago

There are also other embeds from other websites (twitter, giphy…) and the description should be the message