From 10985ae6143e3f42096df0f2f494bf24267f9157 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Tue, 26 Mar 2013 17:33:27 +0100 Subject: [PATCH] Add genre tags. --- dosagelib/scraper.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dosagelib/scraper.py b/dosagelib/scraper.py index 285296693..e4101b07c 100644 --- a/dosagelib/scraper.py +++ b/dosagelib/scraper.py @@ -10,6 +10,19 @@ from .output import out from .events import getHandler +class Genre: + """Genre of a comic strip.""" + adventure = u"Adventure" + crazy = u"Crazy" + drama = u"Drama" + fantasy = u"Fantasy" + gaming = u"Gaming" + humor = u"Humor" + reallife = u"Real life" + scifi = u"Sci-fi" + other = u"Other" + + class _BasicScraper(object): '''Base class with scrape functions for comics.''' @@ -37,6 +50,9 @@ class _BasicScraper(object): # langauge of the comic (two-letter ISO 639-1 code) lang = 'en' + # list of genres for this comic strip + genres = (Genre.other) + # compiled regular expression that will locate the URL for the previous strip in a page # this can also be a list or tuple of compiled regular expressions prevSearch = None