xioren
commited on
fixes #1098 (#1099)
Browse files* Fixes RegexMatchError in n cipher
- pytube/cipher.py +1 -1
pytube/cipher.py
CHANGED
@@ -265,7 +265,7 @@ def get_throttling_function_name(js: str) -> str:
|
|
265 |
# https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-865985377
|
266 |
# a.C&&(b=a.get("n"))&&(b=Dea(b),a.set("n",b))}};
|
267 |
# In above case, `Dea` is the relevant function name
|
268 |
-
r'a\.
|
269 |
]
|
270 |
logger.debug('Finding throttling function name')
|
271 |
for pattern in function_patterns:
|
|
|
265 |
# https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-865985377
|
266 |
# a.C&&(b=a.get("n"))&&(b=Dea(b),a.set("n",b))}};
|
267 |
# In above case, `Dea` is the relevant function name
|
268 |
+
r'a\.[A-Z]&&\(b=a\.get\("n"\)\)&&\(b=([^(]+)\(b\)',
|
269 |
]
|
270 |
logger.debug('Finding throttling function name')
|
271 |
for pattern in function_patterns:
|