mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-06 13:56:34 +02:00
Adding thebarchive.com, archiveofsins.com, archive.nyafuu.org and rbt.asia to ChanRippers bakein domains
This commit is contained in:
@@ -29,7 +29,11 @@ public class ChanRipper extends AbstractHTMLRipper {
|
|||||||
new ChanSite("boards.420chan.org"),
|
new ChanSite("boards.420chan.org"),
|
||||||
new ChanSite("7chan.org"),
|
new ChanSite("7chan.org"),
|
||||||
new ChanSite("desuarchive.org", "desu-usergeneratedcontent.xyz"),
|
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> user_give_explicit_domains = getChansFromConfig(Utils.getConfigString("chans.chan_sites", null));
|
||||||
private static List<ChanSite> explicit_domains = new ArrayList<>();
|
private static List<ChanSite> explicit_domains = new ArrayList<>();
|
||||||
@@ -146,7 +150,7 @@ public class ChanRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
String u = url.toExternalForm();
|
String u = url.toExternalForm();
|
||||||
if (u.contains("/thread/") || u.contains("/res/") || u.contains("yuki.la") || u.contains("55chan.org")) {
|
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);
|
m = p.matcher(u);
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
return m.group(2);
|
return m.group(2);
|
||||||
|
@@ -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.4chan.org/hr/thread/3015701"));
|
||||||
passURLs.add(new URL("https://boards.420chan.org/420/res/232066.php"));
|
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("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) {
|
for (URL url : passURLs) {
|
||||||
ChanRipper ripper = new ChanRipper(url);
|
ChanRipper ripper = new ChanRipper(url);
|
||||||
ripper.setup();
|
ripper.setup();
|
||||||
|
Reference in New Issue
Block a user