Skip to content

Commit

Permalink
fix dongmanmanhua ,fixed #54
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleydu committed Aug 10, 2020
1 parent b746093 commit ea49506
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,31 @@ public void parseInfo(String html, Comic comic) {
public List<Chapter> parseChapter(String html) {
List<Chapter> list = new LinkedList<>();
Node body = new Node(html);
for (Node node : body.list("ul#_listUl > li > a")) {
String title = node.text("span.subj > span");
String path = "https:" + node.href();
list.add(new Chapter(title, path));
for (Node nodePage : body.list("div.detail_lst > div.paginate > a")) {
String urlPage = nodePage.href();
if (urlPage.equals("#")){
for (Node node : body.list("ul#_listUl > li > a")) {
String title = node.text("span.subj > span");
String path = "https:" + node.href();
list.add(new Chapter(title, path));
}
}else {
try {
String htmlPage = getResponseBody(
App.getHttpClient(),
new Request.Builder().url(baseUrl + urlPage)
.addHeader("Referer", "www.dongmanmanhua.cn")
.build());
Node bodyPage = new Node(htmlPage);
for (Node node : bodyPage.list("ul#_listUl > li > a")) {
String title = node.text("span.subj > span");
String path = "https:" + node.href();
list.add(new Chapter(title, path));
}
} catch (Manga.NetworkErrorException e) {
e.printStackTrace();
}
}
}
return list;
}
Expand Down

0 comments on commit ea49506

Please sign in to comment.