Skip to content

Commit b09e402

Browse files
committed
Fix wrong regex when channel id is at the end of the url
It had no "&" at the end.
1 parent 31e7425 commit b09e402

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public String getUrl() throws ParsingException {
5959
String buttonTrackingUrl = el.select("button[class*=\"yt-uix-button\"]").first()
6060
.attr("abs:data-href");
6161

62-
Pattern channelIdPattern = Pattern.compile("(?:.*?)\\%252Fchannel\\%252F(.+?)\\%26(?:.*)");
62+
Pattern channelIdPattern = Pattern.compile("(?:.*?)\\%252Fchannel\\%252F([A-Za-z0-9\\-\\_]+)(?:.*)");
6363
Matcher match = channelIdPattern.matcher(buttonTrackingUrl);
6464

6565
if (match.matches()) {

0 commit comments

Comments
 (0)