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

[Crunchyroll] Error: Unable to extract video_title #25047

Closed
mondxp opened this issue Apr 28, 2020 · 12 comments
Closed

[Crunchyroll] Error: Unable to extract video_title #25047

mondxp opened this issue Apr 28, 2020 · 12 comments

Comments

@mondxp
Copy link

@mondxp mondxp commented Apr 28, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • 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

/usr/bin/youtube-dl --write-sub --sub-lang deDE --netrc --verbose -o '%(series)s - E%(episode_number)02d - %(episode)s.%(ext)s' -f bestvideo+bestaudio/best -- https://www.crunchyrol
l.com/de/that-time-i-got-reincarnated-as-a-slime/episode-24-black-and-the-mask-780741
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--write-sub', '--sub-lang', 'deDE', '--netrc', '--verbose', '-o', '%(series)s - E%(episode_number)02d - %(episode)s.%(ext)s', '-f', 'bestvideo+bestaudio/best', '--', 'https://www.crunchyroll.com/de/that-time-i-got-reincarnated-as-a-slime/episode-24-black-and-the-mask-780741']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.8.2 (CPython) - Linux-4.15.0-96-generic-x86_64-with
[debug] exe versions: ffmpeg 4.2.1, ffprobe 4.2.1
[debug] Proxy map: {}
[crunchyroll] Downloading login page
[crunchyroll] Logging in
[crunchyroll] 780741: Downloading webpage
ERROR: Unable to extract video_title; 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 "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/crunchyroll.py", line 444, in _real_extract
    video_title = self._html_search_regex(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 1014, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/lib/python3.8/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 video_title; 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

Crunchyroll has updated their website, breaking the video_title regex.
Changing the regex on line 445 of the crunchyroll extractor should fix this:

r'(?s)<h1[^>]*>((?:(?!<h1).)*?<span[^>]+itemprop=["\']title["\'][^>]*>(?:(?!<h1).)+?)</h1>'

to

r'(?s)<h1[^>]*>((?:(?!<h1).)*?<span[^>]+itemprop=[\"\']name[\"\'][^>]*>(?:(?!<h1).)+?)</h1>'
@TravisDavis-ops
Copy link

@TravisDavis-ops TravisDavis-ops commented Apr 28, 2020

Much love thanks for the Quick fix

@marlenexxx
Copy link

@marlenexxx marlenexxx commented Apr 29, 2020

wahh.. thanks for the fix :D

@werewolf004
Copy link

@werewolf004 werewolf004 commented Apr 29, 2020

Thanks for the Fix, for user who using .exe file under windows, need to wait a new .exe generated by dev ?

@LameLemon
Copy link
Contributor

@LameLemon LameLemon commented Apr 29, 2020

The regex currently does not pass test 2.
Expected title

KONOSUBA -God's blessing on this wonderful world! 2 Episode 1 – Give Me Deliverance From This Judicial Injustice!

Title from regex

KONOSUBA -God's blessing on this wonderful world! Episode 1 – Give Me Deliverance From This Judicial Injustice!
@VadzimTarasiuk
Copy link

@VadzimTarasiuk VadzimTarasiuk commented Apr 29, 2020

Same issue. Tried fix from PR above. Works like charm so far.
Thanks dude :)

@werewolf004
Copy link

@werewolf004 werewolf004 commented Apr 29, 2020

Same issue. Tried fix from PR above. Works like charm so far.
Thanks dude :)

Cool, now just need to wait new .exe :)

@mondxp
Copy link
Author

@mondxp mondxp commented Apr 29, 2020

Thanks for the fix LameLemon :) Works great!

@mondxp
Copy link
Author

@mondxp mondxp commented Apr 29, 2020

Marking it as closed because it seems to work now

@mondxp mondxp closed this Apr 29, 2020
@werewolf004
Copy link

@werewolf004 werewolf004 commented Apr 30, 2020

Marking it as closed because it seems to work now

And how to get the .exe file with the fix ? It seems .exe is the same actually

@LameLemon
Copy link
Contributor

@LameLemon LameLemon commented Apr 30, 2020

@werewolf004 My PR has to be tested and merged by the maintainers of youtube-dl first then it will be added to the next release. As of yet none of them have looked at it.

@VadzimTarasiuk
Copy link

@VadzimTarasiuk VadzimTarasiuk commented Apr 30, 2020

And how to get the .exe file with the fix ?

I cloned the repo and builded my own binary from source code. I guess you can make it on win as well.
Just make sure you have updated crunchyroll extractor file when build the binary.

@DiamondMiner88
Copy link

@DiamondMiner88 DiamondMiner88 commented Apr 30, 2020

I cloned the repo and builded my own binary from source code.

How do you build binaries? I haven't done it before so i have no idea.
Windows preferably but I can switch to linux if that's not possible

EDIT: nvm i did it in a very stupid way but it works so hey

@OhNiice OhNiice mentioned this issue May 1, 2020
5 of 5 tasks complete
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.

7 participants
You can’t perform that action at this time.