Use default bounceStarter for site modules.

This commit is contained in:
Tobias Gruetzmacher 2016-04-13 01:24:13 +02:00
parent 9028724a74
commit 16004e43e4
3 changed files with 288 additions and 249 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,26 +6,20 @@
from __future__ import absolute_import, division, print_function
from ..scraper import _ParserScraper
from ..helpers import bounceStarter
class _WLPComics(_ParserScraper):
imageSearch = '//center/*/img[contains(@alt, " Comic")]'
prevSearch = '//a[contains(text(), "Previous ")]'
nextSearch = '//a[contains(text(), "Next ")]'
starter = bounceStarter()
help = 'Index format: nnn'
@classmethod
def getName(cls):
return 'WLP/' + cls.__name__
@classmethod
def starter(cls):
"""Get bounced start URL."""
data = cls.getPage(cls.url)
url2 = cls.fetchUrl(cls.url, data, cls.prevSearch)
data = cls.getPage(url2)
return cls.fetchUrl(url2, data, cls.nextSearch)
@classmethod
def namer(cls, image_url, page_url):
return (page_url.rsplit('/', 1)[-1].split('.')[0] + '_' +

View file

@ -31,20 +31,20 @@ json_file = __file__.replace(".py", ".json")
exclude_comics = [
# unsuitable navigation
"AlfdisAndGunnora",
"AnAmericanNerdinAnimatedTokyo",
"AnAmericanNerdInAnimatedTokyo",
"AngryAlien",
"BoozerAndStoner",
"Bonejangles",
"ConradStory",
"Crossing",
"ChristianHumberReloaded",
"CorkandBlotto",
"CorkAndBlotto",
"Democomix",
"ErraticBeatComics",
"EnergyWielders",
"EvilBearorg",
"Fiascos",
"FateoftheBlueStar",
"FateOfTheBlueStar",
"FPK",
"Fanartgyle",
"FrigginRandom",
@ -60,11 +60,11 @@ exclude_comics = [
"LucidsDream",
"MadDog",
"Minebreakers",
"Moonlightvalley",
"MoonlightValley",
"MyImmortalFool",
"NATO",
"NothingFits",
"OptimisticFishermenandPessimisticFishermen",
"OptimisticFishermenAndPessimisticFishermen",
"Old2G",
"NothingFitsArtBlog",
"OutToLunchTheStingRayWhoreStory",
@ -77,19 +77,19 @@ exclude_comics = [
"Secondpuberty",
"Seconds",
"SlightlyEccentricOrigins",
"StardusttheCat",
"StrangerthanFiction",
"StardustTheCat",
"StrangerThanFiction",
"TalamakGreatAdventure",
"TheBattalion",
"TheDailyProblem",
"TheMansionofE",
"TheMansionOfE",
"ThePainter",
"TheSeekers",
"TheTrialsofKlahadoftheAbyss",
"TheTrialsOfKlahadOfTheAbyss",
"TheStickmen",
"ThornsInOurSide",
"TopHeavyVeryBustyPinUpsForAdults",
"USBUnlimitedsimulatedbody",
"USBUnlimitedSimulatedBody",
"TylerHumanRecycler",
"UAF",
"WhenPigsFly",
@ -99,24 +99,24 @@ exclude_comics = [
"Angst",
# images gone
"BaseballCapsandTiaras",
"BaseballCapsAndTiaras",
"CROSSWORLDSNEXUS",
"Fathead",
"KevinZombie",
"KindergardenCrisIs",
"NoSongsForTheDead",
"RequiemShadowbornPariah",
"TezzleandZeek",
"TezzleAndZeek",
# broken HTML
"CrossingOver",
# unique html
"IKilledtheHero",
"PowerofPower",
"IKilledTheHero",
"PowerOfPower",
"Schizmatic",
"WaketheSleepers",
"WeightofEternity",
"WakeTheSleepers",
"WeightOfEternity",
]