Skip to content

Commit

Permalink
fix jmtt, closed #99
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleydu authored Sep 1, 2020
1 parent c95172f commit e4f704a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/src/main/java/com/hiroshi/cimoc/source/JMTT.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,13 @@ public List<Chapter> parseChapter(String html, Comic comic, Long sourceComic) {
List<Chapter> list = new LinkedList<>();
Node body = new Node(html);
int i=0;
String startTitle = body.text(".col.btn.btn-primary.dropdown-toggle.reading").trim();
String startPath = body.href(".col.btn.btn-primary.dropdown-toggle.reading");
list.add(new Chapter(Long.parseLong(sourceComic + "000" + i++), sourceComic, startTitle, startPath));
for (Node node : body.list("#episode-block > div > div.episode > ul > a")) {
if (i==0){
String startTitle = body.text(".col.btn.btn-primary.dropdown-toggle.reading").trim();
String startPath = body.href(".col.btn.btn-primary.dropdown-toggle.reading");
list.add(new Chapter(Long.parseLong(sourceComic + "000" + i++), sourceComic, startTitle, startPath));
}else {
String title = node.text("li").trim();
String path = node.href();
list.add(new Chapter(Long.parseLong(sourceComic + "000" + i++), sourceComic, title, path));
}
String title = node.text("li").trim();
String path = node.href();
list.add(new Chapter(Long.parseLong(sourceComic + "000" + i++), sourceComic, title, path));
}
return Lists.reverse(list);
}
Expand Down

0 comments on commit e4f704a

Please sign in to comment.