Skip to content

Commit

Permalink
fix MH160, closed #124
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleydu committed Oct 22, 2020
1 parent 0f7b7d8 commit 6d0cb30
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/main/java/com/hiroshi/cimoc/source/MH160.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.hiroshi.cimoc.parser.UrlFilter;
import com.hiroshi.cimoc.soup.Node;
import com.hiroshi.cimoc.utils.DecryptionUtils;
import com.hiroshi.cimoc.utils.LogUtil;
import com.hiroshi.cimoc.utils.StringUtils;

import java.io.UnsupportedEncodingException;
Expand All @@ -31,7 +32,7 @@ public class MH160 extends MangaParser {

public static final int TYPE = 28;
public static final String DEFAULT_TITLE = "漫画160";
private static final String baseUrl = "https://m.mh160.co";
private static final String baseUrl = "https://www.mh160.xyz";

public static Source getDefaultSource() {
return new Source(null, DEFAULT_TITLE, TYPE, true);
Expand All @@ -49,7 +50,7 @@ public Request getSearchRequest(String keyword, int page) {
String url = StringUtils.format(baseUrl+"/statics/search.aspx?key=%s", keyword);
return new Request.Builder()
.addHeader("Referer", baseUrl)
.addHeader("Host","www.mh160.co")
.addHeader("Host","www.mh160.xyz")
.url(url)
.build();
}
Expand All @@ -76,7 +77,7 @@ public String getUrl(String cid) {

@Override
protected void initUrlFilterList() {
filter.add(new UrlFilter("m.mh160.co"));
filter.add(new UrlFilter("www.mh160.xyz"));
}

@Override
Expand All @@ -85,7 +86,7 @@ public Request getInfoRequest(String cid) {
return new Request.Builder()
.url(url)
.addHeader("Referer", baseUrl)
.addHeader("Host","www.mh160.co")
.addHeader("Host","www.mh160.xyz")
.build();
}

Expand Down Expand Up @@ -121,7 +122,7 @@ public Request getImagesRequest(String cid, String path) {
return new Request.Builder()
.url(url)
.addHeader("Referer", baseUrl)
.addHeader("Host","www.mh160.co")
.addHeader("Host","www.mh160.xyz")
.build();
}

Expand Down

0 comments on commit 6d0cb30

Please sign in to comment.