forked from j62/ctbrec
Fix createModelFromUrl for Showup and Fc2Live
This commit is contained in:
parent
62be5795f4
commit
f1a0e5900c
|
@ -51,10 +51,10 @@ public class Fc2Live extends AbstractSite {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
return super.createModelFromUrl(url);
|
return super.createModelFromUrl(url);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Double getTokenBalance() throws IOException {
|
public Double getTokenBalance() throws IOException {
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.Model;
|
import ctbrec.Model;
|
||||||
import ctbrec.UnknownModel;
|
|
||||||
import ctbrec.io.HttpClient;
|
import ctbrec.io.HttpClient;
|
||||||
import ctbrec.io.HttpException;
|
import ctbrec.io.HttpException;
|
||||||
import ctbrec.sites.AbstractSite;
|
import ctbrec.sites.AbstractSite;
|
||||||
|
@ -172,11 +171,11 @@ public class Showup extends AbstractSite {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Model createModelFromUrl(String url) {
|
public Model createModelFromUrl(String url) {
|
||||||
Matcher matcher = Pattern.compile(getBaseUrl() + "(?:/profile)?/(.*)").matcher(url);
|
Matcher matcher = Pattern.compile("https?://(?:.*?\\.)?showup.tv(?:/profile)?/(.*)").matcher(url);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
return createModel(matcher.group(1));
|
return createModel(matcher.group(1));
|
||||||
} else {
|
} else {
|
||||||
return new UnknownModel();
|
return super.createModelFromUrl(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue