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.58k stars 10.05k forks source link

support for 9news #12153

Open sant527 opened 7 years ago

sant527 commented 7 years ago

I want to download video from 9news link "http://www.9news.com/news/local/father-worries-about-immigration-status/408808900"

i tried youtube-dl.

% youtube-dl -v -F "http://www.9news.com/news/local/father-worries-about-immigration-status/408808900"                                            :(
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-F', 'http://www.9news.com/news/local/father-worries-about-immigration-status/408808900']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.12.22
[debug] Python version 3.5.1 - Linux-4.6.2-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 408808900: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 408808900: Downloading webpage
[generic] 408808900: Extracting information
ERROR: Unsupported URL: http://www.9news.com/news/local/father-worries-about-immigration-status/408808900
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 694, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 358, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/generic.py", line 2453, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.9news.com/news/local/father-worries-about-immigration-status/408808900
sufuf3 commented 7 years ago

Hi @yan12125 May I try this? As this issue, with URL (http://www.9news.com/news/local/father-worries-about-immigration-status/408808900) I found that the video of 9news stores the URL in http://interactive.tegna-media.com/.

The real video URL is http://interactive.tegna-media.com/video/embed/embed.html?id=2512310&type=video&title=Father%20worries%20about%20immigration%20status&site=73&playerid=6918249996581&dfpid=32805352&dfpposition=Video_prestream_external%C2%A7ion=home

So should I create a file as youtube_dl/extractor/9news.py or youtube_dl/extractor/interactive.py?

Thank you.

yan12125 commented 7 years ago

Apparently there's already a proposal. (#12172) It requires fixes while the author has not responded. You may want to pick that PR and fix it.

sufuf3 commented 7 years ago

Sorry about this. I didn't notice the author sent the PR of this issue. I'll search another issue try to send a PR of this repo.

antdude commented 5 years ago

What's the status of this? FYI: $ youtube-dl -U youtube-dl is up-to-date (2019.04.17) (SopelPython3)ant@ANTian:~/Downloads/videos$ clear ; youtube-dl -v "https://www.9news.com/video/weather/weather-colorado/ranch-animals-nearly-buried-in-colorado-blizzard/73-1d313d05-79b8-4df9-a7b4-425cc06fd242" [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'https://www.9news.com/video/weather/weather-colorado/ranch-animals-nearly-buried-in-colorado-blizzard/73-1d313d05-79b8-4df9-a7b4-425cc06fd242'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.04.17 [debug] Python version 3.4.2 (CPython) - Linux-3.16.0-8-amd64-x86_64-with-debian-8.11 [debug] exe versions: ffmpeg 3.2.10-1, ffprobe 3.2.10-1, rtmpdump 2.4 [debug] Proxy map: {} [generic] 73-1d313d05-79b8-4df9-a7b4-425cc06fd242: Requesting header WARNING: Falling back on generic information extractor. [generic] 73-1d313d05-79b8-4df9-a7b4-425cc06fd242: Downloading webpage [generic] 73-1d313d05-79b8-4df9-a7b4-425cc06fd242: Extracting information ERROR: Unsupported URL: https://www.9news.com/video/weather/weather-colorado/ranch-animals-nearly-buried-in-colorado-blizzard/73-1d313d05-79b8-4df9-a7b4-425cc06fd242 Traceback (most recent call last): File "/home/ant/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info ie_result = ie.extract(url) File "/home/ant/bin/youtube-dl/youtube_dl/extractor/common.py", line 529, in extract ie_result = self._real_extract(url) File "/home/ant/bin/youtube-dl/youtube_dl/extractor/generic.py", line 3320, in _real_extract raise UnsupportedError(url) youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.9news.com/video/weather/weather-colorado/ranch-animals-nearly-buried-in-colorado-blizzard/73-1d313d05-79b8-4df9-a7b4-425cc06fd242