Skip to content

Commit

Permalink
ComicsKingdom: Use more reliable source for full-size image (fixes #323)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiX committed May 26, 2024
1 parent 5391b85 commit 2b7ca3f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dosagelib/plugins/comicskingdom.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: © 2019 Tobias Gruetzmacher
# SPDX-FileCopyrightText: © 2019 Thomas W. Littauer
from urllib.parse import parse_qs, urlsplit

from ..helpers import indirectStarter
from ..scraper import ParserScraper


class ComicsKingdom(ParserScraper):
partDiv = '//div[d:class("comic-reader-item")]'
imageSearch = partDiv + '[1]//a[contains(@href, "/custom-framed-print/")]'
imageSearch = '//meta[@property="og:image"]/@content'
prevSearch = partDiv + '[2]/@data-link'
starter = indirectStarter
help = 'Index format: yyyy-mm-dd'
Expand All @@ -22,10 +20,6 @@ def __init__(self, name, path, lang=None):
if lang:
self.lang = lang

def imageUrlModifier(self, url, data):
"""Extract high-quality image URL from link"""
return parse_qs(urlsplit(url).query)['img'][0]

def link_modifier(self, fromurl, tourl):
return tourl.replace('//wp.', '//', 1)

Expand Down

0 comments on commit 2b7ca3f

Please sign in to comment.