|
@@ 782-797 (lines=16) @@
|
| 779 |
|
get_navi_link = get_link_rel_next |
| 780 |
|
get_url_from_link = join_cls_url_to_href |
| 781 |
|
|
| 782 |
|
@classmethod |
| 783 |
|
def get_comic_info(cls, soup, link): |
| 784 |
|
"""Get information about a particular comics.""" |
| 785 |
|
short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url) |
| 786 |
|
short_url = cls.get_url_from_link(soup.find('link', rel='shortlink')) |
| 787 |
|
num = int(short_url_re.match(short_url).groups()[0]) |
| 788 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 789 |
|
assert len(imgs) == 1, imgs |
| 790 |
|
title = imgs[0]['alt'] |
| 791 |
|
title2 = imgs[0]['title'] |
| 792 |
|
return { |
| 793 |
|
'short_url': short_url, |
| 794 |
|
'title': title, |
| 795 |
|
'title2': title2, |
| 796 |
|
'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs], |
| 797 |
|
'num': num, |
| 798 |
|
} |
| 799 |
|
|
| 800 |
|
|
|
@@ 5013-5029 (lines=17) @@
|
| 5010 |
|
_categories = ('ESPANOL', ) |
| 5011 |
|
|
| 5012 |
|
|
| 5013 |
|
class EatMyPaintTumblr(GenericTumblrV1): |
| 5014 |
|
"""Class to retrieve Eat My Paint comics.""" |
| 5015 |
|
# Also on https://tapas.io/series/eatmypaint |
| 5016 |
|
name = 'eatmypaint-tumblr' |
| 5017 |
|
long_name = 'Eat My Paint (from Tumblr)' |
| 5018 |
|
url = 'https://eatmypaint.tumblr.com' |
| 5019 |
|
_categories = ('EATMYPAINT', ) |
| 5020 |
|
|
| 5021 |
|
|
| 5022 |
|
class AnomalyTownFromTumblr(GenericTumblrV1): |
| 5023 |
|
"""Class to retrieve Anomaly Town.""" |
| 5024 |
|
name = 'anomalytown-tumblr' |
| 5025 |
|
long_name = 'Anomaly Town (from Tumblr)' |
| 5026 |
|
url = 'https://anomalytown.tumblr.com' |
| 5027 |
|
|
| 5028 |
|
|
| 5029 |
|
class RoryTumblr(GenericTumblrV1): |
| 5030 |
|
"""Class to retrieve Rory comics.""" |
| 5031 |
|
# Also on https://tapas.io/series/Share-Your-Vulnerability |
| 5032 |
|
name = 'rory-tumblr' |