mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 08:26:59 +03:00
Don't error if failing to parse vanced ua
This commit is contained in:
@@ -7,7 +7,7 @@ export function parseUserAgent(userAgent: string): string {
|
||||
}
|
||||
|
||||
if (ua.match(/(com.google.android.youtube\/)|(com.vanced.android.youtube\/)|(^YouTube\/)|(^Dalvik\/)/i)) {
|
||||
return `Vanced/${ua.match(/.android.youtube\/([^\s]+)/i)[1]}`;
|
||||
return `Vanced/${ua.match(/.android.youtube\/([^\s]+)/i)?.[1]}`;
|
||||
}
|
||||
|
||||
if (ua.match(/(mpv_sponsorblock)|(^python-requests)|(^GuzzleHttp\/)|(^PostmanRuntime\/)/i)) {
|
||||
|
||||
Reference in New Issue
Block a user