|
|
@@ -608,16 +608,20 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
String code = null;
|
|
|
//奈飞
|
|
|
if (goodsId == 1) {
|
|
|
- String urlPref = "https://www.netflix.com/account/update-primary-location";
|
|
|
- code = StrUtil.subBetween(body, "[" + urlPref, "]");
|
|
|
- if (StrUtil.isEmpty(code)) {
|
|
|
- urlPref = "https://www.netflix.com/account/travel/verify";
|
|
|
+ if (body.contains("輸入此代碼登入")) {
|
|
|
+ code = StrUtil.subBetween(body, "輸入此代碼登入", "請在裝置上輸入上");
|
|
|
+ } else {
|
|
|
+ String urlPref = "https://www.netflix.com/account/update-primary-location";
|
|
|
code = StrUtil.subBetween(body, "[" + urlPref, "]");
|
|
|
if (StrUtil.isEmpty(code)) {
|
|
|
- throw BusinessRuntimeException.getInstance("获取认证链接失败,请重新获取");
|
|
|
+ urlPref = "https://www.netflix.com/account/travel/verify";
|
|
|
+ code = StrUtil.subBetween(body, "[" + urlPref, "]");
|
|
|
+ if (StrUtil.isEmpty(code)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("获取认证链接失败,请重新获取");
|
|
|
+ }
|
|
|
}
|
|
|
+ return urlPref + code;
|
|
|
}
|
|
|
- return urlPref + code;
|
|
|
}
|
|
|
//迪士尼
|
|
|
if (goodsId == 3) {
|
|
|
@@ -641,7 +645,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
public String getVerifyCode(String code) {
|
|
|
if (StrUtil.isNotEmpty(code)) {
|
|
|
- Pattern pattern = Pattern.compile("\\d{6}");
|
|
|
+ Pattern pattern = Pattern.compile("\\d{4,}");
|
|
|
Matcher matcher = pattern.matcher(code);
|
|
|
while (matcher.find()) {
|
|
|
return matcher.group();
|