diff options
| author | wn_ <invalid@email.com> | 2025-04-04 17:33:05 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2025-04-04 17:33:05 +0000 |
| commit | c4788023a45eb10227cb1730ed4e77add0032561 (patch) | |
| tree | 43bfeb868f1bda3145e489e9b8f76fae8cc963a6 | |
| parent | 8df250f2ebabf8126f70595a666c17f65a84f2dc (diff) | |
Handle changes to GoComics.
| -rw-r--r-- | plugins/af_comics/filters/af_comics_gocomics.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/af_comics/filters/af_comics_gocomics.php b/plugins/af_comics/filters/af_comics_gocomics.php index 732f7d0b8..c72903140 100644 --- a/plugins/af_comics/filters/af_comics_gocomics.php +++ b/plugins/af_comics/filters/af_comics_gocomics.php @@ -27,13 +27,16 @@ class Af_Comics_Gocomics extends Af_ComicFilter { if (preg_match('#^https?://(?:feeds\.feedburner\.com/uclick|www\.gocomics\.com)/([-a-z0-9]+)$#i', $url, $comic)) { $site_url = 'https://www.gocomics.com/' . $comic[1]; - $article_link = $site_url . date('/Y/m/d'); + // no date suffix here since /whatever/$TODAY redirects to /whatever + $article_link = $site_url; $body = UrlHelper::fetch(array('url' => $article_link, 'type' => 'text/html', 'followlocation' => false)); $feed_title = htmlspecialchars($comic[1]); $site_url = htmlspecialchars($site_url); - $article_link = htmlspecialchars($article_link); + + // add the date suffix here to uniquely identify the "article" and provide the permalink + $article_link = htmlspecialchars($article_link) . date('/Y-m-d'); $tpl = new Templator(); @@ -51,7 +54,7 @@ class Af_Comics_Gocomics extends Af_ComicFilter { $xpath = new DOMXPath($doc); /** @var DOMElement|null $node */ - $node = $xpath->query('//picture[contains(@class, "item-comic-image")]/img')->item(0); + $node = $xpath->query('//button[@aria-label="Expand comic"]/img')->item(0); if ($node) { $title = $xpath->query('//h1')->item(0); |