Merge pull request #668 from cyian-1756/4chanNewDomain

4chan new domain

Failed test due to that page not existing anymore. Should remove test/update it.
This commit is contained in:
Kevin Jiang 2018-06-09 13:32:28 -04:00 committed by GitHub
commit b12821f8cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ import com.rarchives.ripme.utils.RipUtils;
public class ChanRipper extends AbstractHTMLRipper { public class ChanRipper extends AbstractHTMLRipper {
private static List<ChanSite> explicit_domains = Arrays.asList( private static List<ChanSite> explicit_domains = Arrays.asList(
new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org")), new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org", "is3.4chan.org")),
new ChanSite(Arrays.asList("4archive.org"), Arrays.asList("imgur.com")), new ChanSite(Arrays.asList("4archive.org"), Arrays.asList("imgur.com")),
new ChanSite(Arrays.asList("archive.4plebs.org"), Arrays.asList("img.4plebs.org")) new ChanSite(Arrays.asList("archive.4plebs.org"), Arrays.asList("img.4plebs.org"))
); );
@ -85,8 +85,10 @@ public class ChanRipper extends AbstractHTMLRipper {
return true; return true;
} }
} }
return url.toExternalForm().contains("/res/") // Most chans if (url.toExternalForm().contains("desuchan.net") && url.toExternalForm().contains("/res/")) {
|| url.toExternalForm().contains("/thread/"); // 4chan, archive.moe return true;
}
return false;
} }
/** /**