Package com.rarchives.ripme.ripper.rippers

Examples of com.rarchives.ripme.ripper.rippers.ChanRipper


    public void testChanURLFailures() throws IOException {
        List<URL> failURLs = new ArrayList<URL>();
        // URLs that should not work
        for (URL url : failURLs) {
            try {
                new ChanRipper(url);
                fail("Instantiated ripper for URL that should not work: " + url);
            } catch (Exception e) {
                // Expected
                continue;
            }
View Full Code Here


        passURLs.add(new URL("http://unichan2.org/b/res/518004.html"));
        passURLs.add(new URL("http://xchan.pw/porn/res/437.html"));
        passURLs.add(new URL("http://archive.moe/c/thread/2295132/"));
        for (URL url : passURLs) {
            try {
                ChanRipper ripper = new ChanRipper(url);
                assert(ripper.canRip(url));
                deleteDir(ripper.getWorkingDir());
            } catch (Exception e) {
                fail("Failed to instantiate ripper for " + url + " with message: "+e.toString());
            }
        }
    }
View Full Code Here

        contentURLs.add(new URL("http://unichan2.org/b/res/518004.html"));
        contentURLs.add(new URL("http://xchan.pw/porn/res/437.html"));
        contentURLs.add(new URL("http://archive.4plebs.org/hr/thread/2215899/"));
        for (URL url : contentURLs) {
            try {
                ChanRipper ripper = new ChanRipper(url);
                ripper.rip();
                assert(ripper.getWorkingDir().listFiles().length > 1);
                deleteDir(ripper.getWorkingDir());
            } catch (Exception e) {
                e.printStackTrace();
                fail("Error while ripping URL " + url + ": " + e.getMessage());
            }
        }
View Full Code Here

TOP

Related Classes of com.rarchives.ripme.ripper.rippers.ChanRipper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.