Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[brightcove] 'programmedContent' is None #7345

Open
pmer opened this issue Nov 3, 2015 · 2 comments
Open

[brightcove] 'programmedContent' is None #7345

pmer opened this issue Nov 3, 2015 · 2 comments

Comments

@pmer
Copy link

@pmer pmer commented Nov 3, 2015

$ 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
Copy link
Author

@pmer pmer commented Nov 3, 2015

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
Copy link
Author

@pmer pmer commented Nov 3, 2015

Possible duplicate of #3139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.