Skip to content

Commit

Permalink
解决类似龙虾解析
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangsan99999 committed Jul 24, 2022
1 parent a7e940e commit 93e6ae7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,12 @@ private void initParse(String flag, boolean useParse, String playUrl, final Stri

JSONObject jsonParse(String input, String json) throws JSONException {
JSONObject jsonPlayData = new JSONObject(json);
String url = jsonPlayData.getString("url");
String url;
if (jsonPlayData.has("data")) {
url = jsonPlayData.getJSONObject("data").getString("url");
} else {
url = jsonPlayData.getString("url");
}
String msg = jsonPlayData.optString("msg", "");
if (url.startsWith("//")) {
url = "https:" + url;
Expand Down Expand Up @@ -1210,4 +1215,4 @@ public void onReceivedSslError(XWalkView view, ValueCallback<Boolean> callback,
}
}

}
}

0 comments on commit 93e6ae7

Please sign in to comment.