youtube-dl: Cartoon Network - AttributeError: 'NoneType' object has no attribute 'groups'
Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
- Put an
xinto all the boxes [ ] relevant to your issue (like this:[x]) - Use the Preview tab to see what your issue will actually look like
Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.08.04. If it’s not, read this FAQ entry and update. Issues with outdated version will be rejected.
- [x ] I’ve verified and I assure that I’m running youtube-dl 2018.08.04
Before submitting an issue make sure you have:
- [x ] At least skimmed through the README, most notably the FAQ and BUGS sections
- [ x] Searched the bugtracker for similar issues including closed ones
- [x ] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
What is the purpose of your issue?
- [x ] Bug report (encountered problems with youtube-dl)
- Site support request (request for adding support for a new site)
- Feature request (request for a new functionality)
- Question
- Other
The following sections concretize particular purposed issues, you can erase any section (the contents between triple —) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.cartoonnetwork.com/video/teen-titans/divide-and-conquer-episode.html']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.08.04
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: none
[debug] Proxy map: {}
[CartoonNetwork] divide-and-conquer: Downloading webpage
Traceback (most recent call last):
File "__main__.py", line 19, in <module>
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\__init__.py", line 472, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\__init__.py", line 462, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\YoutubeDL.py", line 2001, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\YoutubeDL.py", line 792, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\extractor\common.py", line 502, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpckoq891b\build\youtube_dl\extractor\cartoonnetwork.py", line 28, in _real_extract
AttributeError: 'NoneType' object has no attribute 'groups'
If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
Description of your issue, suggested solution and other information
Videos from Cartoon Network do not work. It says AttributeError: ‘NoneType’ object has no attribute ‘groups’.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 33
@tgray #17271 is a PR for a branch where this was fixed. It hasn’t been merged since it seems the main collaborator doesn’t look at a PR more than once. If you want to use CN you’ll have to pull that branch.
I found that problem too! I was kinda waiting for you to bring it up. It’s not my fault whatsoever. The Problem is ffmpeg. The last 10 minutes of the show has a different frame rate then the whole show. I did find a fix a few days ago (it requests windows, I think). Just make sure you don’t have visual studio (if you don’t know what that is don’t worry about it).
Running into this as well. May take a stab at creating a fix but I’ll have to familiarize myself with how youtube-dl works.
@tgray this is not fixed yet…@TheDaChicken wrote a patch (#17271), but it’s not being accepted by @dstftw for some reason.
I went onto the PR thread to try to beg for some clarification, but it’s not going to get a productive response; here’s my (SPECULATIVE) attempt at interpreting the back-and-forth from that bizarre thread:
CartoonNetworkhandler broken for someone to independently fix (along with its auth code) later on down the road will actually result in less wasted coder-hours in the long run.Was this ever fixed?
Ya, it’s working on my end without TV Provider login. Weird. I am going to try another way and see if that works. Now, little explaining here is that auth and unauth is what CartoonNetwork calls when it needs a TV provider, and when it doesn’t it unauth, in the JavaScript code of the website, so I have to do it pick it up and get it as a variable.
EDIT: Ok! Now try uninstall youtube-dl and then try installing from the fork again. I really hope this now works for you. Now this isn’t the first time this happened so.
Ok! Now try it again. Sorry, about that. You shouldn’t need to use “–ap-mso=unauth” you should be able to just type the url without needing any TV Provider login or any mso.
It seems my code thinks you need to login to a TV Provider. This could be easily fixed. By changing “auth_required” to nothing, as I know of. I will fix this. Make sure your using the latest version of my code, since I didn’t run into this problem.
It seems that your still using the old version of the code. I don’t have “id_type, video_id = re.search(r”_cnglobal.cvp(Video|Title)Id\s*=\s*‘([^’]+)';“, webpage).groups()” in my code. Also, My Pull request hasn’t been accepted yet, but if you go to my fork version of youtube-dl you should be able to download it or if you go to the pull request you can view the code and change the code to the cartoonnetwork working one.
Your Welcome! Anyway, I have found a fix to that and I kept testing and it seems to be working! Look at that pull request again, it has been updated.
Oh, that error message, it’s not because of me. It’s means that your trying to view something that needs you to login with your tv provider to view. Here is how to login: https://github.com/rg3/youtube-dl#adobe-pass-options. If you don’t have a tv provider you can view/download free episode’s that are full unlocked or clips unless I can fix out how to bypass that.
EDIT: I have found the problem and is not working when using that adobe pass. I will find a fix. Werid that I kept trying it out and it working and now not working but as of right now, you can only view stuff that is fully unlocked without a login.
I have the same problem too but I found a fix and created a Pull request on the issue but most of it isn’t my code and was from a different pull request that wasn’t accepted or maybe be accepted.