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

[brightcove] 'programmedContent' is None #7345

Closed pmer closed 3 days ago

pmer commented 9 years ago
$ python -m youtube_dl --verbose 'http://www.11alive.com/videos/news/local/2015/10/27/74703190/'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://www.11alive.com/videos/news/local/2015/10/27/74703190/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.02
[debug] Git HEAD: a230068
[debug] Python version 2.7.10 - Darwin-15.0.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8.1, ffprobe 2.8.1
[debug] Proxy map: {}
[generic] 74703190: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 74703190: Downloading webpage
[generic] 74703190: Extracting information
[generic] Brightcove video detected.
[download] Downloading playlist: VIDEO: All Three Angles of Spring Valley Incident
[generic] playlist VIDEO: All Three Angles of Spring Valley Incident: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[Brightcove] 4582511272001: Downloading webpage
[Brightcove] 4582511272001: Extracting information
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/pdm/Source/youtube-dl/youtube_dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "youtube_dl/YoutubeDL.py", line 1666, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "youtube_dl/YoutubeDL.py", line 672, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "youtube_dl/YoutubeDL.py", line 833, in process_ie_result
    extra_info=extra)
  File "youtube_dl/YoutubeDL.py", line 725, in process_ie_result
    extra_info=extra_info)
  File "youtube_dl/YoutubeDL.py", line 661, in extract_info
    ie_result = ie.extract(url)
  File "youtube_dl/extractor/common.py", line 290, in extract
    return self._real_extract(url)
  File "youtube_dl/extractor/brightcove.py", line 237, in _real_extract
    videoPlayer[0], query_str, query, referer=referer)
  File "youtube_dl/extractor/brightcove.py", line 266, in _get_video_info
    video_info = info['programmedContent']['videoPlayer']['mediaDTO']
TypeError: 'NoneType' object has no attribute '__getitem__'
pmer commented 9 years ago

The Brightcove URL extractor looks at the <meta> tag at the top of the page and finds the URL

http://c.brightcove.com/services/viewer/htmlFederated?isVid=1&isUI=1&playerID=2857340256001&autoStart=true&%40videoPlayer=4582511272001

That page is downloaded and its info extracted but it's missing a programmedContent section, which we need.

Fortunately, If we change the videoPlayer parameter in the above URL from 4582511272001 to ref%3A74703190 (where 74703190 is the basename of the URL given on the command line) then we get a valid programmedContent object.

pmer commented 9 years ago

Possible duplicate of https://github.com/rg3/youtube-dl/issues/3139

yinshiyi commented 4 days ago

The link provided is dead 'http://www.11alive.com/videos/news/local/2015/10/27/74703190/' here is an current example link 'https://www.11alive.com/video/news/local/food-bank-in-atlanta-seeing-increase-in-need-how-to-help/85-8c9c321a-f68f-40f5-90b5-a5740997e5d3' youtube-dl failed to download videos from 11alive.com

[debug] youtube-dl version 2021.12.17
[debug] Python version 3.12.2 (CPython) - macOS-14.5-arm64-arm-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[generic] 85-8c9c321a-f68f-40f5-90b5-a5740997e5d3: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 85-8c9c321a-f68f-40f5-90b5-a5740997e5d3: Downloading webpage
[generic] 85-8c9c321a-f68f-40f5-90b5-a5740997e5d3: Extracting information
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://www.11alive.com/video/news/local/food-bank-in-atlanta-seeing-increase-in-need-how-to-help/85-8c9c321a-f68f-40f5-90b5-a5740997e5d3'
[download] Destination: Food bank in Atlanta seeing increase in need _ How to help -85-8c9c321a-f68f-40f5-90b5-a5740997e5d3.unknown_video
[download] 100% of 202.82KiB in 00:00
pmer commented 4 days ago

Hi @yinshiyi, since youtube-dl is relatively dead, it might be better for us to move to https://github.com/yt-dlp/yt-dlp now.

dirkf commented 3 days ago

This is just a really antique issue that no-one ever closed. If the issue persists, especially with the latest nightly build, any concerned user is invited to open a new issue in the usual way. Thx @yinshiyi for noticing this.