# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2013 Bastian Kleineidam from re import compile, escape from ..scraper import _BasicScraper from ..helpers import indirectStarter from ..util import tagre class Galaxion(_BasicScraper): url = 'http://galaxioncomics.com/' rurl = escape(url) stripUrl = url + '%s/' imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev")) help = 'Index format: n-comic/book-n/chapter-n/title-nnn' class Garanos(_BasicScraper): baseurl = 'http://garanos.alexheberling.com/' rurl = escape(baseurl) url = baseurl + 'pages/page-1/' starter = indirectStarter(url, compile(tagre("a", "href", r'(%spages/[^"]+)' % rurl, after="navi-last"))) stripUrl = baseurl + 'pages/page-%s' imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) prevSearch = compile(tagre("a", "href", r'(%spages/[^"]+)' % rurl, after="prev")) help = 'Index format: n (unpadded)' class GastroPhobia(_BasicScraper): url = 'http://www.gastrophobia.com/' stripUrl = url + 'index.php?date=%s' imageSearch = compile(r']*>(?!
)') prevSearch = compile(r'« Previous') help = 'Index format: nnn' class GeeksNextDoor(_BasicScraper): url = 'http://www.geeksnextcomic.com/' stripUrl = url + '%s.html' imageSearch = compile(tagre("img", "src", r'(images/GND\d+[^"]+)')) prevSearch = compile(tagre("a", "href", r'(\d+-\d+-\d+\.html)') + tagre("img", "src", r'images/nav_prev\.png')) help = 'Index format: yyyy-mm-dd' class GirlsWithSlingshots(_BasicScraper): url = 'http://www.girlswithslingshots.com/' stripUrl = url + 'comic/gws-%s/' imageSearch = compile(tagre("img", "src", r'(http://(?:www|cdn)\.girlswithslingshots\.com/comics/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://www\.girlswithslingshots\.com/comic/[^"]+)', after="prev")) help = 'Index format: nnn' class GlassHalfEmpty(_BasicScraper): url = 'http://www.defectivity.com/ghe/index.php' stripUrl = url + '?strip_id=%s' imageSearch = compile(r'src="(comics/.+?)"') prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') + tagre("img", "src", r'\.\./images/arrowbuttons/onback\.jpg')) help = 'Index format: nnn' class GleefulNihilism(_BasicScraper): url = 'http://gleefulnihilism.com/' rurl = escape(url) stripUrl = url + 'comics/%s/' imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) prevSearch = compile(tagre("a", "href", r'(%scomics/[^"]+)' % rurl) + 'Previous') help = 'Index format: yyyy/mm/dd/stripname' class Goats(_BasicScraper): url = 'http://www.goats.com/' stripUrl = url + 'archive/%s.html' imageSearch = compile(r'') help = 'Index format: yymmdd' class GoblinsComic(_BasicScraper): url = 'http://www.goblinscomic.com/' rurl = escape(url) stripUrl = url + '%s/' firstStripUrl = stripUrl % '06252005' prevSearch = compile(tagre("a", "href", r'(%s\d+/)' % rurl, after="prev")) imageSearch = compile(tagre("img", "src", r'(%scomics/\d+\.[^"]+)' % rurl)) help = 'Index format: ddmmyyyy' class GoneWithTheBlastwave(_BasicScraper): url = 'http://www.blastwave-comic.com/index.php?p=comic&nro=1' starter = indirectStarter(url, compile(r'href="(index.php\?p=comic&nro=\d+)">