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

Lego.com video downloading not working #23687

Closed
rayclwu opened this issue Jan 9, 2020 · 0 comments
Closed

Lego.com video downloading not working #23687

rayclwu opened this issue Jan 9, 2020 · 0 comments

Comments

@rayclwu
Copy link

@rayclwu rayclwu commented Jan 9, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.01.01
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log (original)

$ ./youtube-dl -v https://www.lego.com/en-us/kids/videos/ninjago/tvcomninjagovideoepisode-20-the-stone-army-ec27326a837c48198f415f7c5bd7fc89
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.lego.com/en-us/kids/videos/ninjago/tvcomninjagovideoepisode-20-the-stone-army-ec27326a837c48198f415f7c5bd7fc89']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.01
[debug] Python version 2.7.12 (CPython) - Linux-4.4.59+-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 2.7.1
[debug] Proxy map: {}
[LEGO] ec27326a837c48198f415f7c5bd7fc89: Downloading webpage
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./youtube-dl/__main__.py", line 19, in <module>
  File "./youtube-dl/youtube_dl/__init__.py", line 474, in main
  File "./youtube-dl/youtube_dl/__init__.py", line 464, in _real_main
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2018, in download
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
  File "./youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
  File "./youtube-dl/youtube_dl/extractor/lego.py", line 54, in _real_extract
AttributeError: 'NoneType' object has no attribute 'strip'

Verbose log (After fixing title retrieval)

$ python -m youtube_dl -v https://www.lego.com/en-us/kids/videos/ninjago/tvcomninjagovideoepisode-20-the-stone-army-ec27326a837c48198f415f7c5bd7fc89
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.lego.com/en-us/kids/videos/ninjago/tvcomninjagovideoepisode-20-the-stone-army-ec27326a837c48198f415f7c5bd7fc89']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.01
[debug] Git HEAD: 483b858d4
[debug] Python version 3.7.2 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[LEGO] ec27326a837c48198f415f7c5bd7fc89: Downloading webpage
WARNING: unable to extract contentUrl; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/YoutubeDL.py", line 2018, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/extractor/lego.py", line 60, in _real_extract
    content_url, 'video path', default=None)
  File "/Users/jlwu/Desktop/youtube-dl-src/youtube_dl/extractor/common.py", line 984, in _search_regex
    mobj = re.search(pattern, string, flags)
  File "/anaconda3/lib/python3.7/re.py", line 183, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

Description

Lego.com had been changed. All url in test cases no longer work (404)

The above error: AttributeError: 'NoneType' object has no attribute 'strip' is from title retrieval. It may be fixable by changing to title = self._html_search_meta('description', webpage)

However, after fixing title retrieval, it still failed (see 2nd log above)

It looks like lego.com had changed how it play video to the following:
<video class="vjs-tech" id="vjs_video_3_html5_api" tabindex="-1" autoplay="" src="blob:https://www.lego.com/f4cf2444-028c-c444-8e8a-05a9cdf9a9ee"></video>

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.