Improve Name regex to use 1 group, find first &
This commit is contained in:
parent
d224b02a80
commit
54ef72fafd
|
@ -101,7 +101,7 @@ class _TranscriptFetcher():
|
||||||
WATCH_URL = 'https://www.youtube.com/watch?v={video_id}'
|
WATCH_URL = 'https://www.youtube.com/watch?v={video_id}'
|
||||||
API_BASE_URL = 'https://www.youtube.com/api/'
|
API_BASE_URL = 'https://www.youtube.com/api/'
|
||||||
TIMEDTEXT_STRING = 'timedtext?v='
|
TIMEDTEXT_STRING = 'timedtext?v='
|
||||||
NAME_REGEX = re.compile(r'(&name=.*&)|(&name=.*)')
|
NAME_REGEX = re.compile(r'&name=.*?(&)|&name=.*')
|
||||||
|
|
||||||
def __init__(self, video_id, languages, proxies):
|
def __init__(self, video_id, languages, proxies):
|
||||||
self.video_id = video_id
|
self.video_id = video_id
|
||||||
|
|
Loading…
Reference in New Issue