Misc fixes

This commit is contained in:
jafea7 2025-04-27 17:42:38 +10:00
parent 0b77752f60
commit e663d8665b
5 changed files with 13 additions and 12 deletions

View File

@ -13,7 +13,9 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
// import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.Objects;
import java.util.function.Consumer;
@ -22,7 +24,7 @@ public class BongaCamsElectronLoginDialog {
private static final Logger LOG = LoggerFactory.getLogger(BongaCamsElectronLoginDialog.class);
public static final String DOMAIN = "bongacams.com";
private final BongaCams site;
private BongaCams site;
private CookieJar cookieJar;
private ExternalBrowser browser;
@ -110,13 +112,17 @@ public class BongaCamsElectronLoginDialog {
}
try {
if (Objects.equals(new URL(url).getPath(), "/")) {
URI uri = new URI(url);
if (Objects.equals(uri.getPath(), "/")) {
browser.close();
}
} catch (MalformedURLException e) {
LOG.error("Couldn't parse new url {}", url, e);
} catch (IOException e) {
LOG.error("Couldn't send shutdown request to external browser", e);
} catch (URISyntaxException e) {
LOG.error("Invalid URL: " + url);
}
}
}

View File

@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.util.Collections;
import java.util.Objects;
@ -22,7 +23,7 @@ public class ChaturbateElectronLoginDialog {
private static final Logger LOG = LoggerFactory.getLogger(ChaturbateElectronLoginDialog.class);
public static final String DOMAIN = "chaturbate.com";
private final Chaturbate site;
private Chaturbate site;
private CookieJar cookieJar;
private ExternalBrowser browser;

View File

@ -27,7 +27,7 @@ public abstract class AbstractStreamrayUpdateService extends PaginatedScheduledS
protected String getPreviewURL(String name) {
String lname = name.toLowerCase();
String url = MessageFormat.format("https://s3root.prod.cams.run/cams-d-com-production-model-snapshot/won/jpg/{0}/{1}/{2}.jpg", lname.substring(0,1), lname.substring(lname.length()-1), lname);
String url = MessageFormat.format("https://images4.streamray.com/images/streamray/won/jpg/{0}/{1}/{2}_640.jpg", lname.substring(0, 1), lname.substring(lname.length() - 1), lname);
try {
return MessageFormat.format("https://dynimages.securedataimages.com/unsigned/rs:fill:640::0/g:no/plain/{0}@jpg", URLEncoder.encode(url, UTF_8));
} catch (Exception ex) {

View File

@ -19,7 +19,7 @@ public abstract class AbstractStripchatUpdateService extends PaginatedScheduledS
if (timestamp == 0) {
return model.optString("previewUrlThumbBig");
}
return MessageFormat.format("https://img.strpst.com/thumbs/{0}/{1}_jpg", String.valueOf(timestamp), String.valueOf(id));
return MessageFormat.format("https://img.strpst.com/thumbs/{0}/{1}", String.valueOf(timestamp), String.valueOf(id));
}
protected List<String> createTags(JSONObject model) {

View File

@ -5,7 +5,6 @@ import ctbrec.StringUtil;
import ctbrec.io.HttpClient;
import ctbrec.io.HttpException;
// import ctbrec.sites.stripchat.Stripchat;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.json.JSONException;
@ -28,15 +27,10 @@ public class StripchatHttpClient extends HttpClient {
private long userId;
@Getter
private String csrfToken;
@Getter
private String csrfTimestamp;
@Getter
private String csrfNotifyTimestamp;
@Getter
private String jwtToken;
private Instant jwtTokenExp;
public StripchatHttpClient(Config config) {