fixed Wulffmorgenthaler (now Wumo), added TruthFacts and MeAndDanielle

This commit is contained in:
Damjan Košir 2015-06-01 12:14:52 +12:00
parent 4cd88ecdc0
commit ceb19ed2bc
2 changed files with 19 additions and 11 deletions

View file

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from dosagelib.helpers import indirectStarter
from ..scraper import make_scraper, _ParserScraper
def add(name, url):
attrs = dict(
name=name,
url='http://kindofnormal.com/' + url,
imageSearch='//article[1]//div[@class="box-content"]//img',
prevSearch='//a[@class="prev"]'
)
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
add('MeAndDanielle', 'meanddanielle')
add('TruthFacts', 'truthfacts')
add('Wumo', 'wumo')
add('Wulffmorgenthaler', 'wumo') # name in previous versions

View file

@ -239,14 +239,3 @@ class _WorldOfWarcraftEh(_BasicScraper):
stripUrl = None stripUrl = None
imageSearch = compile(r'http://woweh.com/(comics/.+?)"') imageSearch = compile(r'http://woweh.com/(comics/.+?)"')
prevSearch = compile(r'woweh.com/(\?p=.+:?)".+:?="prev') prevSearch = compile(r'woweh.com/(\?p=.+:?)".+:?="prev')
class Wulffmorgenthaler(_BasicScraper):
url = 'http://kindofnormal.com/wumo/'
rurl = escape(url)
stripUrl = url + '%s'
imageSearch = compile(tagre("div", "class", r'box-content') + r"\s*" +
tagre("a", "href", r'[^"]+') + r"\s*" +
tagre("img", "src", r'(http://kindofnormal\.com/img/wumo/\d+/\d+/[^/"]+)'))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl) + tagre("i", "class", r'icon-chevron-left'))
help = 'Index format: yyyy/mm/dd'