2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2023-08-27 00:23:16 +00:00
|
|
|
# SPDX-FileCopyrightText: © 2004 Tristan Seligmann and Jonathan Jacobs
|
|
|
|
# SPDX-FileCopyrightText: © 2012 Bastian Kleineidam
|
|
|
|
# SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
|
|
|
|
# SPDX-FileCopyrightText: © 2019 Daniel Ring
|
2024-02-13 22:37:08 +00:00
|
|
|
from re import compile
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper, ParserScraper
|
2022-05-28 15:52:42 +00:00
|
|
|
from ..helpers import indirectStarter
|
2024-02-13 22:37:08 +00:00
|
|
|
from ..util import tagre, getQueryParams
|
2022-06-06 10:08:32 +00:00
|
|
|
from .common import ComicControlScraper, WordPressScraper, WordPressNavi
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class Galaxion(WordPressNavi):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://galaxioncomics.com/'
|
|
|
|
stripUrl = url + '%s/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1-comic/the-story-so-far/the-story-so-far'
|
2019-07-29 00:59:37 +00:00
|
|
|
multipleImagesPerStrip = True
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: n-comic/book-n/chapter-n/title-nnn'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class Garanos(WordPressScraper):
|
2020-01-09 16:38:13 +00:00
|
|
|
stripUrl = ('https://web.archive.org/web/20180314181433/'
|
|
|
|
'http://garanos.alexheberling.com/pages/%s/')
|
|
|
|
url = stripUrl % 'page-487'
|
|
|
|
firstStripUrl = stripUrl % 'vol01'
|
|
|
|
endOfLife = True
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
class GastroPhobia(ComicControlScraper):
|
|
|
|
url = 'https://gastrophobia.com/'
|
|
|
|
firstStripUrl = url + 'comix/the-mane-event'
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2020-01-09 16:38:13 +00:00
|
|
|
class Geeks(_ParserScraper):
|
|
|
|
url = ('https://web.archive.org/web/20190527194921/'
|
|
|
|
'http://sevenfloorsdown.com/geeks/')
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + 'archives/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '10'
|
2020-01-09 16:38:13 +00:00
|
|
|
imageSearch = '//div[@id="comic"]/img'
|
|
|
|
prevSearch = '//a[contains(text(), "Previous")]'
|
|
|
|
endOfLife = True
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: nnn'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2020-10-18 18:44:47 +00:00
|
|
|
class GeeksNextDoor(_ParserScraper):
|
2013-03-11 21:51:45 +00:00
|
|
|
url = 'http://www.geeksnextcomic.com/'
|
|
|
|
stripUrl = url + '%s.html'
|
2020-10-18 18:44:47 +00:00
|
|
|
firstStripUrl = stripUrl % '2007-03-27' # '2010-10-04'
|
2024-02-13 22:37:08 +00:00
|
|
|
imageSearch = ('//p/img', '//p/span/img')
|
2020-10-18 18:44:47 +00:00
|
|
|
prevSearch = (
|
|
|
|
'//a[img[contains(@src, "/nav_prev")]]',
|
|
|
|
'//a[contains(text(), "< prev")]', # start page is different
|
|
|
|
)
|
2013-03-11 21:51:45 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
class GirlGenius(ParserScraper):
|
|
|
|
url = 'https://www.girlgeniusonline.com/comic.php'
|
2013-04-26 17:52:45 +00:00
|
|
|
stripUrl = url + '?date=%s'
|
2013-04-25 18:58:24 +00:00
|
|
|
firstStripUrl = stripUrl % '20021104'
|
2024-02-13 22:37:08 +00:00
|
|
|
imageSearch = '//img[@alt="Comic"]'
|
|
|
|
prevSearch = '//a[@id="topprev"]'
|
2014-06-13 20:43:40 +00:00
|
|
|
multipleImagesPerStrip = True
|
2013-04-25 18:58:24 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
def shouldSkipUrl(self, url, data):
|
|
|
|
"""Skip pages without images."""
|
|
|
|
return not data.xpath('//div[@id="comicbody"]//img[contains(@src, "comic")]')
|
|
|
|
|
2016-03-20 19:10:04 +00:00
|
|
|
|
2023-08-27 00:23:16 +00:00
|
|
|
class GirlsWithSlingshots(ComicControlScraper):
|
2019-06-26 21:22:45 +00:00
|
|
|
url = 'https://girlswithslingshots.com/'
|
2023-08-27 00:23:16 +00:00
|
|
|
firstStripUrl = url + 'comic/gws1'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GleefulNihilism(WordPressScraper):
|
2020-01-09 16:38:13 +00:00
|
|
|
url = ('https://web.archive.org/web/20170911203122/'
|
|
|
|
'http://gleefulnihilism.com/')
|
2013-11-12 17:33:14 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'amoeba'
|
2020-01-09 16:38:13 +00:00
|
|
|
endOfLife = True
|
2013-11-12 17:33:14 +00:00
|
|
|
help = 'Index format: stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GoblinsComic(ComicControlScraper):
|
2013-07-09 20:21:17 +00:00
|
|
|
url = 'http://www.goblinscomic.org/'
|
2013-04-09 17:37:24 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GodChild(WordPressScraper):
|
2016-10-13 22:14:53 +00:00
|
|
|
url = 'http://godchild.keenspot.com/'
|
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GoGetARoomie(ComicControlScraper):
|
2016-04-03 22:12:53 +00:00
|
|
|
url = 'http://www.gogetaroomie.com'
|
|
|
|
|
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
class GoneWithTheBlastwave(ParserScraper):
|
|
|
|
stripUrl = 'http://www.blastwave-comic.com/index.php?p=comic&nro=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2024-02-13 22:37:08 +00:00
|
|
|
url = firstStripUrl
|
|
|
|
starter = indirectStarter
|
|
|
|
imageSearch = '//*[@id="comic_ruutu"]/center/img'
|
|
|
|
prevSearch = '//a[img[contains(@src, "previous")]]'
|
|
|
|
latestSearch = '//a[img[contains(@src, "latest")]]'
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n'
|
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
2024-02-13 22:37:08 +00:00
|
|
|
return '%02d' % int(getQueryParams(page_url)['nro'][0])
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GrrlPower(WordPressScraper):
|
2019-12-31 00:44:19 +00:00
|
|
|
url = 'https://grrlpowercomic.com/'
|
2019-06-13 06:04:09 +00:00
|
|
|
stripUrl = url + 'archives/comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'gp0001'
|
2013-01-29 20:42:10 +00:00
|
|
|
|
2021-03-19 23:52:28 +00:00
|
|
|
def __init__(self, name):
|
|
|
|
super().__init__(name)
|
|
|
|
self.session.add_throttle('grrlpowercomic.com', 1.0, 1.5)
|
|
|
|
|
2013-01-29 20:42:10 +00:00
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class GuildedAge(WordPressScraper):
|
2020-09-13 14:52:38 +00:00
|
|
|
url = 'http://guildedage.net/'
|
|
|
|
firstStripUrl = url + 'comic/chapter-1-cover/'
|
|
|
|
|
|
|
|
|
2024-02-13 22:37:08 +00:00
|
|
|
class GUComics(ParserScraper):
|
|
|
|
stripUrl = 'https://www.gucomics.com/%s'
|
|
|
|
url = stripUrl % 'comic/'
|
2016-03-31 21:13:54 +00:00
|
|
|
firstStripUrl = stripUrl % '20000710'
|
2024-02-13 22:37:08 +00:00
|
|
|
imageSearch = '//img[contains(@src, "/comics/2")]'
|
|
|
|
prevSearch = '//a[img[contains(@alt, "previous")]]'
|
2016-03-31 21:13:54 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2019-06-12 04:26:42 +00:00
|
|
|
class GunnerkriggCourt(_ParserScraper):
|
|
|
|
url = 'http://www.gunnerkrigg.com/'
|
2013-02-04 20:00:26 +00:00
|
|
|
stripUrl = url + '?p=%s'
|
2019-06-12 04:26:42 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = '//img[@class="comic_image"]'
|
|
|
|
prevSearch = '//a[./img[contains(@src, "prev")]]'
|
2013-01-29 18:00:29 +00:00
|
|
|
help = 'Index format: number'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Gunshow(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://gunshowcomic.com/'
|
|
|
|
stripUrl = url + '%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2016-03-20 19:10:04 +00:00
|
|
|
imageSearch = compile(tagre("img", "src",
|
|
|
|
r'(http://gunshowcomic\.com/comics/[^"]+)'))
|
2012-12-04 06:02:40 +00:00
|
|
|
multipleImagesPerStrip = True
|
2016-03-20 19:10:04 +00:00
|
|
|
prevSearch = compile(
|
|
|
|
tagre("a", "href", r'([^"]+)') +
|
|
|
|
tagre("img", "src", r'[^"]*menu/small/previous\.gif'))
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: n'
|