Beispiel #1
0
 def _get_data(self, comic_slug):
     logger.debug('Importing comic module for %s', comic_slug)
     comic_module = get_comic_module(comic_slug)
     if not hasattr(comic_module, 'ComicData'):
         raise ComicDataError('%s does not have a ComicData class' %
                              comic_module.__name__)
     return comic_module.ComicData()
Beispiel #2
0
def get_comic_schedule(comic):
    module = get_comic_module(comic.slug)
    schedule = module.Crawler(comic).schedule

    if not schedule:
        return []
    return [SCHEDULE_DAYS.index(day) for day in schedule.split(',')]
Beispiel #3
0
 def _get_meta(self, comic_slug):
     logger.debug('Importing comic module for %s', comic_slug)
     comic_module = get_comic_module(comic_slug)
     if not hasattr(comic_module, 'Meta'):
         raise MetaError('%s does not have a Meta class' %
             comic_module.__name__)
     return comic_module.Meta()
Beispiel #4
0
 def _get_crawler(self, comic):
     module = get_comic_module(comic.slug)
     return module.Crawler(comic)
Beispiel #5
0
 def _get_crawler(self, comic):
     module = get_comic_module(comic.slug)
     return module.Crawler(comic)
Beispiel #6
0
 def _get_data(self, comic_slug):
     logger.debug("Importing comic module for %s", comic_slug)
     comic_module = get_comic_module(comic_slug)
     if not hasattr(comic_module, "ComicData"):
         raise ComicDataError("%s does not have a ComicData class" % comic_module.__name__)
     return comic_module.ComicData()