Skip to content

Commit

Permalink
修复快手不能录制的问题(graph查询返回字段更改+Accept头部修改)
Browse files Browse the repository at this point in the history
  • Loading branch information
nICEnnnnnnnLee committed Apr 30, 2020
1 parent bd6ead8 commit 287c6ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private JSONObject getLiveInfoObj(String roomId) {
String json = util.postContent(graphSqlUrl, headers.getKuaishouHeaders(roomId), param.toString(),
null);
Logger.println(json);
JSONObject obj = new JSONObject(json).getJSONObject("data").getJSONObject("liveDetail")
JSONObject obj = new JSONObject(json).getJSONObject("data").getJSONObject("webLiveDetail")
.getJSONObject("liveStream");
return obj;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nicelee/bilibili/util/HttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public HashMap<String, String> getCommonHeaders(String host) {
*/
public HashMap<String, String> getKuaishouHeaders(String roomId) {
headerMap = new HashMap<String, String>();
headerMap.put("Accept", "text/html,application/xhtml+xm…ml;q=0.9,image/webp,*/*;q=0.8");
headerMap.put("Accept", "*/*");
headerMap.put("Accept-Encoding", "gzip, deflate, sdch, br");
headerMap.put("Accept-Language", "zh-CN,zh;q=0.8");
headerMap.put("Cache-Control", "max-age=0");
Expand Down

0 comments on commit 287c6ed

Please sign in to comment.