From 9837a87a434ccb92fe6152715bdbad9db03f47af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damjan=20Ko=C5=A1ir?= Date: Sun, 26 Apr 2015 23:32:22 +1200 Subject: [PATCH] fixed omake teather --- dosagelib/plugins/o.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/dosagelib/plugins/o.py b/dosagelib/plugins/o.py index a606717be..1c9c2c2f4 100644 --- a/dosagelib/plugins/o.py +++ b/dosagelib/plugins/o.py @@ -3,7 +3,7 @@ # Copyright (C) 2012-2014 Bastian Kleineidam from re import compile, escape -from ..scraper import _BasicScraper +from ..scraper import _BasicScraper, _ParserScraper from ..helpers import indirectStarter from ..util import tagre @@ -68,15 +68,13 @@ class OkCancel(_BasicScraper): help = 'Index format: yyyymmdd' -class OmakeTheater(_BasicScraper): - url = 'http://omaketheater.com/' - rurl = escape(url) - stripUrl = url + 'comic/%s/' +class OmakeTheater(_ParserScraper): + url = 'http://omaketheater.com/comics/' + stripUrl = url + '%s/' firstStripUrl = stripUrl % '1' - imageSearch = compile(tagre("img", "src", r'(http://media\.omaketheater\.com/4koma/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, after="prev")) - starter = indirectStarter(url, - compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl))) + css = True + imageSearch = ".comicImage img" + prevSearch = ".previous a" help = 'Index format: number (unpadded)'