# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2017 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from re import compile, escape from ..helpers import xpath_class from ..scraper import _BasicScraper from ..util import tagre from .common import _WordPressScraper class IAmArg(_BasicScraper): url = 'http://iamarg.com/' rurl = escape(url) stripUrl = url + '%s/' firstStripUrl = stripUrl % '2011/05/08/05082011' imageSearch = compile(tagre("img", "src", r'(//iamarg.com/comics/\d+-\d+-\d+[^"]+)')) prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl, after="prev")) help = 'Index format: yyyy/mm/dd/stripname' class ICanBarelyDraw(_BasicScraper): url = 'http://www.icanbarelydraw.com/comic/' rurl = escape(url) stripUrl = url + '%s' firstStripUrl = stripUrl % '39' imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+-[^"]+)' % rurl)) prevSearch = compile(tagre("a", "href", r'(%s\d+)' % rurl)) help = 'Index format: number' class IDreamOfAJeanieBottle(_WordPressScraper): url = 'http://jeaniebottle.com/' class InternetWebcomic(_WordPressScraper): url = 'http://www.internet-webcomic.com/' stripUrl = url + '?p=%s' firstStripUrl = stripUrl % '30' prevSearch = '//a[%s]' % xpath_class('navi-prev') help = 'Index format: n' class IrregularWebcomic(_BasicScraper): url = 'http://www.irregularwebcomic.net/' stripUrl = url + '%s.html' firstStripUrl = stripUrl % '1' imageSearch = compile(r'') prevSearch = compile(r'Previous ') help = 'Index format: nnn' class ItsWalky(_WordPressScraper): url = 'http://www.itswalky.com/'