@@ 4312-4328 (lines=17) @@ | ||
4309 | class Sephko(GenericTumblrV1): |
|
4310 | """Class to retrieve Sephko Comics.""" |
|
4311 | # Also on http://www.sephko.com |
|
4312 | name = 'sephko' |
|
4313 | long_name = 'Sephko' |
|
4314 | url = 'https://sephko.tumblr.com' |
|
4315 | ||
4316 | ||
4317 | class BlazersAtDawn(GenericTumblrV1): |
|
4318 | """Class to retrieve Blazers At Dawn Comics.""" |
|
4319 | name = 'blazers' |
|
4320 | long_name = 'Blazers At Dawn' |
|
4321 | url = 'http://blazersatdawn.tumblr.com' |
|
4322 | ||
4323 | ||
4324 | class ArtByMoga(GenericEmptyComic, GenericTumblrV1): # Deactivated because it downloads too many things |
|
4325 | """Class to retrieve Art By Moga Comics.""" |
|
4326 | name = 'moga' |
|
4327 | long_name = 'Art By Moga' |
|
4328 | url = 'http://artbymoga.tumblr.com' |
|
4329 | ||
4330 | ||
4331 | class VerbalVomitTumblr(GenericTumblrV1): |
|
@@ 730-745 (lines=16) @@ | ||
727 | class NeDroid(GenericNavigableComic): |
|
728 | """Class to retrieve NeDroid comics.""" |
|
729 | name = 'nedroid' |
|
730 | long_name = 'NeDroid' |
|
731 | url = 'http://nedroid.com' |
|
732 | get_first_comic_link = get_div_navfirst_a |
|
733 | get_navi_link = get_link_rel_next |
|
734 | get_url_from_link = join_cls_url_to_href |
|
735 | ||
736 | @classmethod |
|
737 | def get_comic_info(cls, soup, link): |
|
738 | """Get information about a particular comics.""" |
|
739 | short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url) |
|
740 | short_url = cls.get_url_from_link(soup.find('link', rel='shortlink')) |
|
741 | num = int(short_url_re.match(short_url).groups()[0]) |
|
742 | imgs = soup.find('div', id='comic').find_all('img') |
|
743 | assert len(imgs) == 1 |
|
744 | title = imgs[0]['alt'] |
|
745 | title2 = imgs[0]['title'] |
|
746 | return { |
|
747 | 'short_url': short_url, |
|
748 | 'title': title, |