Fix nini
This commit is contained in:
parent
9dbe870c45
commit
acf0d29040
|
|
@ -6,8 +6,8 @@ import android.widget.Button;
|
||||||
|
|
||||||
import com.github.catvod.R;
|
import com.github.catvod.R;
|
||||||
import com.github.catvod.crawler.Spider;
|
import com.github.catvod.crawler.Spider;
|
||||||
import com.github.catvod.spider.Doll;
|
|
||||||
import com.github.catvod.spider.Init;
|
import com.github.catvod.spider.Init;
|
||||||
|
import com.github.catvod.spider.NiNi;
|
||||||
import com.orhanobut.logger.AndroidLogAdapter;
|
import com.orhanobut.logger.AndroidLogAdapter;
|
||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class MainActivity extends Activity {
|
||||||
private void initSpider() {
|
private void initSpider() {
|
||||||
try {
|
try {
|
||||||
Init.init(getApplicationContext());
|
Init.init(getApplicationContext());
|
||||||
spider = new Doll();
|
spider = new NiNi();
|
||||||
spider.init(this, "");
|
spider.init(this, "");
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
@ -79,7 +79,7 @@ public class MainActivity extends Activity {
|
||||||
|
|
||||||
public void detailContent() {
|
public void detailContent() {
|
||||||
try {
|
try {
|
||||||
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("2121173431")));
|
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("ulNJ1TWJXFPn0GQGCuSKjZMmP28PTq2U")));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ public class MainActivity extends Activity {
|
||||||
|
|
||||||
public void playerContent() {
|
public void playerContent() {
|
||||||
try {
|
try {
|
||||||
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "kahf2rw5Uuk+652f55f6943ee2f75d8e4fa590b4ec65fd007f8c", new ArrayList<>()));
|
Logger.t("playerContent").d(spider.playerContent("", "ulNJ1TWJXFPn0GQGCuSKjZMmP28PTq2U_J52h83OSgHvZXbaecUtirP1qzfVouxIk_1", new ArrayList<>()));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class NiNi extends Spider {
|
||||||
private static final String searchUrl = "https://api.nivodz.com/show/search/WEB/3.2";
|
private static final String searchUrl = "https://api.nivodz.com/show/search/WEB/3.2";
|
||||||
private static final String categoryUrl = "https://api.nivodz.com/show/filter/WEB/3.2";
|
private static final String categoryUrl = "https://api.nivodz.com/show/filter/WEB/3.2";
|
||||||
private static final String detailUrl = "https://api.nivodz.com/show/detail/WEB/3.2";
|
private static final String detailUrl = "https://api.nivodz.com/show/detail/WEB/3.2";
|
||||||
private static final String playUrl = "https://api.nivodz.com/show/play/info/WEB/3.2";
|
private static final String playUrl = "https://api.nivodz.com/show/play/info/WEB/3.3";
|
||||||
private static final String des_key = "diao.com";
|
private static final String des_key = "diao.com";
|
||||||
private boolean adult;
|
private boolean adult;
|
||||||
|
|
||||||
|
|
@ -174,7 +174,7 @@ public class NiNi extends Spider {
|
||||||
JSONObject item = plays.getJSONObject(j);
|
JSONObject item = plays.getJSONObject(j);
|
||||||
String episodeName = item.getString("episodeName");
|
String episodeName = item.getString("episodeName");
|
||||||
episodeName = TextUtils.isEmpty(episodeName) ? "播放" : episodeName;
|
episodeName = TextUtils.isEmpty(episodeName) ? "播放" : episodeName;
|
||||||
vodItems.add(episodeName + "$" + id + "_" + item.getString("playIdCode"));
|
vodItems.add(episodeName + "$" + id + "_" + item.getString("playIdCode") + "_" + episodeName);
|
||||||
}
|
}
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
vod.setVodId(id);
|
vod.setVodId(id);
|
||||||
|
|
@ -198,10 +198,10 @@ public class NiNi extends Spider {
|
||||||
Map<String, String> params = new TreeMap<>();
|
Map<String, String> params = new TreeMap<>();
|
||||||
params.put("show_id_code", ids[0]);
|
params.put("show_id_code", ids[0]);
|
||||||
params.put("play_id_code", ids[1]);
|
params.put("play_id_code", ids[1]);
|
||||||
params.put("oid", "1");
|
params.put("episode_id", ids[2]);
|
||||||
JSONObject object = new JSONObject(post(playUrl, params));
|
JSONObject object = new JSONObject(post(playUrl, params));
|
||||||
String playUrl = object.getJSONObject("entity").optString("playUrl");
|
String url = object.getJSONObject("entity").getJSONArray("plays").getJSONObject(0).optString("playUrl");
|
||||||
return Result.get().url(playUrl).header(getHeaders()).string();
|
return Result.get().url(url).header(getHeaders()).string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
3f392906996ac13aaeb8c91956f95f7f
|
fd1b4ae6ab532b829b3256e786c03e21
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue