Change cookie name of the sorting settings
This commit is contained in:
parent
2f013bc870
commit
2eb1b17513
|
@ -26,6 +26,7 @@ import okhttp3.Response;
|
|||
public class BongaCamsHttpClient extends HttpClient {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BongaCamsHttpClient.class);
|
||||
private static final String SORT_COOKIE = "ls01";
|
||||
private int userId = 0;
|
||||
|
||||
public BongaCamsHttpClient() {
|
||||
|
@ -39,16 +40,17 @@ public class BongaCamsHttpClient extends HttpClient {
|
|||
private void addSortByPopularCookie() {
|
||||
Cookie sortByCookie = new Cookie.Builder()
|
||||
.domain("bongacams.com")
|
||||
.name("bcmlsf9")
|
||||
.name(SORT_COOKIE)
|
||||
.value("%7B%22limit%22%3A20%2C%22c_limit%22%3A10%2C%22th_type%22%3A%22live%22%2C%22sorting%22%3A%22popular%22%2C%22display%22%3A%22auto%22%7D")
|
||||
.build();
|
||||
|
||||
|
||||
Map<String, List<Cookie>> cookies = cookieJar.getCookies();
|
||||
for (Entry<String, List<Cookie>> entry : cookies.entrySet()) {
|
||||
List<Cookie> cookieList = entry.getValue();
|
||||
for (Iterator<Cookie> iterator = cookieList.iterator(); iterator.hasNext();) {
|
||||
Cookie cookie = iterator.next();
|
||||
if(cookie.name().equals("bcmlsf9")) {
|
||||
if(cookie.name().equals(SORT_COOKIE)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue