From b09e402d4fb3b7816dc3715d5d5f8034d3e664a8 Mon Sep 17 00:00:00 2001 From: Stypox Date: Mon, 12 Aug 2019 16:55:39 +0200 Subject: [PATCH] Fix wrong regex when channel id is at the end of the url It had no "&" at the end. --- .../youtube/extractors/YoutubeChannelInfoItemExtractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java index 3831544a2..d5247cad8 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelInfoItemExtractor.java @@ -59,7 +59,7 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor String buttonTrackingUrl = el.select("button[class*=\"yt-uix-button\"]").first() .attr("abs:data-href"); - Pattern channelIdPattern = Pattern.compile("(?:.*?)\\%252Fchannel\\%252F(.+?)\\%26(?:.*)"); + Pattern channelIdPattern = Pattern.compile("(?:.*?)\\%252Fchannel\\%252F([A-Za-z0-9\\-\\_]+)(?:.*)"); Matcher match = channelIdPattern.matcher(buttonTrackingUrl); if (match.matches()) {