1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-01 11:30:19 +02:00

Adding thebarchive.com, archiveofsins.com, archive.nyafuu.org and rbt.asia to ChanRippers bakein domains

This commit is contained in:
Isaaku
2019-06-20 20:37:55 -05:00
parent bcaaa4fa32
commit 700ecee5e2
2 changed files with 7 additions and 2 deletions

View File

@@ -29,7 +29,11 @@ public class ChanRipper extends AbstractHTMLRipper {
new ChanSite("boards.420chan.org"),
new ChanSite("7chan.org"),
new ChanSite("desuarchive.org", "desu-usergeneratedcontent.xyz"),
new ChanSite("8ch.net", "media.8ch.net")
new ChanSite("8ch.net", "media.8ch.net"),
new ChanSite("thebarchive.com"),
new ChanSite("archiveofsins.com"),
new ChanSite("archive.nyafuu.org"),
new ChanSite("rbt.asia")
);
private static List<ChanSite> user_give_explicit_domains = getChansFromConfig(Utils.getConfigString("chans.chan_sites", null));
private static List<ChanSite> explicit_domains = new ArrayList<>();
@@ -146,7 +150,7 @@ public class ChanRipper extends AbstractHTMLRipper {
String u = url.toExternalForm();
if (u.contains("/thread/") || u.contains("/res/") || u.contains("yuki.la") || u.contains("55chan.org")) {
p = Pattern.compile("^.*\\.[a-z]{1,3}/[a-zA-Z0-9]+/(thread|res)/([0-9]+)(\\.html|\\.php)?.*$");
p = Pattern.compile("^.*\\.[a-z]{1,4}/[a-zA-Z0-9]+/(thread|res)/([0-9]+)(\\.html|\\.php)?.*$");
m = p.matcher(u);
if (m.matches()) {
return m.group(2);

View File

@@ -34,6 +34,7 @@ public class ChanRipperTest extends RippersTest {
passURLs.add(new URL("https://boards.4chan.org/hr/thread/3015701"));
passURLs.add(new URL("https://boards.420chan.org/420/res/232066.php"));
passURLs.add(new URL("http://7chan.org/gif/res/25873.html"));
passURLs.add(new URL("https://rbt.asia/g/thread/70643087/")); //must work with TLDs with len of 4
for (URL url : passURLs) {
ChanRipper ripper = new ChanRipper(url);
ripper.setup();