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 @@ -1620,8 +1620,10 @@ public static void defaultAlertsCheck(@Nonnull final JsonObject initialData)
16201620 final String alertText = getTextFromObject (alertRenderer .getObject ("text" ));
16211621 final String alertType = alertRenderer .getString ("type" , "" );
16221622 if (alertType .equalsIgnoreCase ("ERROR" )) {
1623- if (alertText != null && alertText .contains ("This account has been terminated" )) {
1624- if (alertText .contains ("violation" ) || alertText .contains ("violating" )
1623+ if (alertText != null
1624+ && (alertText .contains ("This account has been terminated" )
1625+ || alertText .contains ("This channel was removed" ))) {
1626+ if (alertText .matches (".*violat(ed|ion|ing).*" )
16251627 || alertText .contains ("infringement" )) {
16261628 // Possible error messages:
16271629 // "This account has been terminated for a violation of YouTube's Terms of
@@ -1643,6 +1645,7 @@ public static void defaultAlertsCheck(@Nonnull final JsonObject initialData)
16431645 // the user posted."
16441646 // "This account has been terminated because it is linked to an account that
16451647 // received multiple third-party claims of copyright infringement."
1648+ // "This channel was removed because it violated our Community Guidelines."
16461649 throw new AccountTerminatedException (alertText ,
16471650 AccountTerminatedException .Reason .VIOLATION );
16481651 } else {
You can’t perform that action at this time.
0 commit comments