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,107 +8,57 @@ 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
def url(self):
return 'http://www.arcamax.com/thefunnies/' + self.path + '/'
@classmethod
def getmodules(cls):
return (
# do not edit anything below since these entries are generated from # do not edit anything below since these entries are generated from
# scripts/update_plugins.sh # scripts/arcamax.py
# START AUTOUPDATE # START AUTOUPDATE
# 9ChickweedLane has a duplicate in GoComics/9ChickweedLane # 9ChickweedLane has a duplicate in GoComics/9ChickweedLane
# Agnes has a duplicate in GoComics/Agnes # Agnes has a duplicate in GoComics/Agnes
# AndyCapp has a duplicate in GoComics/AndyCapp # AndyCapp has a duplicate in GoComics/AndyCapp
# Archie has a duplicate in Creators/Archie # Archie has a duplicate in Creators/Archie
cls('ArcticCircle', 'arcticcircle'),
class ArcticCircle(_Arcamax):
path = 'arcticcircle'
# AskShagg has a duplicate in GoComics/AskShagg # AskShagg has a duplicate in GoComics/AskShagg
cls('BabyBlues', 'babyblues'),
class BabyBlues(_Arcamax):
path = 'babyblues'
# BallardStreet has a duplicate in GoComics/BallardStreet # BallardStreet has a duplicate in GoComics/BallardStreet
# BarneyAndClyde has a duplicate in GoComics/BarneyAndClyde # BarneyAndClyde has a duplicate in GoComics/BarneyAndClyde
cls('BarneyGoogleAndSnuffySmith', 'barneygoogle'),
class BarneyGoogleAndSnuffySmith(_Arcamax):
path = 'barneygoogle'
# BC has a duplicate in GoComics/BC # BC has a duplicate in GoComics/BC
cls('BeetleBailey', 'beetlebailey'),
cls('Bizarro', 'bizarro'),
class BeetleBailey(_Arcamax):
path = 'beetlebailey'
class Bizarro(_Arcamax):
path = 'bizarro'
# BleekerTheRechargeableDog has a duplicate in GoComics/BleekerTheRechargeableDog # BleekerTheRechargeableDog has a duplicate in GoComics/BleekerTheRechargeableDog
cls('Blondie', 'blondie'),
cls('Boondocks', 'boondocks'),
class Blondie(_Arcamax): cls('BrilliantMindOfEdisonLee', 'brilliantmindofedisonlee'),
path = 'blondie'
class Boondocks(_Arcamax):
path = 'boondocks'
class BrilliantMindOfEdisonLee(_Arcamax):
path = 'brilliantmindofedisonlee'
# Candorville has a duplicate in GoComics/Candorville # Candorville has a duplicate in GoComics/Candorville
cls('CarpeDiem', 'carpediem'),
class CarpeDiem(_Arcamax):
path = 'carpediem'
# Cathy has a duplicate in GoComics/Cathy # Cathy has a duplicate in GoComics/Cathy
# ChipBok has a duplicate in GoComics/ChipBok # ChipBok has a duplicate in GoComics/ChipBok
# ChuckleBros has a duplicate in GoComics/ChuckleBros # ChuckleBros has a duplicate in GoComics/ChuckleBros
# ClayBennett has a duplicate in GoComics/ClayBennett # ClayBennett has a duplicate in GoComics/ClayBennett
cls('Crankshaft', 'crankshaft'),
class Crankshaft(_Arcamax):
path = 'crankshaft'
# CulDeSac has a duplicate in GoComics/CulDeSac # CulDeSac has a duplicate in GoComics/CulDeSac
cls('Curtis', 'curtis'),
class Curtis(_Arcamax):
path = 'curtis'
# DaddysHome has a duplicate in GoComics/DaddysHome # DaddysHome has a duplicate in GoComics/DaddysHome
# DarrinBell has a duplicate in GoComics/DarrinBell # DarrinBell has a duplicate in GoComics/DarrinBell
cls('DeFlocked', 'deflocked'),
cls('DennisTheMenace', 'dennisthemenace'),
class DeFlocked(_Arcamax):
path = 'deflocked'
class DennisTheMenace(_Arcamax):
path = 'dennisthemenace'
# DiamondLil has a duplicate in GoComics/DiamondLil # DiamondLil has a duplicate in GoComics/DiamondLil
# Dilbert has a duplicate in Dilbert cls('DinetteSet', 'thedinetteset'),
class DinetteSet(_Arcamax):
path = 'thedinetteset'
# DogEatDoug has a duplicate in GoComics/DogEatDoug # DogEatDoug has a duplicate in GoComics/DogEatDoug
# DogsOfCKennel has a duplicate in GoComics/DogsOfCKennel # DogsOfCKennel has a duplicate in GoComics/DogsOfCKennel
# Doonesbury has a duplicate in GoComics/Doonesbury # Doonesbury has a duplicate in GoComics/Doonesbury
cls('Dustin', 'dustin'),
cls('FamilyCircus', 'familycircus'),
class Dustin(_Arcamax):
path = 'dustin'
class FamilyCircus(_Arcamax):
path = 'familycircus'
# FloAndFriends has a duplicate in GoComics/FloAndFriends # FloAndFriends has a duplicate in GoComics/FloAndFriends
# ForBetterOrForWorse has a duplicate in GoComics/ForBetterOrForWorse # ForBetterOrForWorse has a duplicate in GoComics/ForBetterOrForWorse
# ForHeavensSake has a duplicate in GoComics/ForHeavensSake # ForHeavensSake has a duplicate in GoComics/ForHeavensSake
@ -116,55 +66,27 @@ class FamilyCircus(_Arcamax):
# FreeRange has a duplicate in GoComics/FreeRange # FreeRange has a duplicate in GoComics/FreeRange
# Garfield has a duplicate in GoComics/Garfield # Garfield has a duplicate in GoComics/Garfield
# GetFuzzy has a duplicate in GoComics/GetFuzzy # GetFuzzy has a duplicate in GoComics/GetFuzzy
# HagarTheHorrible has a duplicate in HagarTheHorrible
# Heathcliff has a duplicate in GoComics/Heathcliff # Heathcliff has a duplicate in GoComics/Heathcliff
# HerbAndJamaal has a duplicate in GoComics/HerbAndJamaal # HerbAndJamaal has a duplicate in GoComics/HerbAndJamaal
cls('HiAndLois', 'hiandlois'),
cls('IntelligentLife', 'intelligentlife'),
class HiAndLois(_Arcamax): cls('JerryKingCartoons', 'humorcartoon'),
path = 'hiandlois'
class IntelligentLife(_Arcamax):
path = 'intelligentlife'
class JerryKingCartoons(_Arcamax):
path = 'humorcartoon'
# LisaBenson has a duplicate in GoComics/LisaBenson # LisaBenson has a duplicate in GoComics/LisaBenson
# LittleDogLost has a duplicate in GoComics/LittleDogLost # LittleDogLost has a duplicate in GoComics/LittleDogLost
# LongStoryShort has a duplicate in Creators/LongStoryShort # LongStoryShort has a duplicate in Creators/LongStoryShort
# LooseParts has a duplicate in GoComics/LooseParts # LooseParts has a duplicate in GoComics/LooseParts
# Luann has a duplicate in GoComics/Luann # Luann has a duplicate in GoComics/Luann
cls('MallardFillmore', 'mallardfillmore'),
cls('Marvin', 'marvin'),
class MallardFillmore(_Arcamax): cls('MasterStrokesGolfTips', 'masterstrokes'),
path = 'mallardfillmore' cls('MeaningOfLila', 'meaningoflila'),
class Marvin(_Arcamax):
path = 'marvin'
class MasterStrokesGolfTips(_Arcamax):
path = 'masterstrokes'
class MeaningOfLila(_Arcamax):
path = 'meaningoflila'
# MichaelRamirez has a duplicate in GoComics/MichaelRamirez # MichaelRamirez has a duplicate in GoComics/MichaelRamirez
# MikeDuJour has a duplicate in GoComics/MikeDuJour # MikeDuJour has a duplicate in GoComics/MikeDuJour
# MikeLester has a duplicate in GoComics/MikeLester # MikeLester has a duplicate in GoComics/MikeLester
# MikeLuckovich has a duplicate in GoComics/MikeLuckovich # MikeLuckovich has a duplicate in GoComics/MikeLuckovich
# Momma has a duplicate in GoComics/Momma # Momma has a duplicate in GoComics/Momma
cls('MotherGooseAndGrimm', 'mothergooseandgrimm'),
cls('Mutts', 'mutts'),
class MotherGooseAndGrimm(_Arcamax):
path = 'mothergooseandgrimm'
class Mutts(_Arcamax):
path = 'mutts'
# NestHeads has a duplicate in GoComics/NestHeads # NestHeads has a duplicate in GoComics/NestHeads
# NickAnderson has a duplicate in GoComics/NickAnderson # NickAnderson has a duplicate in GoComics/NickAnderson
# NonSequitur has a duplicate in GoComics/NonSequitur # NonSequitur has a duplicate in GoComics/NonSequitur
@ -174,10 +96,7 @@ class Mutts(_Arcamax):
# Pickles has a duplicate in GoComics/Pickles # Pickles has a duplicate in GoComics/Pickles
# RedAndRover has a duplicate in GoComics/RedAndRover # RedAndRover has a duplicate in GoComics/RedAndRover
# ReplyAll has a duplicate in GoComics/ReplyAll # ReplyAll has a duplicate in GoComics/ReplyAll
cls('RhymesWithOrange', 'rhymeswithorange'),
class RhymesWithOrange(_Arcamax):
path = 'rhymeswithorange'
# Rubes has a duplicate in GoComics/Rubes # Rubes has a duplicate in GoComics/Rubes
# RudyPark has a duplicate in GoComics/RudyPark # RudyPark has a duplicate in GoComics/RudyPark
# Rugrats has a duplicate in Creators/Rugrats # Rugrats has a duplicate in Creators/Rugrats
@ -188,27 +107,16 @@ class RhymesWithOrange(_Arcamax):
# SteveBenson has a duplicate in GoComics/SteveBenson # SteveBenson has a duplicate in GoComics/SteveBenson
# SteveBreen has a duplicate in GoComics/SteveBreen # SteveBreen has a duplicate in GoComics/SteveBreen
# StrangeBrew has a duplicate in GoComics/StrangeBrew # StrangeBrew has a duplicate in GoComics/StrangeBrew
cls('TakeItFromTheTinkersons', 'takeitfromthetinkersons'),
class TakeItFromTheTinkersons(_Arcamax):
path = 'takeitfromthetinkersons'
# TheBarn has a duplicate in GoComics/TheBarn # TheBarn has a duplicate in GoComics/TheBarn
cls('TheLockhorns', 'thelockhorns'),
class TheLockhorns(_Arcamax):
path = 'thelockhorns'
# TheOtherCoast has a duplicate in GoComics/TheOtherCoast # TheOtherCoast has a duplicate in GoComics/TheOtherCoast
cls('TinasGroove', 'tinasgroove'),
class TinasGroove(_Arcamax):
path = 'tinasgroove'
# WeePals has a duplicate in GoComics/WeePals # WeePals has a duplicate in GoComics/WeePals
# WizardOfId has a duplicate in GoComics/WizardOfId # WizardOfId has a duplicate in GoComics/WizardOfId
# WorkingItOut has a duplicate in GoComics/WorkingItOut # WorkingItOut has a duplicate in GoComics/WorkingItOut
# Wumo has a duplicate in GoComics/WuMo # Wumo has a duplicate in GoComics/WuMo
# ZackHill has a duplicate in GoComics/ZackHill # ZackHill has a duplicate in GoComics/ZackHill
cls('Zits', 'zits'),
class Zits(_Arcamax):
path = 'zits'
# END AUTOUPDATE # 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__':