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

youtube-dl raise RegexNotFoundError('Unable to extract %s' % _name) #22939

Open
vdjkelly opened this issue Nov 1, 2019 · 2 comments
Open

youtube-dl raise RegexNotFoundError('Unable to extract %s' % _name) #22939

vdjkelly opened this issue Nov 1, 2019 · 2 comments

Comments

@vdjkelly
Copy link

@vdjkelly vdjkelly commented Nov 1, 2019

Checklist

  • I'm reporting a broken site support issue
  • [ x] I've verified that I'm running youtube-dl version 2019.10.29
  • 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 bug reports including closed ones
  • [ x] I've read bugs section in FAQ

Verbose log

youtube-dl -o "%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" --sleep-interval 22 --all-subs --cookies cookies.txt -ciw --verbose https://platzi.com/clases/firebase-web/ --username ### --password ###
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-o', '%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s', '--sleep-interval', '22', '--all-subs', '--cookies', 'cookies.txt', '-ciw', '--verbose', 'https://platzi.com/clases/firebase-web/', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2019.10.29
[debug] Python version 3.6.1 (CPython) - Windows-10-10.0.18362-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[PlatziCourse] Downloading login page
[PlatziCourse] Logging in
[PlatziCourse] firebase-web: Downloading webpage
ERROR: Unable to extract data; 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 "c:\laragon\bin\python\python-3.6.1\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "c:\laragon\bin\python\python-3.6.1\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "c:\laragon\bin\python\python-3.6.1\lib\site-packages\youtube_dl\extractor\platzi.py", line 190, in _real_extract
    self._search_regex(r'data\s*=\s*({.+?})\s*;', webpage, 'data'),
  File "c:\laragon\bin\python\python-3.6.1\lib\site-packages\youtube_dl\extractor\common.py", line 1005, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract data; 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.

Description

@vdjkelly
Copy link
Author

@vdjkelly vdjkelly commented Nov 1, 2019

change code
props = self._parse_json( self._search_regex(r'data\s*=\s*({.+?})\s*;', webpage, 'data'), course_name)['initialProps']

by
props = self._parse_json( self._search_regex(r'initialData\s*=\s*({.+?})\s*;', webpage, 'initialData'), course_name)['initialState']

Fix file platzi.py

Excuse me, my English, I don't know it at all

@Strife89
Copy link

@Strife89 Strife89 commented Nov 4, 2019

I just encountered the same error.

Output: https://pastecode.xyz/view/2b4a21b3

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
2 participants
You can’t perform that action at this time.