From 15e9d53a33f0b1b6070243d7d3f1aba4c647f38c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 12 Jun 2022 19:03:04 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=9A=91=EF=B8=8F=20Update=20filter=20for=20?= =?utf8?q?Cyanide=20&=20Happiness?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../comics/CyanideAndHappinessComicFilter.java | 2 +- .../comics/CyanideAndHappinessComicFilterTest.java | 6 +- .../filters/comics/cyanide-and-happiness.html | 734 +++++++-------------- 3 files changed, 259 insertions(+), 483 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilter.java index f8d116f..80c8ac4 100644 --- a/src/main/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilter.java +++ b/src/main/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilter.java @@ -50,7 +50,7 @@ public class CyanideAndHappinessComicFilter extends ComicSiteFilter { @Override protected List extractImageUrls(Document document) { - Elements imageTags = document.select("img#main-comic"); + Elements imageTags = document.select(".MainComic__ComicImage-sc-ndbx87-2 > span noscript img"); return FluentIterable.from(imageTags).transform(new Function() { @Override diff --git a/src/test/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilterTest.java b/src/test/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilterTest.java index f4ddcfd..bea429a 100644 --- a/src/test/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilterTest.java +++ b/src/test/java/net/pterodactylus/rhynodge/filters/comics/CyanideAndHappinessComicFilterTest.java @@ -24,8 +24,8 @@ public class CyanideAndHappinessComicFilterTest { private final HtmlState htmlState; public CyanideAndHappinessComicFilterTest() throws IOException { - document = ResourceLoader.loadDocument(getClass(), "cyanide-and-happiness.html", "http://www.explosm.net/comics/new/"); - htmlState = new HtmlState("http://files.explosm.net/comics/Kris/skeletor.png", document); + document = ResourceLoader.loadDocument(getClass(), "cyanide-and-happiness.html", "https://explosm.net/"); + htmlState = new HtmlState("https://explosm.net/", document); } @Test @@ -33,7 +33,7 @@ public class CyanideAndHappinessComicFilterTest { ComicState comicState = (ComicState) comicSiteFilter.filter(htmlState); assertThat(comicState.comics(), contains( ComicMatchers.isComic("", contains( - ComicMatchers.isStrip("http://files.explosm.net/comics/Kris/skeletor.png", "") + ComicMatchers.isStrip("https://static.explosm.net/2022/06/11022918/bringaparent.png", "") )) )); } diff --git a/src/test/resources/net/pterodactylus/rhynodge/filters/comics/cyanide-and-happiness.html b/src/test/resources/net/pterodactylus/rhynodge/filters/comics/cyanide-and-happiness.html index c8e9368..140712d 100644 --- a/src/test/resources/net/pterodactylus/rhynodge/filters/comics/cyanide-and-happiness.html +++ b/src/test/resources/net/pterodactylus/rhynodge/filters/comics/cyanide-and-happiness.html @@ -1,479 +1,255 @@ - - - - - Cyanide & Happiness (Explosm.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- -
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
-
-
-
-
-
-
- Register  |  Sign In -
-
-
- -
-
- -
-
-
- - - -
- -
-
-
- - - -
- -
-
-
-
- -
-
-
- -
-
-
-
-
-
-
- -
- -
-
-
- -
-
-

- -

- - -



-
-
-
-

More from Explosm

-
-
-

Loading...

-
-
-
-   -
-

Sign in to post a comment

-
-

Loading...

-
-
-
-
-
-
-

Advertisement

-
- -
-
-
- -
-
-
-
-
-
-
-
-
-

Did you know by creating an account you can favorite comics and shorts, automatically bookmark the last one you saw, and more? Learn more about it here!

-
-
- Sign up! -
-
-
- - - - - -
-
-
-
-
-
-

Log in or Register

-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
- -
-
-
-
-
-
-
-
- Don't have an account? Join the cool kids here! -
-
-
-
-
- - - - - - - - - - - - - - - - -
- - - -
- -
- -
- - +Cyanide & Happiness (Explosm.net)
Explosm

The Perfect Woman

Holy moly. Hubba hubba. Awooooga! Go watch this week's sexy new original short.

Watch Now

2022.06.11

by Dave McElfatrick

Follow for More Explosm!

\ No newline at end of file -- 2.7.4