Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Shorts components): Improve pattern for disabled commen…
Browse files Browse the repository at this point in the history
…ts button
  • Loading branch information
anddea committed Jun 20, 2024
1 parent c47becd commit a74fd78
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@

@SuppressWarnings("unused")
public final class ShortsButtonFilter extends Filter {
// Pattern: reel_comment_button … number of comments + space + word (comments) … 4 (random number),
// previous patterns: reel_comment_button … number of comments … 4 (random number)
// reel_comment_button … number of comments,
// Pattern: reel_comment_button … number (of comments) + space? + character / letter (for comments) … 4 (random number),
// probably unstable.
// If comment button does not have number of comments, then it is disabled or with label "0".
private static final Pattern REEL_COMMENTS_DISABLED_PATTERN = Pattern.compile("reel_comment_button.*\\d+\\s+\\w*.*4");
private static final Pattern REEL_COMMENTS_DISABLED_PATTERN = Pattern.compile("reel_comment_button.+\\d\\s?\\p{L}.+4");
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
private final static String REEL_LIVE_HEADER_PATH = "immersive_live_header.eml";
/**
Expand Down

0 comments on commit a74fd78

Please sign in to comment.