fixed ProperBarn, added 2214 and OTE
This commit is contained in:
parent
2c41435ceb
commit
766b7ba99d
2 changed files with 17 additions and 9 deletions
17
dosagelib/plugins/nitrocosm.py
Normal file
17
dosagelib/plugins/nitrocosm.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from ..scraper import make_scraper, _ParserScraper
|
||||
|
||||
|
||||
def add(name, relativeUrl):
|
||||
attrs = dict(
|
||||
name=name,
|
||||
url='http://www.nitrocosm.com/go/' + relativeUrl,
|
||||
imageSearch='//img[@class="gallery_display"]',
|
||||
prevSearch='//a[@class="nav_btn_previous"]'
|
||||
)
|
||||
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
|
||||
|
||||
|
||||
add('2214', '2214_classic/')
|
||||
add('OTE', 'ote/')
|
||||
add('ProperBarn', 'gag/')
|
|
@ -229,15 +229,6 @@ class PS238(_ParserScraper):
|
|||
help = 'Index format: yyyy-mm-dd'
|
||||
|
||||
|
||||
class ProperBarn(_BasicScraper):
|
||||
url = 'http://www.nitrocosm.com/go/gag/'
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '1'
|
||||
imageSearch = compile(tagre("img", "src", r'(http://content\.nitrocosm\.com/gag/\d+\.[^"]+)'))
|
||||
prevSearch = compile(tagre("a", "href", r'(http://www\.nitrocosm\.com/go/gag/\d+/)', after="nav_btn_previous"))
|
||||
help = 'Index format: nnn'
|
||||
|
||||
|
||||
class PunksAndNerds(_BasicScraper):
|
||||
url = 'http://www.punksandnerds.com/'
|
||||
rurl = escape(url)
|
||||
|
|
Loading…
Reference in a new issue