File tree Expand file tree Collapse file tree
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1264,8 +1264,7 @@ public static String getAndroidUserAgent(@Nullable final Localization localizati
12641264 // Spoofing an Android 12 device with the hardcoded version of the Android app
12651265 return "com.google.android.youtube/" + MOBILE_YOUTUBE_CLIENT_VERSION
12661266 + " (Linux; U; Android 12; "
1267- + (localization == null ? Localization .DEFAULT .getCountryCode ()
1268- : localization .getCountryCode ())
1267+ + (localization != null ? localization : Localization .DEFAULT ).getCountryCode ()
12691268 + ") gzip" ;
12701269 }
12711270
@@ -1284,10 +1283,8 @@ public static String getAndroidUserAgent(@Nullable final Localization localizati
12841283 public static String getIosUserAgent (@ Nullable final Localization localization ) {
12851284 // Spoofing an iPhone running iOS 15.4 with the hardcoded mobile client version
12861285 return "com.google.ios.youtube/" + MOBILE_YOUTUBE_CLIENT_VERSION
1287- + "(" + IOS_DEVICE_MODEL
1288- + "; U; CPU iOS 15_4 like Mac OS X; "
1289- + (localization != null ? localization .getCountryCode ()
1290- : Localization .DEFAULT .getCountryCode ())
1286+ + "(" + IOS_DEVICE_MODEL + "; U; CPU iOS 15_4 like Mac OS X; "
1287+ + (localization != null ? localization : Localization .DEFAULT ).getCountryCode ()
12911288 + ")" ;
12921289 }
12931290
You can’t perform that action at this time.
0 commit comments