dosage/dosagelib/plugins/m.py

126 lines
4.7 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2013-02-05 18:51:46 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-11-21 20:57:26 +00:00
2012-06-20 19:58:13 +00:00
from re import compile, IGNORECASE
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
from ..util import tagre
2012-06-20 19:58:13 +00:00
2012-11-21 20:57:26 +00:00
# broken links - disable for now
class _MadamAndEve(_BasicScraper):
url = 'http://www.madamandeve.co.za/week_of_cartns.php'
stripUrl = None
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<IMG BORDER="0" SRC="(cartoons/me\d{6}\.(gif|jpg))">')
prevSearch = compile(r'<a href="(weekend_cartoon.php)"')
class MagickChicks(_BasicScraper):
url = 'http://www.magickchicks.com/'
stripUrl = url + 'strips-mc/%s'
imageSearch = compile(tagre("img", "src", r'([^"]*/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'([^"]*/strips-mc/[^"]+)', before="cn[id]prevt"))
help = 'Index format: name'
2013-02-13 16:52:49 +00:00
class ManlyGuysDoingManlyThings(_BasicScraper):
url = 'http://thepunchlineismachismo.com/'
stripUrl = url + 'archives/comic/%s'
imageSearch = compile(tagre("img", "src", r'(http://thepunchlineismachismo\.com/wp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://thepunchlineismachismo\.com/archives/comic/[^"]+)', after="previous"))
help = 'Index format: ddmmyyyy'
2012-06-20 19:58:13 +00:00
class Marilith(_BasicScraper):
url = 'http://www.marilith.com/'
stripUrl = url + 'archive.php?date=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(comics/.+?)" border')
prevSearch = compile(r'<a href="(archive\.php\?date=.+?)"><img border=0 name=previous_day')
help = 'Index format: yyyymmdd'
class MarryMe(_BasicScraper):
url = 'http://marryme.keenspot.com/'
stripUrl = url + 'd/%s.html'
2012-11-21 20:57:26 +00:00
imageSearch = compile(tagre("img", "src", r'(/comics/[^"]+)'))
prevSearch = compile(tagre("link", "href", r'(/d/[^"]+)', before="prev"))
help = 'Index format: yyyymmdd'
2012-06-20 19:58:13 +00:00
class Meek(_BasicScraper):
url = 'http://www.meekcomic.com/'
stripUrl = url + '%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'meekcomic.com(/comics/.+?)"')
prevSearch = compile(r'\s.+?(http://www.meekcomic.com/.+?)".+?Previous<')
help = 'Index format: yyyy/mm/dd/ch-p/'
class MegaTokyo(_BasicScraper):
url = 'http://megatokyo.com/'
stripUrl = url + 'strip/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'"(strips/.+?)"', IGNORECASE)
prevSearch = compile(r'"(./strip/\d+?)">Prev')
help = 'Index format: nnnn'
2012-12-08 20:30:51 +00:00
class Meiosis(_BasicScraper):
url = 'http://meiosiswebcomic.com/'
stripUrl = url + '%s/'
2012-12-08 20:30:51 +00:00
imageSearch = compile(tagre("img", "src", r'(http://meiosiswebcomic\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://meiosiswebcomic\.com/[^"]+)', after="navi-prev"))
help = 'Index format: yyyy/mm/ddmmyyyy'
2012-06-20 19:58:13 +00:00
class MacHall(_BasicScraper):
url = 'http://www.machall.com/'
stripUrl = url + 'view.php?date=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(comics/.+?)"')
prevSearch = compile(r'<a href="(.+?)"><img[^>]+?src=\'drop_shadow/previous.gif\'>')
help = 'Index format: yyyy-mm-dd'
class MenageA3(_BasicScraper):
adult = True
url = 'http://www.ma3comic.com/'
stripUrl = url + 'strips-ma3/%s'
imageSearch = compile(tagre("img", "src", r'([^"]*/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'([^"]*/strips-ma3/[^"]+)', before="cn[id]prev"))
help = 'Index format: name'
class Melonpool(_BasicScraper):
url = 'http://www.melonpool.com/'
stripUrl = url + '?p=%s'
2012-11-21 20:57:26 +00:00
imageSearch = compile(tagre("img", "src", r'(http://www\.melonpool\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.melonpool\.com/\?p=\d+)', after="prev"))
help = 'Index format: n'
2012-06-20 19:58:13 +00:00
class Misfile(_BasicScraper):
url = 'http://www.misfile.com/'
stripUrl = url + '?date=%s'
2012-12-04 06:02:40 +00:00
imageSearch = compile(tagre("img", "src", r"(comics/[^']+)", quote="'"))
prevSearch = compile(tagre("link", "href", r"([^']+)", quote="'", before="Previous"))
2012-11-21 20:57:26 +00:00
help = 'Index format: yyyy-mm-dd'
2012-06-20 19:58:13 +00:00
2013-03-20 20:42:04 +00:00
class MyCartoons(_BasicScraper):
url = 'http://mycartoons.de/'
stripUrl = url + 'page/%s'
imageSearch = (
compile(tagre("img", "src", r'(http://mycartoons\.de/wp-content/cartoons/(?:[^"]+/)?\d+-\d+-\d+[^"]+)')),
compile(tagre("img", "src", r'(http://mycartoons\.de/cartoons/[^"]+/\d+-\d+-\d+[^"]+)'))
)
prevSearch = compile(tagre("a", "href", r'(http://mycartoons\.de/page/[^"]+)') + "&laquo;")
help = 'Index format: number'
lang = 'de'
2012-06-20 19:58:13 +00:00
class MysteriesOfTheArcana(_BasicScraper):
url = 'http://mysteriesofthearcana.com/'
stripUrl = url + 'index.php?action=comics&cid=%s'
2012-11-21 20:57:26 +00:00
imageSearch = compile(tagre("img", "src", r'(image\.php\?type=com&i=[^"]+)'))
2012-12-04 06:02:40 +00:00
prevSearch = compile(tagre("a", "href", r'(index\.php[^"]+)', after="navprevious"))
2012-06-20 19:58:13 +00:00
help = 'Index format: n (unpadded)'