v25.09.26
This commit is contained in:
parent
8f5ee9d57a
commit
001f1042f4
|
@ -11,6 +11,14 @@ If this version doesn't do what you want, don't use it ... simple.
|
||||||
|
|
||||||
Changes from 0xb00bface's v5.3.0 version.
|
Changes from 0xb00bface's v5.3.0 version.
|
||||||
|
|
||||||
|
25.09.26
|
||||||
|
========================
|
||||||
|
* Added BongaCams URL entry warning
|
||||||
|
* Added model online detection for CGF search, sends name instead of image URL if offline
|
||||||
|
Note: Sending name for FC2 will fail to find matches (Japanese), DC cannot send URL to preview image (wrong mimetype).
|
||||||
|
* Implement PAC (Proxy Auto Configuration)
|
||||||
|
* Fix CheckURL for SC (WinkRU)
|
||||||
|
|
||||||
25.09.15
|
25.09.15
|
||||||
========================
|
========================
|
||||||
* Add missing UserAgent parameter to minimal-browser call for some sites
|
* Add missing UserAgent parameter to minimal-browser call for some sites
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>25.9.15</version>
|
<version>25.9.26</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>25.9.15</version>
|
<version>25.9.26</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -383,21 +383,23 @@ public class ChaturbateModel extends AbstractModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean exists() throws IOException {
|
public boolean exists() throws IOException {
|
||||||
Request req = new Request.Builder() // @formatter:off
|
Request req = new Request.Builder()
|
||||||
.url(getUrl())
|
.url(getUrl())
|
||||||
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
|
.header("Accept", "*/*")
|
||||||
.header(ACCEPT_LANGUAGE, Locale.ENGLISH.getLanguage())
|
.header("Accept-Language", Locale.ENGLISH.getLanguage())
|
||||||
.build(); // @formatter:on
|
.header("User-Agent", Config.getInstance().getSettings().httpUserAgent)
|
||||||
|
.header("Referer", getUrl())
|
||||||
|
.header("Origin", getSite().getBaseUrl())
|
||||||
|
.build();
|
||||||
try (Response response = getSite().getHttpClient().execute(req)) {
|
try (Response response = getSite().getHttpClient().execute(req)) {
|
||||||
if (!response.isSuccessful() && response.code() == 404) {
|
if (response.code() == 404) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
|
||||||
String body = response.body().string();
|
|
||||||
boolean banned = body.contains("This room has been banned");
|
|
||||||
boolean deleted = body.contains("This account has been deleted");
|
|
||||||
boolean redirectedToRoot = Objects.equals("/", response.request().url().encodedPath());
|
|
||||||
return !(banned || deleted || redirectedToRoot);
|
|
||||||
}
|
}
|
||||||
|
String body = response.body().string();
|
||||||
|
boolean banned = body.contains("This room has been banned");
|
||||||
|
boolean deleted = body.contains("This account has been deleted");
|
||||||
|
boolean redirectedToRoot = Objects.equals("/", response.request().url().encodedPath());
|
||||||
|
return !banned && !deleted && !redirectedToRoot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -426,17 +426,21 @@ public class StripchatModel extends AbstractModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean exists() throws IOException {
|
public boolean exists() throws IOException {
|
||||||
JSONObject jsonResponse = getModelInfo();
|
try {
|
||||||
if (jsonResponse.optString("error").equals("Not Found")) {
|
JSONObject jsonResponse = getModelInfo();
|
||||||
log.info("Model not found: {}", getName());
|
if (jsonResponse.has("user")) {
|
||||||
return false;
|
JSONObject user = jsonResponse.getJSONObject("user").getJSONObject("user");
|
||||||
}
|
if (isBanned(user)) {
|
||||||
if (jsonResponse.has("user")) {
|
log.info("Model inactive or deleted: {}", getName());
|
||||||
JSONObject user = jsonResponse.getJSONObject("user");
|
return false;
|
||||||
if (isBanned(user)) {
|
}
|
||||||
log.info("Model inactive or deleted: {}", getName());
|
}
|
||||||
|
} catch (HttpException e) {
|
||||||
|
if (e.getResponseCode() == 404) {
|
||||||
|
log.info("Model not found: {}", getName());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>25.9.15</version>
|
<version>25.9.26</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>../common</module>
|
<module>../common</module>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>25.9.15</version>
|
<version>25.9.26</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue