fixed Wulffmorgenthaler (now Wumo), added TruthFacts and MeAndDanielle
This commit is contained in:
parent
4cd88ecdc0
commit
ceb19ed2bc
2 changed files with 19 additions and 11 deletions
19
dosagelib/plugins/kindofnormal.py
Normal file
19
dosagelib/plugins/kindofnormal.py
Normal 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
|
|
@ -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'
|
|
||||||
|
|
Loading…
Reference in a new issue