Commit 674f2227 authored by TobiGr's avatar TobiGr
Browse files

make url pattern static

parent 090dade5
......@@ -45,11 +45,11 @@ public abstract class KioskExtractor<T extends InfoItem> extends ListExtractor<T
}
/**
* Id should be the name of the kiosk, tho Id is used for identifing it in the frontend,
* Id should be the name of the kiosk, tho Id is used for identifying it in the frontend,
* so id should be kept in english.
* In order to get the name of the kiosk in the desired language we have to
* crawl if from the website.
* @return the tranlsated version of id
* @return the translated version of id
* @throws ParsingException
*/
@Nonnull
......
......@@ -6,6 +6,8 @@ import java.util.List;
import java.util.regex.Pattern;
public class MediaCCCRecentListLinkHandlerFactory extends ListLinkHandlerFactory {
private static final String pattern = "^(https?://)?media.ccc.de/recent/?$";
@Override
public String getId(String url) {
return "recent";
......@@ -13,7 +15,6 @@ public class MediaCCCRecentListLinkHandlerFactory extends ListLinkHandlerFactory
@Override
public boolean onAcceptUrl(String url) {
final String pattern = "^(https?://)?media.ccc.de/recent/?$";
return Pattern.matches(pattern, url);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment