🔒️ Update a bunch of URLs to https
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2021 19:44:12 +0000 (21:44 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2021 19:44:12 +0000 (21:44 +0200)
14 files changed:
src/main/java/net/pterodactylus/rhynodge/watchers/AbstruseGooseWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/CtrlAltDelWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/CyanideAndHappinessWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/GeneralProtectionFaultWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/GirlGeniusWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/KevinAndKellWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/LeastICouldDoWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/PoorlyDrawnLinesWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/SaturdayMorningBreakfastCerealWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/ScandinaviaAndTheWorldWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/SinfestWatcher.java
src/main/java/net/pterodactylus/rhynodge/watchers/XkcdWatcher.java
src/main/kotlin/net/pterodactylus/rhynodge/watchers/TheMonsterUnderTheBedWatcher.kt
src/test/java/net/pterodactylus/rhynodge/filters/comics/ScandinaviaAndTheWorldComicFilterTest.java

index 0fd1105..f287599 100644 (file)
@@ -33,7 +33,7 @@ import net.pterodactylus.rhynodge.queries.HttpQuery;
 public class AbstruseGooseWatcher extends DefaultWatcher {
 
        public AbstruseGooseWatcher() {
-               super(new HttpQuery("http://abstrusegoose.com/"), Arrays.asList(new HtmlFilter(), new AbstruseGooseComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://abstrusegoose.com/"), Arrays.asList(new HtmlFilter(), new AbstruseGooseComicFilter()), new ComicMerger());
        }
 
 }
index ad93e1f..4eabb44 100644 (file)
@@ -34,7 +34,7 @@ public class CtrlAltDelWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public CtrlAltDelWatcher() {
-               super(new HttpQuery("http://www.cad-comic.com/cad/"), Arrays.asList(new HtmlFilter(), new CtrlAltDelComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://cad-comic.com/"), Arrays.asList(new HtmlFilter(), new CtrlAltDelComicFilter()), new ComicMerger());
        }
 
 }
index 331ec4b..377c5bc 100644 (file)
@@ -35,7 +35,7 @@ public class CyanideAndHappinessWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public CyanideAndHappinessWatcher() {
-               super(new HttpQuery("http://www.explosm.net/comics/new/"), Arrays.asList(new HtmlFilter(), new CyanideAndHappinessComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://explosm.net/"), Arrays.asList(new HtmlFilter(), new CyanideAndHappinessComicFilter()), new ComicMerger());
        }
 
 }
index f57762c..fae911a 100644 (file)
@@ -35,7 +35,7 @@ public class GeneralProtectionFaultWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public GeneralProtectionFaultWatcher() {
-               super(new HttpQuery("http://www.gpf-comics.com/"), Arrays.asList(new HtmlFilter(), new GeneralProtectionFaultComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://www.gpf-comics.com/"), Arrays.asList(new HtmlFilter(), new GeneralProtectionFaultComicFilter()), new ComicMerger());
        }
 
 }
index e1aa4a2..68e5e03 100644 (file)
@@ -34,7 +34,7 @@ public class GirlGeniusWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public GirlGeniusWatcher() {
-               super(new HttpQuery("http://www.girlgeniusonline.com/comic.php"), Arrays.asList(new HtmlFilter(), new GirlGeniusComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://www.girlgeniusonline.com/comic.php"), Arrays.asList(new HtmlFilter(), new GirlGeniusComicFilter()), new ComicMerger());
        }
 
 }
index 6826e25..749b95c 100644 (file)
@@ -34,7 +34,7 @@ public class KevinAndKellWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public KevinAndKellWatcher() {
-               super(new HttpQuery("http://www.kevinandkell.com/"), Arrays.asList(new HtmlFilter(), new KevinAndKellComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://kevinandkell.com/"), Arrays.asList(new HtmlFilter(), new KevinAndKellComicFilter()), new ComicMerger());
        }
 
 }
index 13d48c9..a620145 100644 (file)
@@ -43,7 +43,7 @@ public class LeastICouldDoWatcher extends DefaultWatcher {
 
        /** Creates a new “Least I Could Do” watcher. */
        public LeastICouldDoWatcher() {
-               super(new HttpQuery("http://www.leasticoulddo.com/"), createFilters(), new ComicMerger());
+               super(new HttpQuery("https://leasticoulddo.com/"), createFilters(), new ComicMerger());
        }
 
        //
index 0ea2849..533968a 100644 (file)
@@ -35,7 +35,7 @@ public class PoorlyDrawnLinesWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public PoorlyDrawnLinesWatcher() {
-               super(new HttpQuery("http://poorlydrawnlines.com/"), Arrays.asList(new HtmlFilter(), new PoorlyDrawnLinesComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://poorlydrawnlines.com/"), Arrays.asList(new HtmlFilter(), new PoorlyDrawnLinesComicFilter()), new ComicMerger());
        }
 
 }
index 3e90a00..d909f07 100644 (file)
@@ -35,7 +35,7 @@ public class SaturdayMorningBreakfastCerealWatcher extends DefaultWatcher {
 
        /** Creates a new watcher for Cyanide and Happiness comics. */
        public SaturdayMorningBreakfastCerealWatcher() {
-               super(new HttpQuery("http://www.smbc-comics.com/"), Arrays.asList(new HtmlFilter(), new SaturdayMorningBreakfastCerealComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://www.smbc-comics.com/"), Arrays.asList(new HtmlFilter(), new SaturdayMorningBreakfastCerealComicFilter()), new ComicMerger());
        }
 
 }
index cb7775f..592a488 100644 (file)
 
 package net.pterodactylus.rhynodge.watchers;
 
-import java.util.List;
-
-import net.pterodactylus.rhynodge.Filter;
-import net.pterodactylus.rhynodge.filters.ExtractUrlFilter;
 import net.pterodactylus.rhynodge.filters.HtmlFilter;
-import net.pterodactylus.rhynodge.filters.HttpQueryFilter;
 import net.pterodactylus.rhynodge.filters.comics.ScandinaviaAndTheWorldComicFilter;
 import net.pterodactylus.rhynodge.mergers.ComicMerger;
 import net.pterodactylus.rhynodge.queries.HttpQuery;
 
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableList;
-import org.jsoup.nodes.Document;
-import org.jsoup.select.Elements;
+import static java.util.Arrays.asList;
 
 /**
  * {@link net.pterodactylus.rhynodge.Watcher} implementation that watches for new Scandinavia and the World comics.
@@ -40,26 +32,7 @@ import org.jsoup.select.Elements;
 public class ScandinaviaAndTheWorldWatcher extends DefaultWatcher {
 
        public ScandinaviaAndTheWorldWatcher() {
-               super(new HttpQuery("http://satwcomic.com/"), createFilters(), new ComicMerger());
-       }
-
-       private static List<Filter> createFilters() {
-               ImmutableList.Builder<Filter> filters = ImmutableList.builder();
-
-               filters.add(new HtmlFilter());
-               filters.add(new ExtractUrlFilter() {
-
-                       @Override
-                       protected Optional<String> extractUrl(Document document) {
-                               Elements linkTag = document.select("a.btn-success");
-                               return linkTag.hasAttr("href") ? Optional.of(linkTag.attr("href")) : Optional.<String>absent();
-                       }
-               });
-               filters.add(new HttpQueryFilter());
-               filters.add(new HtmlFilter());
-               filters.add(new ScandinaviaAndTheWorldComicFilter());
-
-               return filters.build();
+               super(new HttpQuery("https://satwcomic.com/latest"), asList(new HtmlFilter(), new ScandinaviaAndTheWorldComicFilter()), new ComicMerger());
        }
 
 }
index 914f614..39911fd 100644 (file)
@@ -33,7 +33,7 @@ import net.pterodactylus.rhynodge.queries.HttpQuery;
 public class SinfestWatcher extends DefaultWatcher {
 
        public SinfestWatcher() {
-               super(new HttpQuery("http://www.sinfest.net/"), Arrays.asList(new HtmlFilter(), new SinfestComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://sinfest.xyz/"), Arrays.asList(new HtmlFilter(), new SinfestComicFilter()), new ComicMerger());
        }
 
 }
index 9829d82..a363281 100644 (file)
@@ -34,7 +34,7 @@ public class XkcdWatcher extends DefaultWatcher {
 
        /** Creates a new XKCD watcher. */
        public XkcdWatcher() {
-               super(new HttpQuery("http://xkcd.com/"), Arrays.asList(new HtmlFilter(), new XkcdComicFilter()), new ComicMerger());
+               super(new HttpQuery("https://xkcd.com/"), Arrays.asList(new HtmlFilter(), new XkcdComicFilter()), new ComicMerger());
        }
 
 }
index a596d12..116d520 100644 (file)
@@ -7,6 +7,6 @@ import net.pterodactylus.rhynodge.queries.*
 
 class TheMonsterUnderTheBedWatcher : DefaultWatcher(query, filters, merger)
 
-private val query = HttpQuery("http://themonsterunderthebed.net/")
+private val query = HttpQuery("https://themonsterunderthebed.net/")
 private val filters = listOf(HtmlFilter(), TheMonsterUnderTheBedFilter())
 private val merger = ComicMerger()
index be54a38..53461cb 100644 (file)
@@ -31,8 +31,8 @@ public class ScandinaviaAndTheWorldComicFilterTest {
 
        public ScandinaviaAndTheWorldComicFilterTest() throws IOException {
                Document document = ResourceLoader.loadDocument(ScandinaviaAndTheWorldComicFilter.class, "scandinavia-and-the-world.html",
-                               "http://satwcomic.com/");
-               htmlState = new HtmlState("http://satwcomic.com/", document);
+                               "https://satwcomic.com/latest");
+               htmlState = new HtmlState("https://satwcomic.com/latest", document);
        }
 
        @Test