mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 22:30:33 +05:30
Small field refactor
This commit is contained in:
parent
0e67d820bc
commit
29695aed0a
@ -33,6 +33,9 @@ public class YoutubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||
|
||||
private static final YoutubeChannelLinkHandlerFactory instance = new YoutubeChannelLinkHandlerFactory();
|
||||
|
||||
private static final Pattern excludedSegments =
|
||||
Pattern.compile("playlist|watch|attribution_link|watch_popup|embed|feed|select_site");
|
||||
|
||||
public static YoutubeChannelLinkHandlerFactory getInstance() {
|
||||
return instance;
|
||||
}
|
||||
@ -50,7 +53,6 @@ public class YoutubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||
return "https://www.youtube.com/" + id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if path conform to
|
||||
* custom short channel URLs like youtube.com/yourcustomname
|
||||
@ -62,9 +64,6 @@ public class YoutubeChannelLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||
return splitPath.length == 1 && !excludedSegments.matcher(splitPath[0]).matches();
|
||||
}
|
||||
|
||||
private static final Pattern excludedSegments =
|
||||
Pattern.compile("playlist|watch|attribution_link|watch_popup|embed|feed|select_site");
|
||||
|
||||
@Override
|
||||
public String getId(String url) throws ParsingException {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user