Fix wrong regex when channel id is at the end of the url
It had no "&" at the end.
This commit is contained in:
parent
31e74253f8
commit
b09e402d4f
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
|
||||||
String buttonTrackingUrl = el.select("button[class*=\"yt-uix-button\"]").first()
|
String buttonTrackingUrl = el.select("button[class*=\"yt-uix-button\"]").first()
|
||||||
.attr("abs:data-href");
|
.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);
|
Matcher match = channelIdPattern.matcher(buttonTrackingUrl);
|
||||||
|
|
||||||
if (match.matches()) {
|
if (match.matches()) {
|
||||||
|
|
Loading…
Reference in a new issue