@@ 4312-4328 (lines=17) @@ | ||
4309 | url = 'http://victimsofcomics.tumblr.com' |
|
4310 | ||
4311 | ||
4312 | class RockPaperCynicTumblr(GenericTumblrV1): |
|
4313 | """Class to retrieve RockPaperCynic comics.""" |
|
4314 | # Also on http://www.rockpapercynic.com |
|
4315 | # Also on https://tapastic.com/series/rockpapercynic |
|
4316 | name = 'rpc-tumblr' |
|
4317 | long_name = 'Rock Paper Cynic (from Tumblr)' |
|
4318 | url = 'http://rockpapercynic.tumblr.com' |
|
4319 | ||
4320 | ||
4321 | class DeadlyPanelTumblr(GenericTumblrV1): |
|
4322 | """Class to retrieve Deadly Panel comics.""" |
|
4323 | # Also on http://www.deadlypanel.com |
|
4324 | # Also on https://tapastic.com/series/deadlypanel |
|
4325 | name = 'deadly-tumblr' |
|
4326 | long_name = 'Deadly Panel (from Tumblr)' |
|
4327 | url = 'http://deadlypanel.tumblr.com' |
|
4328 | ||
4329 | ||
4330 | class CatanaComics(GenericTumblrV1): |
|
4331 | """Class to retrieve Catana comics.""" |
|
@@ 730-745 (lines=16) @@ | ||
727 | long_name = 'NeDroid' |
|
728 | url = 'http://nedroid.com' |
|
729 | get_first_comic_link = get_div_navfirst_a |
|
730 | get_navi_link = get_link_rel_next |
|
731 | get_url_from_link = join_cls_url_to_href |
|
732 | ||
733 | @classmethod |
|
734 | def get_comic_info(cls, soup, link): |
|
735 | """Get information about a particular comics.""" |
|
736 | short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url) |
|
737 | short_url = cls.get_url_from_link(soup.find('link', rel='shortlink')) |
|
738 | num = int(short_url_re.match(short_url).groups()[0]) |
|
739 | imgs = soup.find('div', id='comic').find_all('img') |
|
740 | assert len(imgs) == 1 |
|
741 | title = imgs[0]['alt'] |
|
742 | title2 = imgs[0]['title'] |
|
743 | return { |
|
744 | 'short_url': short_url, |
|
745 | 'title': title, |
|
746 | 'title2': title2, |
|
747 | 'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs], |
|
748 | 'num': num, |