-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
update cipher regex #1646
base: master
Are you sure you want to change the base?
update cipher regex #1646
Conversation
LGTM |
This change fixed the recent error
Thank you. |
LGTM |
can anyone explain this ? found this issue opened last year... but I don't understand how it is possible that even if this was not fixed (this pull was never merged... why ?), I was able to download videos till yesterday and now this fix is needed |
I just applied this patch for Pytube 15.0.0 and seems it is working fine. |
- manually compiled, had to use customized PyTube package. see PR #1646: pytube/pytube#1646
Yeah I don't get it either... |
EPIC thank you! |
what changes can you please specify as i am also facing the same issue |
Working for me! Thanks @garywu007 |
You can see the changes in the "Files changed" tab: |
I've made similar changes to my cipher.py and main.py files, yet the issue persists. Does anyone know why that might be? RegexMatchError: init: could not find match for ^\w+\W |
it's working for me, can you write here a reproducible example ? |
am only able to get a 720p stream at 30fps with this test video https://www.youtube.com/watch?v=iEk59PKyDwg |
Here's a code snippet that triggers the same error:
RegexMatchError: init: could not find match for ^\w+\W I would expect the error message to show the expression from the revised cipher.py file (r"^$*\w+\W"). Does that give any clues as to why I'm getting this error? |
I don't know exactly what you want to do with I tested this:
Mind sharing what files you changed and what you changed them to? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested but looks good to me.
The cipher change should probably be part of another PR, but it's OK.
I didn't make it that far :/ That line (files = yt.streams...) throws an error for me. Any ideas on what could be causing it? I uninstalled the normal package and installed garywu007's updated version, so it's not a simple typing error. Edit: no changes to the file are reflected when my code runs, even if I empty cipher.py. |
so does it work now ? remember that whenever you change any module in a library then you gotta shut down your program and run it again, the same applies to jupyter notebooks if you are having troubles patching your code, I made a tutorial, just go to section at 02:57... hope this helps |
It does work now. Thanks for the help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not catch that in my previous comment, but this does not looks like it would work as intended
logger.error(f"no match found for pattern: {pattern}") | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am skeptical about this part.
Returning an empty list is not what this method is expected to do. It will crash as soon as self.transform_plan[0]
is called in the Cipher constructor
Patch works for me as well thanks, I don't understand what's going on with this repo, is the maintainer dead ? (no joke), no release since 2021. Someone forks ?? |
Can anyone help with how this patch can be manually made from within docker? It'll be much appreciated |
hi there, I have made a tutorial on how to patch pytube... first way is to patch from your running container exactly like in the video, second option is to write the set of commands you would type manually in your docker file and it should work |
No description provided.