2016-03-31 21:13:54 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-10-28 22:21:41 +00:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2017-01-12 01:01:10 +00:00
|
|
|
# Copyright (C) 2015-2017 Tobias Gruetzmacher
|
2012-11-21 20:57:26 +00:00
|
|
|
|
2016-03-31 21:13:54 +00:00
|
|
|
from __future__ import absolute_import, division, print_function
|
2016-04-01 22:14:31 +00:00
|
|
|
|
2013-04-10 16:19:11 +00:00
|
|
|
from re import compile, escape
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2016-04-05 21:58:43 +00:00
|
|
|
from ..util import tagre
|
2014-07-23 18:54:00 +00:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper
|
2017-02-13 21:41:17 +00:00
|
|
|
from ..helpers import indirectStarter, xpath_class
|
2016-05-01 23:25:34 +00:00
|
|
|
from .common import (_ComicControlScraper, _WordPressScraper, _WPNaviIn,
|
2017-02-13 21:41:17 +00:00
|
|
|
WP_PREV_SEARCH)
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class BadassMuthas(_BasicScraper):
|
|
|
|
url = 'http://badassmuthas.com/pages/comic.php'
|
|
|
|
stripUrl = url + '?%s'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-03-06 19:21:10 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/images/comicsissue[^"]+)'))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') +
|
|
|
|
tagre("img", "src", r'/images/comicsbuttonBack\.gif'))
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
2016-04-26 22:31:27 +00:00
|
|
|
class BadMachinery(_ParserScraper):
|
2013-02-06 21:08:36 +00:00
|
|
|
url = 'http://scarygoround.com/'
|
|
|
|
stripUrl = url + '?date=%s'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '20090918'
|
2016-04-26 22:31:27 +00:00
|
|
|
imageSearch = '//img[@class="comicimg"]'
|
|
|
|
prevSearch = '//a[contains(text(), "Previous")]'
|
2016-05-02 21:22:06 +00:00
|
|
|
broken_html_bugfix = True
|
2013-02-06 21:08:36 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2016-04-03 22:12:53 +00:00
|
|
|
class BalderDash(_ComicControlScraper):
|
|
|
|
url = 'http://www.balderdashcomic.com/'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class Bardsworth(_WordPressScraper):
|
|
|
|
url = 'http://www.bardsworth.com/'
|
2016-04-12 21:11:39 +00:00
|
|
|
latestSearch = '//a[@rel="bookmark"]'
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2016-04-01 22:14:31 +00:00
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class Baroquen(_BasicScraper):
|
|
|
|
url = 'http://www.baroquencomics.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + '%s/'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '2008/11/05/raise-the-curtains'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%sComics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after='prev'))
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/strip-name'
|
|
|
|
|
|
|
|
|
2016-04-10 21:04:34 +00:00
|
|
|
class Bearmageddon(_WordPressScraper):
|
2013-03-06 19:00:30 +00:00
|
|
|
url = 'http://bearmageddon.com/'
|
2016-04-10 21:04:34 +00:00
|
|
|
firstStripUrl = url + '2011/08/01/page-1/'
|
2016-09-28 23:29:01 +00:00
|
|
|
latestSearch = '//a[div[%s]]' % xpath_class('latest-page')
|
|
|
|
starter = indirectStarter
|
2013-03-06 19:00:30 +00:00
|
|
|
|
|
|
|
|
2015-02-01 00:07:35 +00:00
|
|
|
class Beetlebum(_BasicScraper):
|
|
|
|
url = 'http://blog.beetlebum.de/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '%s'
|
|
|
|
firstStripUrl = stripUrl % '2006/03/10/quiz-fur-ruskiphile'
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2015-02-01 00:07:35 +00:00
|
|
|
multipleImagesPerStrip = True
|
2015-03-22 16:13:53 +00:00
|
|
|
imageSearch = compile(tagre('img', 'src', r'(http://blog\.beetlebum\.de/wp-content/uploads/[^"]+)'))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre('a', 'href',
|
|
|
|
r'(%s\d{4}/\d{2}/\d{2}/[^"]*)' % rurl,
|
|
|
|
after='prev'))
|
2016-04-12 21:11:39 +00:00
|
|
|
latestSearch = compile(tagre('a', 'href',
|
|
|
|
r'(%s\d{4}/\d{2}/\d{2}/[^"]+)' % rurl,
|
|
|
|
after='bookmark'))
|
2015-02-01 00:07:35 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/striptitle'
|
|
|
|
lang = 'de'
|
2015-03-22 16:13:53 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
|
|
|
indexes = tuple(page_url.rstrip('/').split('/')[-4:])
|
2015-02-01 00:07:35 +00:00
|
|
|
name = '%s-%s-%s-%s' % indexes
|
2016-04-21 06:20:49 +00:00
|
|
|
name = name + '_' + image_url.split('/')[-1]
|
2015-02-01 00:07:35 +00:00
|
|
|
return name
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class BetterDays(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://jaynaylor.com/betterdays/'
|
|
|
|
stripUrl = url + 'archives/%s.html'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '2003/04/post-2'
|
2012-12-02 17:35:06 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/betterdays/comic/[^>]+)', quote=""))
|
2012-11-20 17:53:53 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') + '« Previous')
|
|
|
|
help = 'Index format: yyyy/mm/<your guess>'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class BetweenFailures(_BasicScraper):
|
|
|
|
url = 'http://betweenfailures.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-28 17:58:38 +00:00
|
|
|
stripUrl = url + 'comics1/%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]+)' % rurl))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%scomics1/[^"]+)' % rurl,
|
|
|
|
after="previous"))
|
2013-04-28 17:58:38 +00:00
|
|
|
help = 'Index format: stripname'
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class BiggerThanCheeses(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.biggercheese.com/'
|
|
|
|
stripUrl = url + 'index.php?comic=%s'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'src="(comics/.+?)" alt')
|
|
|
|
prevSearch = compile(r'"(index.php\?comic=.+?)".+?_back')
|
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
2016-04-26 22:31:27 +00:00
|
|
|
class BillyTheDunce(_ParserScraper):
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://www.duncepress.com/'
|
2016-04-26 22:31:27 +00:00
|
|
|
firstStripUrl = url + '2009/06/an-introduction-of-sorts'
|
|
|
|
imageSearch = '//div[@class="entry"]/p[1]/a'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
latestSearch = '//h2[@class="post-title"]/a'
|
|
|
|
starter = indirectStarter
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2017-05-14 22:27:28 +00:00
|
|
|
class BlankIt(_ParserScraper):
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://blankitcomics.com/'
|
2017-05-14 22:27:28 +00:00
|
|
|
firstStripUrl = url + 'comic/well-what-would-you-do'
|
|
|
|
imageSearch = '//div[@id="comic"]//img'
|
|
|
|
prevSearch = '//a[%s]' % xpath_class('comic-nav-previous')
|
|
|
|
latestSearch = '//a[%s]' % xpath_class('comic-nav-last')
|
|
|
|
starter = indirectStarter
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class BloodBound(_WordPressScraper):
|
|
|
|
url = 'http://bloodboundcomic.com/'
|
|
|
|
firstStripUrl = 'http://bloodboundcomic.com/comic/06112006/'
|
|
|
|
|
|
|
|
|
2016-04-05 21:58:43 +00:00
|
|
|
class BloomingFaeries(_ParserScraper):
|
2015-09-02 14:13:42 +00:00
|
|
|
adult = True
|
|
|
|
url = 'http://www.bloomingfaeries.com/'
|
2016-04-05 21:58:43 +00:00
|
|
|
firstStripUrl = url + 'comic/public/pit-stop/'
|
|
|
|
imageSearch = '//div[@id="comic"]//img'
|
|
|
|
prevSearch = WP_PREV_SEARCH
|
2016-03-31 21:13:54 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
2016-04-05 21:58:43 +00:00
|
|
|
return "_".join(image_url.rsplit('/', 3)[1:])
|
2016-03-31 21:13:54 +00:00
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
class BMovieComic(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.bmoviecomic.com/'
|
|
|
|
stripUrl = url + '?cid=%s'
|
2013-04-10 16:19:11 +00:00
|
|
|
firstStripUrl = stripUrl % '8'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'"(comics/.+?)"')
|
|
|
|
prevSearch = compile(r'(\?cid=.+?)".+?Prev')
|
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
2016-06-05 16:31:30 +00:00
|
|
|
class BobWhite(_ParserScraper):
|
|
|
|
url = 'http://www.bobwhitecomics.com/'
|
|
|
|
imageSearch = '//span[%s]/img' % xpath_class('webcomic-object')
|
|
|
|
prevSearch = '//a[@rel="previous"]'
|
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class BookOfBiff(_BasicScraper):
|
2013-11-12 17:33:14 +00:00
|
|
|
url = 'http://thebookofbiff.com/'
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2006/01/02/4'
|
2013-03-06 19:21:10 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]+/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous"))
|
2013-04-10 21:57:09 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/stripnum-stripname'
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2013-04-10 16:36:33 +00:00
|
|
|
class BoredAndEvil(_BasicScraper):
|
|
|
|
url = 'http://www.boredandevil.com/'
|
|
|
|
stripUrl = url + '?date=%s'
|
|
|
|
firstStripUrl = stripUrl % '2004-06-07'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(strips/[^"]+)'))
|
|
|
|
prevSearch = compile(r'First Comic.+<a href="(.+?)".+previous-on.gif')
|
2016-04-12 21:11:39 +00:00
|
|
|
latestSearch = prevSearch
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2013-04-10 16:36:33 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class BratHalla(_WordPressScraper):
|
|
|
|
url = 'http://brat-halla.com/'
|
|
|
|
|
|
|
|
|
2016-03-31 21:13:54 +00:00
|
|
|
class Brink(_BasicScraper):
|
|
|
|
url = 'http://paperfangs.com/brink/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '?p=%s'
|
|
|
|
firstStripUrl = stripUrl % '5'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
|
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class BroodHollow(_WordPressScraper):
|
|
|
|
url = 'http://broodhollow.chainsawsuit.com/'
|
|
|
|
firstStripUrl = 'http://broodhollow.chainsawsuit.com/page/2012/10/06/book-1-curious-little-thing'
|
|
|
|
|
2016-09-28 23:29:01 +00:00
|
|
|
def shouldSkipUrl(self, url, data):
|
|
|
|
return data.xpath('//div[@id="comic"]//iframe')
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
|
|
|
|
class Buni(_WordPressScraper):
|
|
|
|
url = 'http://www.bunicomic.com/'
|
|
|
|
|
|
|
|
|
2016-05-01 23:25:34 +00:00
|
|
|
class BusinessCat(_WPNaviIn):
|
2016-04-01 22:14:31 +00:00
|
|
|
url = 'http://www.businesscat.happyjar.com/'
|
|
|
|
|
|
|
|
|
2015-07-17 23:21:29 +00:00
|
|
|
class ButtercupFestival(_ParserScraper):
|
2013-02-06 21:08:36 +00:00
|
|
|
url = 'http://www.buttercupfestival.com/'
|
2015-07-17 23:21:29 +00:00
|
|
|
stripUrl = url + '%s.htm'
|
|
|
|
firstStripUrl = stripUrl % '2-1'
|
|
|
|
imageSearch = '//center/img'
|
|
|
|
prevSearch = '//a[text()="previous"]'
|
|
|
|
help = 'Index format: 2-number'
|
2013-02-06 21:08:36 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class ButternutSquash(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.butternutsquash.net/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2003/04/16/meet-da-punks'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/strip-name-author-name'
|
2016-03-31 21:13:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ButterSafe(_BasicScraper):
|
|
|
|
url = 'http://buttersafe.com/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2007/04/03/breakfast-sad-turtle'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s\d+\d+/\d+/\d+/[^"]+)' % rurl,
|
|
|
|
after="prev"))
|
|
|
|
help = 'Index format: yyyy/mm/dd/stripname'
|