Skip to content

Commit 674f222

Browse files
committed
make url pattern static
1 parent 090dade commit 674f222

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public String getId() {
4545
}
4646

4747
/**
48-
* Id should be the name of the kiosk, tho Id is used for identifing it in the frontend,
48+
* Id should be the name of the kiosk, tho Id is used for identifying it in the frontend,
4949
* so id should be kept in english.
5050
* In order to get the name of the kiosk in the desired language we have to
5151
* crawl if from the website.
52-
* @return the tranlsated version of id
52+
* @return the translated version of id
5353
* @throws ParsingException
5454
*/
5555
@Nonnull

extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/linkHandler/MediaCCCRecentListLinkHandlerFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
import java.util.regex.Pattern;
77

88
public class MediaCCCRecentListLinkHandlerFactory extends ListLinkHandlerFactory {
9+
private static final String pattern = "^(https?://)?media.ccc.de/recent/?$";
10+
911
@Override
1012
public String getId(String url) {
1113
return "recent";
1214
}
1315

1416
@Override
1517
public boolean onAcceptUrl(String url) {
16-
final String pattern = "^(https?://)?media.ccc.de/recent/?$";
1718
return Pattern.matches(pattern, url);
1819
}
1920

0 commit comments

Comments
 (0)