make url pattern static
This commit is contained in:
parent
090dade5b3
commit
674f2227f3
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue