| Line 74... |
Line 74... |
| 74 |
try (CloseableHttpResponse seedResponse = httpClient.execute(seed)) {
|
74 |
try (CloseableHttpResponse seedResponse = httpClient.execute(seed)) {
|
| 75 |
EntityUtils.consumeQuietly(seedResponse.getEntity());
|
75 |
EntityUtils.consumeQuietly(seedResponse.getEntity());
|
| 76 |
}
|
76 |
}
|
| 77 |
|
77 |
|
| 78 |
for (ImeiActivationTimestampModel imeiActivationTimestampModel : imeisActivationList) {
|
78 |
for (ImeiActivationTimestampModel imeiActivationTimestampModel : imeisActivationList) {
|
| - |
|
79 |
// Never spend a captcha on a line item with no IMEI. Vivo answers
|
| - |
|
80 |
// those with {"msg":"参数为空"} ("parameter is empty") and status 0,
|
| - |
|
81 |
// which this code used to record as a captcha failure -- so a correct
|
| - |
|
82 |
// code looked wrong, the row was never saved, and it came back every
|
| - |
|
83 |
// 5 minutes forever. That was 76% of all rejections.
|
| - |
|
84 |
String serial = imeiActivationTimestampModel.getSerialNumber();
|
| - |
|
85 |
if (serial == null || serial.trim().isEmpty()) {
|
| - |
|
86 |
LOGGER.warn("Skipping activation lookup: line item has no serial number");
|
| - |
|
87 |
continue;
|
| - |
|
88 |
}
|
| - |
|
89 |
|
| 79 |
Captcha captcha = this.getNewCaptcha(httpClient, cookieStore);
|
90 |
Captcha captcha = this.getNewCaptcha(httpClient, cookieStore);
|
| 80 |
if (captcha == null) {
|
91 |
if (captcha == null) {
|
| 81 |
// Solver returned something that is not a captcha code (it was down
|
92 |
// Solver returned something that is not a captcha code (it was down
|
| 82 |
// for 46 days returning an nginx 502 page, which used to be submitted
|
93 |
// for 46 days returning an nginx 502 page, which used to be submitted
|
| 83 |
// to Vivo verbatim). Skip; this IMEI is picked up on the next run.
|
94 |
// to Vivo verbatim). Skip; this IMEI is picked up on the next run.
|