MCPcopy Create free account
hub / github.com/OreosLab/bili / run

Method run

src/main/java/top/misec/task/MangaRead.java:23–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21public class MangaRead implements Task {
22
23 @Override
24 public void run() {
25 Map<String, String> map = new HashMap<>(4);
26 map.put("device", "pc");
27 map.put("platform", "web");
28 map.put("comic_id", "27355");
29 map.put("ep_id", "381662");
30
31 JsonObject result = HttpUtils.doPost(ApiList.MANGA_READ, GsonUtils.toJson(map));
32 int code = result.get(STATUS_CODE_STR).getAsInt();
33
34 if (code == 0) {
35 log.info("本日漫画自动阅读1章节成功!,阅读漫画为:堀与宫村");
36 } else {
37 log.warn("阅读失败,错误信息为\n```json\n{}\n```", result);
38 }
39
40 }
41
42 @Override
43 public String getName() {

Callers

nothing calls this directly

Calls 2

doPostMethod · 0.95
toJsonMethod · 0.95

Tested by

no test coverage detected