Skip to content

Commit

Permalink
fix MH50
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleydu committed Nov 30, 2020
1 parent bb22a2c commit 4ed0ec7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/src/main/java/com/hiroshi/cimoc/source/MH50.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ private String decrypt(String code) {

//根据文件名获取图片url,参考common.js中getChapterImage函数
private String getImageUrlByKey(String key, String domain, String chapter) {
if (Pattern.matches("\\^https?://(images.dmzj.com|imgsmall.dmzj.com)/i", key)) {
if (key.startsWith("http://images.dmzj.com")) {
try {
return domain + "/showImage.php?url=" + URLEncoder.encode(key, "utf-8");
return domain +"/showImage.php?url=" + key;
} catch (Exception e) {
return null;
}
Expand All @@ -159,14 +159,9 @@ private String getImageUrlByKey(String key, String domain, String chapter) {
return null;
}
}
if (Pattern.matches("\\^https?://(manhua.qpic.cn|mhimg.eshanyao.com|dd.wstts.com)/i",key)){
try {
return "https://manga.mipcdn.com/i/s"+URLEncoder.encode(key,"utf-8");
} catch (Exception e) {
return null;
}
if (key.startsWith("http") || key.startsWith("ftp")) {
return key;
}
if (key.startsWith("http") || key.startsWith("ftp")) return key;
return domain + "/" + chapter + key;
}

Expand Down

0 comments on commit 4ed0ec7

Please sign in to comment.