From: David ‘Bombe’ Roden Date: Sun, 12 Jun 2022 17:03:04 +0000 (+0200) Subject: 🚑️ Update filter for Cyanide & Happiness X-Git-Tag: v2~53 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=15e9d53a33f0b1b6070243d7d3f1aba4c647f38c;p=rhynodge.git 🚑️ Update filter for Cyanide & Happiness --- 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