Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Cartoon Network - AttributeError: 'NoneType' object has no attribute 'groups' #17224
Comments
|
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. |
|
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. |
|
I tried using your pull request fix, but a different problem arose. It said "ERROR: Missing Authentication token". Is there a fix to that? Thanks. |
|
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. |
|
Thanks for all the help. The Adobe pass has not been working for me either. |
|
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. |
|
It works! Hopefully, youtube-dl accepts the pull request and updates it. |
|
Sorry to bring this up again, but it seems as though youtube-dl only records up to the 10-minute mark (where the first advertisement shows up). Is there a way to get past the ad? Is this the result of the code or should I be doing something different? Thanks. Edit: It seems as though, the last 10 minutes of the show are fast-forwarded and has no sound; it is not displayed in the time bar on the video player either. |
|
I found that problem too! I was kinda waiting for you to bring it up. It's not my fault whatsoever.
|
|
Sadly, I don't think @TheDaChicken's patch has fixed it. After installing pycrypto and ffmpeg, with ytdl latest (as of this comment) git master:
|
|
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. |
|
Oh, my bad! I thought your commits had already been merged into mainline! (Saw the big green "MERGE OK" checkmarks and didn't read the whole text...) Trying your fork right now … UPDATE: it looks like your fork fixes this issue, but unearths different issue:
Interestingly, this is despite this very URL playing perfectly in my obscure Firefox fork without Flash player on this very machine! |
|
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. |
The above logs were generated by telling pip to pull STRAIGHT from
Awesome. Standing by for the push! |
|
Ok! Try it again now, I think I fixed it since youtube-dl isn't telling me that it's trying to signing into cartoonnetwork with my TV Provider. |
|
Sadly, doesn't seem to have fixed:
And I immediately double-checked to ensure that latest commit is actually installed; it is:
|
|
Trying to trigger that code you added, but Further spitballing yielded nothing:
|
|
Ok! I will try again, The annoying thing is that youtube-dl stored my TV Provider were even if I don't use it. It uses it. So, I guess, I am going to have to play around with the code and try again. |
|
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. |
|
0.o apparently that latest patch didn't fix it, either
But it's working on your end, without TV provider login? |
|
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. |
I swear I'm not just trying to be difficult I don't know why it's not working for me only |
|
here are intermediate files generated by adding |
|
Ok! It seems that I now fully know what the problem is. I will see if I can try again and fix the problem. EDIT: This is what the code looks for "authType" but I think I need to change it to "_cnglobal.currentVideo.authType" If you look in the code of cartoonnetwork website with a video player, you can see this code in there "_cnglobal.currentVideo.authType =" and if I look at the --writepages you have I can see it thinks there is a unauth. :/ ohhh.. wait........ I found the main problem.... I thought it was something else... |
|
Ok! Try it now.. |
|
I just realized this discussion is probably more appropriate over at the actual pull request #17271 (EDIT: accidentally linked to some other dude's PR, which may or may not function) see you over there in a moment |
|
Oh ok |
|
@TheDaChicken you're awesome btw. Full deets in the other thread but tl;dr is you did it (at least now it Works On My Machine™, too!) |
|
Thanks! |
|
Was this ever fixed? |
|
@dstftw could you please sir take a look at this? Much appreciated! |
|
@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:
|

Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.08.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
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
-vflag 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 ```):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'.