Fix TwoGuysAndGuy (fixes #239)

This commit is contained in:
Tobias Gruetzmacher 2023-07-18 22:06:47 +02:00
parent b4e2e5d2f9
commit 4b98223dad
No known key found for this signature in database

View file

@ -1,8 +1,8 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # SPDX-FileCopyrightText: © 2004 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam # SPDX-FileCopyrightText: © 2012 Bastian Kleineidam
# Copyright (C) 2015-2022 Tobias Gruetzmacher # SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring # SPDX-FileCopyrightText: © 2019 Daniel Ring
from re import compile, escape, MULTILINE from re import compile, escape, MULTILINE
try: try:
from functools import cached_property from functools import cached_property
@ -346,15 +346,11 @@ class TwinDragons(WordPressScraper):
multipleImagesPerStrip = True multipleImagesPerStrip = True
class TwoGuysAndGuy(_BasicScraper): class TwoGuysAndGuy(ComicControlScraper):
url = 'http://www.twogag.com/' url = 'https://twogag.com/'
rurl = escape(url)
stripUrl = url + 'archives/%s' stripUrl = url + 'archives/%s'
firstStripUrl = stripUrl % '4' firstStripUrl = stripUrl % '4'
imageSearch = compile(tagre('img', 'src', r'(%scomics/\d{4}-\d{2}-\d{2}[^"]*)' % rurl)) help = 'Index format: number[-name]'
prevSearch = compile(tagre('a', 'href', r'(%sarchives/\d+)' % rurl,
after='title="Previous"'))
help = 'Index format: number'
adult = True adult = True