Merge pull request #294 from metaprime/test-konrad

Fix #266: Enable WordpressComicRipper konradokonski.com tests with updated URLs.
This commit is contained in:
metaprime 2017-11-29 03:31:15 -08:00 committed by GitHub
commit 8e6ec3e3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 13 deletions

View File

@ -27,8 +27,8 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
// http://buttsmithy.com/archives/comic/p1 // http://buttsmithy.com/archives/comic/p1
// http://themonsterunderthebed.net/?comic=test-post // http://themonsterunderthebed.net/?comic=test-post
// http://prismblush.com/comic/hella-trap-pg-01/ // http://prismblush.com/comic/hella-trap-pg-01/
// http://www.konradokonski.com/sawdust/ // http://www.konradokonski.com/sawdust/comic/get-up/
// http://www.konradokonski.com/wiory/ // http://www.konradokonski.com/wiory/comic/08182008/
// http://freeadultcomix.com/finders-feepaid-in-full-sparrow/ // http://freeadultcomix.com/finders-feepaid-in-full-sparrow/
// http://thisis.delvecomic.com/NewWP/comic/in-too-deep/ // http://thisis.delvecomic.com/NewWP/comic/in-too-deep/
// http://tnbtu.com/comic/01-00/ // http://tnbtu.com/comic/01-00/
@ -67,9 +67,15 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
return true; return true;
} }
Pattern konradokonskiPat = Pattern.compile("https?://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$"); Pattern konradokonskiSawdustPat = Pattern.compile("http://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$");
Matcher konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm()); Matcher konradokonskiSawdustMat = konradokonskiSawdustPat.matcher(url.toExternalForm());
if (konradokonskiMat.matches()) { if (konradokonskiSawdustMat.matches()) {
return true;
}
Pattern konradokonskiWioryPat = Pattern.compile("http://www.konradokonski.com/wiory/comic/([a-zA-Z0-9_-]*)/?$");
Matcher konradokonskiWioryMat = konradokonskiWioryPat.matcher(url.toExternalForm());
if (konradokonskiWioryMat.matches()) {
return true; return true;
} }

View File

@ -11,8 +11,8 @@ public class WordpressComicRipperTest extends RippersTest {
// http://buttsmithy.com/archives/comic/p1 // http://buttsmithy.com/archives/comic/p1
// http://themonsterunderthebed.net/?comic=test-post // http://themonsterunderthebed.net/?comic=test-post
// http://prismblush.com/comic/hella-trap-pg-01/ // http://prismblush.com/comic/hella-trap-pg-01/
// http://www.konradokonski.com/sawdust/ // http://www.konradokonski.com/sawdust/comic/get-up/
// http://www.konradokonski.com/wiory/ // http://www.konradokonski.com/wiory/comic/08182008/
// http://freeadultcomix.com/finders-feepaid-in-full-sparrow/ // http://freeadultcomix.com/finders-feepaid-in-full-sparrow/
// http://thisis.delvecomic.com/NewWP/comic/in-too-deep/ // http://thisis.delvecomic.com/NewWP/comic/in-too-deep/
// http://tnbtu.com/comic/01-00/ // http://tnbtu.com/comic/01-00/
@ -51,21 +51,17 @@ public class WordpressComicRipperTest extends RippersTest {
testRipper(ripper); testRipper(ripper);
} }
/*
// https://github.com/RipMeApp/ripme/issues/266 - WordpressRipper: konradokonski.com previously supported but now cannot rip
public void test_konradokonski_1() throws IOException { public void test_konradokonski_1() throws IOException {
WordpressComicRipper ripper = new WordpressComicRipper( WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://www.konradokonski.com/sawdust/")); new URL("http://www.konradokonski.com/sawdust/comic/get-up/"));
testRipper(ripper); testRipper(ripper);
} }
public void test_konradokonski_2() throws IOException { public void test_konradokonski_2() throws IOException {
WordpressComicRipper ripper = new WordpressComicRipper( WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://www.konradokonski.com/wiory/")); new URL("http://www.konradokonski.com/wiory/comic/08182008/"));
testRipper(ripper); testRipper(ripper);
} }
*/
/* /*
// https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI