Skip to content

Commit

Permalink
Restrict ComicsKingdom module to current comic
Browse files Browse the repository at this point in the history
This prevents the scraper from randomly switching to a different comic
(fixes #314)
  • Loading branch information
TobiX committed May 12, 2024
1 parent 0bfcd32 commit dce2999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dosagelib/plugins/comicskingdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class ComicsKingdom(ParserScraper):
partDiv = '//div[d:class("comic-reader-item")]'
imageSearch = partDiv + '[1]//a[contains(@href, "/custom-framed-print/")]'
prevSearch = partDiv + '[2]/@data-link'
latestSearch = '//a[re:test(@href, "/[0-9-]+$")]'
starter = indirectStarter
help = 'Index format: yyyy-mm-dd'

def __init__(self, name, path, lang=None):
super().__init__('ComicsKingdom/' + name)
self.url = 'https://comicskingdom.com/' + path
self.stripUrl = self.url + '/%s'
self.latestSearch = f'//a[re:test(@href, "/{path}/[0-9-]+$")]'
if lang:
self.lang = lang

Expand Down

0 comments on commit dce2999

Please sign in to comment.