Skip to content

Commit

Permalink
fixes #1098 (#1099)
Browse files Browse the repository at this point in the history
* Fixes RegexMatchError in n cipher
  • Loading branch information
xioren committed Aug 27, 2021
1 parent 12c7c4d commit ce8901c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytube/cipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def get_throttling_function_name(js: str) -> str:
# https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-865985377
# a.C&&(b=a.get("n"))&&(b=Dea(b),a.set("n",b))}};
# In above case, `Dea` is the relevant function name
r'a\.C&&\(b=a\.get\("n"\)\)&&\(b=([^(]+)\(b\),a\.set\("n",b\)\)}};',
r'a\.[A-Z]&&\(b=a\.get\("n"\)\)&&\(b=([^(]+)\(b\)',
]
logger.debug('Finding throttling function name')
for pattern in function_patterns:
Expand Down

0 comments on commit ce8901c

Please sign in to comment.