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

A problem about "regex_search: could not find match for (?:v=|\/)([0-9A-Za-z_-]{11})." #8

Open
LiuXinqi12 opened this issue Sep 3, 2020 · 7 comments

Comments

@LiuXinqi12
Copy link

LiuXinqi12 commented Sep 3, 2020

Hi, when I run your program "python download_images.py --vid VIDEO_ID", there is a problem "regex_search: could not find match for (?:v=|/)([0-9A-Za-z_-]{11})."occured. It seems to be related to pytube, but after I modified it according to the suggestions on github(pytube/pytube#312 (comment)), it still doesn't work, so I cannot get the dataset. In addition, program "python download_images.py --set train" seem can work. The pytube version I use is "9.6.4", can you give me some help? Thank you very much!

@chaitanya-kaul
Copy link

You might have the wrong version of pytube. Uninstall it using,
pip uninstall pytube
and then install using this,
pip install git+https://github.com/nficano/pytube.git
It should fix the problem.

@booker-max
Copy link

@chaitanya-kaul @LiuXinqi12 Hello, I tried according to your method, installed pytube-10.8.5, but when I run the code, I still get an error.
image

@booker-max
Copy link

Hi, when I run your program "python download_images.py --vid VIDEO_ID", there is a problem "regex_search: could not find match for (?:v=|/)([0-9A-Za-z_-]{11})."occured. It seems to be related to pytube, but after I modified it according to the suggestions on github(pytube/pytube#312 (comment)), it still doesn't work, so I cannot get the dataset. In addition, program "python download_images.py --set train" seem can work. The pytube version I use is "9.6.4", can you give me some help? Thank you very much!

Hello, I am experiencing the same question as you, do you solve it?

@hazalkl
Copy link

hazalkl commented Jun 27, 2021

Hi, when I run your program "python download_images.py --vid VIDEO_ID", there is a problem "regex_search: could not find match for (?:v=|/)([0-9A-Za-z_-]{11})."occured. It seems to be related to pytube, but after I modified it according to the suggestions on github(pytube/pytube#312 (comment)), it still doesn't work, so I cannot get the dataset. In addition, program "python download_images.py --set train" seem can work. The pytube version I use is "9.6.4", can you give me some help? Thank you very much!

Hello, I am experiencing the same question as you, do you solve it?

Hi, did u solve this problem? I also have the same issue :(

@jaychovatiya4995
Copy link

jaychovatiya4995 commented Oct 7, 2021

You might have the wrong version of pytube. Uninstall it using, pip uninstall pytube and then install using this, pip install git+https://github.com/nficano/pytube.git It should fix the problem.

Hi, I have a latest version of pytube 11.0.1, but I have fetch the same error :(

Any One solve it..?

@xsraut
Copy link

xsraut commented Dec 19, 2021

pip uninstall pytube
and then install using this,
pip install git+https://github.com/nficano/pytube.git

Worked for me...Thanks

@Swastikbanarjee
Copy link

I did all listed above still getting error
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\tkinter_init_.py", line 1967, in call
return self.func(args)
^^^^^^^^^^^^^^^^
File "C:\Users\Sushmita\PycharmProjects\pythonProject1\main.py", line 30, in Download
getVideo=YouTube(youTube_link)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sushmita\PycharmProjects\pythonProject1\venv\Lib\site-packages\pytube_main_.py", line 71, in init
self.video_id = extract.video_id(url)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sushmita\PycharmProjects\pythonProject1\venv\Lib\site-packages\pytube\extract.py", line 133, in video_id
return regex_search(r"(?:v=|/)([0-9A-Za-z_-]{11}).
", url, group=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sushmita\PycharmProjects\pythonProject1\venv\Lib\site-packages\pytube\helpers.py", line 129, in regex_search
raise RegexMatchError(caller="regex_search", pattern=pattern)
pytube.exceptions.RegexMatchError: regex_search: could not find match for (?:v=|/)([0-9A-Za-z_-]{11}).*

version 15.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants