|
@@ 4666-4682 (lines=17) @@
|
| 4663 |
|
url = 'http://skeletonclaw.com' |
| 4664 |
|
|
| 4665 |
|
|
| 4666 |
|
class MrsFrolleinTumblr(GenericTumblrV1): |
| 4667 |
|
"""Class to retrieve Mrs Frollein comics.""" |
| 4668 |
|
# Also on http://www.webtoons.com/en/challenge/mrsfrollein/list?title_no=51710 |
| 4669 |
|
name = 'frollein' |
| 4670 |
|
long_name = 'Mrs Frollein (from Tumblr)' |
| 4671 |
|
url = 'https://mrsfrollein.tumblr.com' |
| 4672 |
|
|
| 4673 |
|
|
| 4674 |
|
class GoodBearComicsTumblr(GenericTumblrV1): |
| 4675 |
|
"""Class to retrieve GoodBearComics.""" |
| 4676 |
|
# Also on https://goodbearcomics.com |
| 4677 |
|
name = 'goodbear-tumblr' |
| 4678 |
|
long_name = 'Good Bear Comics (from Tumblr)' |
| 4679 |
|
url = 'https://goodbearcomics.tumblr.com' |
| 4680 |
|
|
| 4681 |
|
|
| 4682 |
|
class BrooklynCartoonsTumblr(GenericTumblrV1): |
| 4683 |
|
"""Class to retrieve Brooklyn Cartoons.""" |
| 4684 |
|
# Also on https://www.brooklyncartoons.com |
| 4685 |
|
# Also on https://www.instagram.com/brooklyncartoons |
|
@@ 763-778 (lines=16) @@
|
| 760 |
|
get_first_comic_link = get_div_navfirst_a |
| 761 |
|
get_navi_link = get_link_rel_next |
| 762 |
|
get_url_from_link = join_cls_url_to_href |
| 763 |
|
|
| 764 |
|
@classmethod |
| 765 |
|
def get_comic_info(cls, soup, link): |
| 766 |
|
"""Get information about a particular comics.""" |
| 767 |
|
short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url) |
| 768 |
|
short_url = cls.get_url_from_link(soup.find('link', rel='shortlink')) |
| 769 |
|
num = int(short_url_re.match(short_url).groups()[0]) |
| 770 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 771 |
|
assert len(imgs) == 1 |
| 772 |
|
title = imgs[0]['alt'] |
| 773 |
|
title2 = imgs[0]['title'] |
| 774 |
|
return { |
| 775 |
|
'short_url': short_url, |
| 776 |
|
'title': title, |
| 777 |
|
'title2': title2, |
| 778 |
|
'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs], |
| 779 |
|
'num': num, |
| 780 |
|
} |
| 781 |
|
|