import java.util.regex.Pattern;
import java.util.regex.Matcher;
String headers = prev.getResponseHeaders();
String POLOSESSID = null;
Pattern p = Pattern.compile("POLOSESSID=([^;]+);");
Matcher m = p.matcher(headers);
if (m.find()) {
POLOSESSID = m.group(1);
if (POLOSESSID != null) {
vars.put("POLOSESSID", POLOSESSID);
}
} else {
System.out.println("POLOSESSID not found.");
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 715
Connection: close
vary: Origin, Accept-Encoding
access-control-allow-credentials: true
x-dns-prefetch-control: off
x-frame-options: SAMEORIGIN
strict-transport-security: max-age=15552000; includeSubDomains
x-download-options: noopen
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
surrogate-control: no-store
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate
pragma: no-cache
expires: 0
content-language: en
x-ratelimit-limit: 40
x-ratelimit-remaining: 39
x-ratelimit-reset: 1723617802
set-cookie: POLOSESSID=34e0e785f9554960a6846ed8a1f03c19; Domain=poloniex.com; Path=/; HttpOnly; Secure
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 8b2ef85e390980b4-NRT
网友评论