Fix bili
This commit is contained in:
parent
01a3384fa4
commit
fd7801453c
|
|
@ -17,7 +17,7 @@ public class Data {
|
||||||
@SerializedName("isLogin")
|
@SerializedName("isLogin")
|
||||||
private Boolean isLogin;
|
private Boolean isLogin;
|
||||||
@SerializedName("vipStatus")
|
@SerializedName("vipStatus")
|
||||||
private Boolean vipStatus;
|
private Integer vipStatus;
|
||||||
@SerializedName("qrcode_key")
|
@SerializedName("qrcode_key")
|
||||||
private String qrcodeKey;
|
private String qrcodeKey;
|
||||||
@SerializedName("url")
|
@SerializedName("url")
|
||||||
|
|
@ -57,8 +57,12 @@ public class Data {
|
||||||
return isLogin != null && isLogin;
|
return isLogin != null && isLogin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getVipStatus() {
|
public Integer getVipStatus() {
|
||||||
return vipStatus != null && vipStatus;
|
return vipStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVip() {
|
||||||
|
return vipStatus != null && vipStatus != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQrcodeKey() {
|
public String getQrcodeKey() {
|
||||||
|
|
|
||||||
|
|
@ -271,8 +271,8 @@ public class Bili extends Spider {
|
||||||
private void checkLogin() {
|
private void checkLogin() {
|
||||||
String json = OkHttp.string("https://api.bilibili.com/x/web-interface/nav", getHeader());
|
String json = OkHttp.string("https://api.bilibili.com/x/web-interface/nav", getHeader());
|
||||||
Data data = Resp.objectFrom(json).getData();
|
Data data = Resp.objectFrom(json).getData();
|
||||||
isVip = data.getVipStatus();
|
|
||||||
login = data.isLogin();
|
login = data.isLogin();
|
||||||
|
isVip = data.isVip();
|
||||||
//getQRCode();
|
//getQRCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
90d766a2f75763abd1ed1d31db5cb936
|
211cb09b88752dd0d56201b84b0b3e47
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue