Skip to content

Commit

Permalink
Update N0ys.java
Browse files Browse the repository at this point in the history
  • Loading branch information
daji888 authored Mar 4, 2022
1 parent 84b1cb4 commit dbdb4a4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/src/main/java/com/github/catvod/spider/N0ys.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,18 +441,15 @@ public String playerContent(String flag, String id, List<String> vipFlags) {
@Override
public String searchContent(String key, boolean quick) {
try {
long currentTime=System.currentTimeMillis();
long currentTime = System.currentTimeMillis();
String url = siteUrl + "/index.php/ajax/suggest?mid=1&wd=" + URLEncoder.encode(key) + "&limit=10&timestamp=" + currentTime;
SpiderUrl su = new SpiderUrl(url, getHeaders(url));
SpiderReqResult srr = SpiderReq.get(su);
//Document doc = Jsoup.parse(srr.content);
JSONObject searchResult = new JSONObject(srr.content);
JSONObject searchResult = new JSONObject(OkHttpUtil.string(url, getHeaders(url)));
JSONObject result = new JSONObject();
JSONArray videos = new JSONArray();
if (searchResult.getInt("total")>0) {
if (searchResult.getInt("total") > 0) {
JSONArray lists = new JSONArray(searchResult.getString("list"));
for (int i = 0; i < lists.length(); i++) {
JSONObject vod= lists.getJSONObject(i);
JSONObject vod = lists.getJSONObject(i);
String id = vod.getString("id");
String title = vod.getString("name");
String cover = vod.getString("pic");
Expand Down

0 comments on commit dbdb4a4

Please sign in to comment.