Migrate Arcamax to single-class module.

This commit is contained in:
Tobias Gruetzmacher 2016-05-22 23:17:24 +02:00
parent f29472c143
commit 1834bf179f
2 changed files with 112 additions and 202 deletions

View file

@ -8,207 +8,115 @@ from __future__ import absolute_import, division, print_function
from ..scraper import _ParserScraper from ..scraper import _ParserScraper
class _Arcamax(_ParserScraper): class Arcamax(_ParserScraper):
imageSearch = '//img[@id="comic-zoom"]' imageSearch = '//img[@id="comic-zoom"]'
prevSearch = '//a[@class="prev"]' prevSearch = '//a[@class="prev"]'
def __init__(self, name): def __init__(self, name, path):
super(_Arcamax, self).__init__('Arcamax/' + name) super(Arcamax, self).__init__('Arcamax/' + name)
self.url = 'http://www.arcamax.com/thefunnies/' + path + '/'
@property @classmethod
def url(self): def getmodules(cls):
return 'http://www.arcamax.com/thefunnies/' + self.path + '/' return (
# do not edit anything below since these entries are generated from
# scripts/arcamax.py
# do not edit anything below since these entries are generated from # START AUTOUPDATE
# scripts/update_plugins.sh # 9ChickweedLane has a duplicate in GoComics/9ChickweedLane
# START AUTOUPDATE # Agnes has a duplicate in GoComics/Agnes
# 9ChickweedLane has a duplicate in GoComics/9ChickweedLane # AndyCapp has a duplicate in GoComics/AndyCapp
# Agnes has a duplicate in GoComics/Agnes # Archie has a duplicate in Creators/Archie
# AndyCapp has a duplicate in GoComics/AndyCapp cls('ArcticCircle', 'arcticcircle'),
# Archie has a duplicate in Creators/Archie # AskShagg has a duplicate in GoComics/AskShagg
cls('BabyBlues', 'babyblues'),
# BallardStreet has a duplicate in GoComics/BallardStreet
class ArcticCircle(_Arcamax): # BarneyAndClyde has a duplicate in GoComics/BarneyAndClyde
path = 'arcticcircle' cls('BarneyGoogleAndSnuffySmith', 'barneygoogle'),
# AskShagg has a duplicate in GoComics/AskShagg # BC has a duplicate in GoComics/BC
cls('BeetleBailey', 'beetlebailey'),
cls('Bizarro', 'bizarro'),
class BabyBlues(_Arcamax): # BleekerTheRechargeableDog has a duplicate in GoComics/BleekerTheRechargeableDog
path = 'babyblues' cls('Blondie', 'blondie'),
# BallardStreet has a duplicate in GoComics/BallardStreet cls('Boondocks', 'boondocks'),
# BarneyAndClyde has a duplicate in GoComics/BarneyAndClyde cls('BrilliantMindOfEdisonLee', 'brilliantmindofedisonlee'),
# Candorville has a duplicate in GoComics/Candorville
cls('CarpeDiem', 'carpediem'),
class BarneyGoogleAndSnuffySmith(_Arcamax): # Cathy has a duplicate in GoComics/Cathy
path = 'barneygoogle' # ChipBok has a duplicate in GoComics/ChipBok
# BC has a duplicate in GoComics/BC # ChuckleBros has a duplicate in GoComics/ChuckleBros
# ClayBennett has a duplicate in GoComics/ClayBennett
cls('Crankshaft', 'crankshaft'),
class BeetleBailey(_Arcamax): # CulDeSac has a duplicate in GoComics/CulDeSac
path = 'beetlebailey' cls('Curtis', 'curtis'),
# DaddysHome has a duplicate in GoComics/DaddysHome
# DarrinBell has a duplicate in GoComics/DarrinBell
class Bizarro(_Arcamax): cls('DeFlocked', 'deflocked'),
path = 'bizarro' cls('DennisTheMenace', 'dennisthemenace'),
# BleekerTheRechargeableDog has a duplicate in GoComics/BleekerTheRechargeableDog # DiamondLil has a duplicate in GoComics/DiamondLil
cls('DinetteSet', 'thedinetteset'),
# DogEatDoug has a duplicate in GoComics/DogEatDoug
class Blondie(_Arcamax): # DogsOfCKennel has a duplicate in GoComics/DogsOfCKennel
path = 'blondie' # Doonesbury has a duplicate in GoComics/Doonesbury
cls('Dustin', 'dustin'),
cls('FamilyCircus', 'familycircus'),
class Boondocks(_Arcamax): # FloAndFriends has a duplicate in GoComics/FloAndFriends
path = 'boondocks' # ForBetterOrForWorse has a duplicate in GoComics/ForBetterOrForWorse
# ForHeavensSake has a duplicate in GoComics/ForHeavensSake
# FortKnox has a duplicate in GoComics/FortKnox
class BrilliantMindOfEdisonLee(_Arcamax): # FreeRange has a duplicate in GoComics/FreeRange
path = 'brilliantmindofedisonlee' # Garfield has a duplicate in GoComics/Garfield
# Candorville has a duplicate in GoComics/Candorville # GetFuzzy has a duplicate in GoComics/GetFuzzy
# Heathcliff has a duplicate in GoComics/Heathcliff
# HerbAndJamaal has a duplicate in GoComics/HerbAndJamaal
class CarpeDiem(_Arcamax): cls('HiAndLois', 'hiandlois'),
path = 'carpediem' cls('IntelligentLife', 'intelligentlife'),
# Cathy has a duplicate in GoComics/Cathy cls('JerryKingCartoons', 'humorcartoon'),
# ChipBok has a duplicate in GoComics/ChipBok # LisaBenson has a duplicate in GoComics/LisaBenson
# ChuckleBros has a duplicate in GoComics/ChuckleBros # LittleDogLost has a duplicate in GoComics/LittleDogLost
# ClayBennett has a duplicate in GoComics/ClayBennett # LongStoryShort has a duplicate in Creators/LongStoryShort
# LooseParts has a duplicate in GoComics/LooseParts
# Luann has a duplicate in GoComics/Luann
class Crankshaft(_Arcamax): cls('MallardFillmore', 'mallardfillmore'),
path = 'crankshaft' cls('Marvin', 'marvin'),
# CulDeSac has a duplicate in GoComics/CulDeSac cls('MasterStrokesGolfTips', 'masterstrokes'),
cls('MeaningOfLila', 'meaningoflila'),
# MichaelRamirez has a duplicate in GoComics/MichaelRamirez
class Curtis(_Arcamax): # MikeDuJour has a duplicate in GoComics/MikeDuJour
path = 'curtis' # MikeLester has a duplicate in GoComics/MikeLester
# DaddysHome has a duplicate in GoComics/DaddysHome # MikeLuckovich has a duplicate in GoComics/MikeLuckovich
# DarrinBell has a duplicate in GoComics/DarrinBell # Momma has a duplicate in GoComics/Momma
cls('MotherGooseAndGrimm', 'mothergooseandgrimm'),
cls('Mutts', 'mutts'),
class DeFlocked(_Arcamax): # NestHeads has a duplicate in GoComics/NestHeads
path = 'deflocked' # NickAnderson has a duplicate in GoComics/NickAnderson
# NonSequitur has a duplicate in GoComics/NonSequitur
# OneBigHappy has a duplicate in GoComics/OneBigHappy
class DennisTheMenace(_Arcamax): # Peanuts has a duplicate in GoComics/Peanuts
path = 'dennisthemenace' # PearlsBeforeSwine has a duplicate in GoComics/PearlsBeforeSwine
# DiamondLil has a duplicate in GoComics/DiamondLil # Pickles has a duplicate in GoComics/Pickles
# Dilbert has a duplicate in Dilbert # RedAndRover has a duplicate in GoComics/RedAndRover
# ReplyAll has a duplicate in GoComics/ReplyAll
cls('RhymesWithOrange', 'rhymeswithorange'),
class DinetteSet(_Arcamax): # Rubes has a duplicate in GoComics/Rubes
path = 'thedinetteset' # RudyPark has a duplicate in GoComics/RudyPark
# DogEatDoug has a duplicate in GoComics/DogEatDoug # Rugrats has a duplicate in Creators/Rugrats
# DogsOfCKennel has a duplicate in GoComics/DogsOfCKennel # ScaryGary has a duplicate in GoComics/ScaryGary
# Doonesbury has a duplicate in GoComics/Doonesbury # Shoe has a duplicate in GoComics/Shoe
# SigneWilkinson has a duplicate in GoComics/SigneWilkinson
# SpeedBump has a duplicate in GoComics/SpeedBump
class Dustin(_Arcamax): # SteveBenson has a duplicate in GoComics/SteveBenson
path = 'dustin' # SteveBreen has a duplicate in GoComics/SteveBreen
# StrangeBrew has a duplicate in GoComics/StrangeBrew
cls('TakeItFromTheTinkersons', 'takeitfromthetinkersons'),
class FamilyCircus(_Arcamax): # TheBarn has a duplicate in GoComics/TheBarn
path = 'familycircus' cls('TheLockhorns', 'thelockhorns'),
# FloAndFriends has a duplicate in GoComics/FloAndFriends # TheOtherCoast has a duplicate in GoComics/TheOtherCoast
# ForBetterOrForWorse has a duplicate in GoComics/ForBetterOrForWorse cls('TinasGroove', 'tinasgroove'),
# ForHeavensSake has a duplicate in GoComics/ForHeavensSake # WeePals has a duplicate in GoComics/WeePals
# FortKnox has a duplicate in GoComics/FortKnox # WizardOfId has a duplicate in GoComics/WizardOfId
# FreeRange has a duplicate in GoComics/FreeRange # WorkingItOut has a duplicate in GoComics/WorkingItOut
# Garfield has a duplicate in GoComics/Garfield # Wumo has a duplicate in GoComics/WuMo
# GetFuzzy has a duplicate in GoComics/GetFuzzy # ZackHill has a duplicate in GoComics/ZackHill
# HagarTheHorrible has a duplicate in HagarTheHorrible cls('Zits', 'zits'),
# Heathcliff has a duplicate in GoComics/Heathcliff # END AUTOUPDATE
# HerbAndJamaal has a duplicate in GoComics/HerbAndJamaal )
class HiAndLois(_Arcamax):
path = 'hiandlois'
class IntelligentLife(_Arcamax):
path = 'intelligentlife'
class JerryKingCartoons(_Arcamax):
path = 'humorcartoon'
# LisaBenson has a duplicate in GoComics/LisaBenson
# LittleDogLost has a duplicate in GoComics/LittleDogLost
# LongStoryShort has a duplicate in Creators/LongStoryShort
# LooseParts has a duplicate in GoComics/LooseParts
# Luann has a duplicate in GoComics/Luann
class MallardFillmore(_Arcamax):
path = 'mallardfillmore'
class Marvin(_Arcamax):
path = 'marvin'
class MasterStrokesGolfTips(_Arcamax):
path = 'masterstrokes'
class MeaningOfLila(_Arcamax):
path = 'meaningoflila'
# MichaelRamirez has a duplicate in GoComics/MichaelRamirez
# MikeDuJour has a duplicate in GoComics/MikeDuJour
# MikeLester has a duplicate in GoComics/MikeLester
# MikeLuckovich has a duplicate in GoComics/MikeLuckovich
# Momma has a duplicate in GoComics/Momma
class MotherGooseAndGrimm(_Arcamax):
path = 'mothergooseandgrimm'
class Mutts(_Arcamax):
path = 'mutts'
# NestHeads has a duplicate in GoComics/NestHeads
# NickAnderson has a duplicate in GoComics/NickAnderson
# NonSequitur has a duplicate in GoComics/NonSequitur
# OneBigHappy has a duplicate in GoComics/OneBigHappy
# Peanuts has a duplicate in GoComics/Peanuts
# PearlsBeforeSwine has a duplicate in GoComics/PearlsBeforeSwine
# Pickles has a duplicate in GoComics/Pickles
# RedAndRover has a duplicate in GoComics/RedAndRover
# ReplyAll has a duplicate in GoComics/ReplyAll
class RhymesWithOrange(_Arcamax):
path = 'rhymeswithorange'
# Rubes has a duplicate in GoComics/Rubes
# RudyPark has a duplicate in GoComics/RudyPark
# Rugrats has a duplicate in Creators/Rugrats
# ScaryGary has a duplicate in GoComics/ScaryGary
# Shoe has a duplicate in GoComics/Shoe
# SigneWilkinson has a duplicate in GoComics/SigneWilkinson
# SpeedBump has a duplicate in GoComics/SpeedBump
# SteveBenson has a duplicate in GoComics/SteveBenson
# SteveBreen has a duplicate in GoComics/SteveBreen
# StrangeBrew has a duplicate in GoComics/StrangeBrew
class TakeItFromTheTinkersons(_Arcamax):
path = 'takeitfromthetinkersons'
# TheBarn has a duplicate in GoComics/TheBarn
class TheLockhorns(_Arcamax):
path = 'thelockhorns'
# TheOtherCoast has a duplicate in GoComics/TheOtherCoast
class TinasGroove(_Arcamax):
path = 'tinasgroove'
# WeePals has a duplicate in GoComics/WeePals
# WizardOfId has a duplicate in GoComics/WizardOfId
# WorkingItOut has a duplicate in GoComics/WorkingItOut
# Wumo has a duplicate in GoComics/WuMo
# ZackHill has a duplicate in GoComics/ZackHill
class Zits(_Arcamax):
path = 'zits'
# END AUTOUPDATE

View file

@ -18,7 +18,9 @@ class ArcamaxUpdater(ComicListUpdater):
# names of comics to exclude # names of comics to exclude
excluded_comics = ( excluded_comics = (
"HagartheHorrible", # better source available # better source available
"Dilbert",
"HagarTheHorrible",
) )
def handle_url(self, url): def handle_url(self, url):
@ -36,7 +38,7 @@ class ArcamaxUpdater(ComicListUpdater):
self.handle_url('http://www.arcamax.com/comics') self.handle_url('http://www.arcamax.com/comics')
def get_entry(self, name, entry): def get_entry(self, name, entry):
return u"class %s(_Arcamax):\n path = %r" % (name, entry) return u"cls('%s', '%s')," % (name, entry)
if __name__ == '__main__': if __name__ == '__main__':