Solved — pytube.exceptions.RegexMatchError: __init__: could not find match for ^\w+\W

RegexMatchError python version: 3.8.10 pytube version: 11.0.2

Flutter Developer
1 min readJan 25, 2022

--

Code:

from pytube import YouTube

yt = YouTube('https://www.youtube.com/watch?v=aQNrG7ag2G4')
stream = yt.streams.filter(file_extension='mp4')

Error:

Traceback (most recent call last):
File ".\test.py", line 4, in <module>
stream = yt.streams.filter(file_extension='mp4')
File

--

--