From 72418406b3cb50f67622fa28041a9595e4fe2636 Mon Sep 17 00:00:00 2001 From: metaprime Date: Wed, 29 Nov 2017 02:39:36 -0800 Subject: [PATCH 1/2] Fix #266: Enable WordpressComicRipper konradokonski.com tests with updated URLs. --- .../tst/ripper/rippers/WordpressComicRipperTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WordpressComicRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WordpressComicRipperTest.java index a4c90a9a..e3d5c4a0 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WordpressComicRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WordpressComicRipperTest.java @@ -11,8 +11,8 @@ public class WordpressComicRipperTest extends RippersTest { // http://buttsmithy.com/archives/comic/p1 // http://themonsterunderthebed.net/?comic=test-post // http://prismblush.com/comic/hella-trap-pg-01/ - // http://www.konradokonski.com/sawdust/ - // http://www.konradokonski.com/wiory/ + // http://www.konradokonski.com/sawdust/comic/get-up/ + // http://www.konradokonski.com/wiory/comic/08182008/ // http://freeadultcomix.com/finders-feepaid-in-full-sparrow/ // http://thisis.delvecomic.com/NewWP/comic/in-too-deep/ // http://tnbtu.com/comic/01-00/ @@ -51,21 +51,17 @@ public class WordpressComicRipperTest extends RippersTest { 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 { WordpressComicRipper ripper = new WordpressComicRipper( - new URL("http://www.konradokonski.com/sawdust/")); + new URL("http://www.konradokonski.com/sawdust/comic/get-up/")); testRipper(ripper); } public void test_konradokonski_2() throws IOException { WordpressComicRipper ripper = new WordpressComicRipper( - new URL("http://www.konradokonski.com/wiory/")); + new URL("http://www.konradokonski.com/wiory/comic/08182008/")); testRipper(ripper); } - */ /* // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI From 3ff05e171ce47b09e30b57cc2cda5c53a1f1abeb Mon Sep 17 00:00:00 2001 From: metaprime Date: Wed, 29 Nov 2017 02:55:07 -0800 Subject: [PATCH 2/2] Fix konradokonski.com/wiory ripper --- .../ripper/rippers/WordpressComicRipper.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java index 6c19e704..e0a11b5d 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java @@ -27,8 +27,8 @@ public class WordpressComicRipper extends AbstractHTMLRipper { // http://buttsmithy.com/archives/comic/p1 // http://themonsterunderthebed.net/?comic=test-post // http://prismblush.com/comic/hella-trap-pg-01/ - // http://www.konradokonski.com/sawdust/ - // http://www.konradokonski.com/wiory/ + // http://www.konradokonski.com/sawdust/comic/get-up/ + // http://www.konradokonski.com/wiory/comic/08182008/ // http://freeadultcomix.com/finders-feepaid-in-full-sparrow/ // http://thisis.delvecomic.com/NewWP/comic/in-too-deep/ // http://tnbtu.com/comic/01-00/ @@ -67,9 +67,15 @@ public class WordpressComicRipper extends AbstractHTMLRipper { return true; } - Pattern konradokonskiPat = Pattern.compile("https?://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$"); - Matcher konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm()); - if (konradokonskiMat.matches()) { + Pattern konradokonskiSawdustPat = Pattern.compile("http://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$"); + Matcher konradokonskiSawdustMat = konradokonskiSawdustPat.matcher(url.toExternalForm()); + 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; }