|
@@ 3223-3246 (lines=24) @@
|
| 3220 |
|
} |
| 3221 |
|
|
| 3222 |
|
|
| 3223 |
|
class TuMourrasMoinsBete(GenericNavigableComic): |
| 3224 |
|
"""Class to retrieve Tu Mourras Moins Bete comics.""" |
| 3225 |
|
name = 'mourrasmoinsbete' |
| 3226 |
|
long_name = 'Tu Mourras Moins Bete' |
| 3227 |
|
url = 'http://tumourrasmoinsbete.blogspot.fr' |
| 3228 |
|
_categories = ('FRANCAIS', ) |
| 3229 |
|
get_first_comic_link = simulate_first_link |
| 3230 |
|
first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html' |
| 3231 |
|
|
| 3232 |
|
@classmethod |
| 3233 |
|
def get_navi_link(cls, last_soup, next_): |
| 3234 |
|
"""Get link to next or previous comic.""" |
| 3235 |
|
return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link') |
| 3236 |
|
|
| 3237 |
|
@classmethod |
| 3238 |
|
def get_comic_info(cls, soup, link): |
| 3239 |
|
"""Get information about a particular comics.""" |
| 3240 |
|
title = soup.find('title').string |
| 3241 |
|
imgs = soup.find('div', itemprop='description articleBody').find_all('img') |
| 3242 |
|
author = soup.find('span', itemprop='author').string |
| 3243 |
|
return { |
| 3244 |
|
'img': [i['src'] for i in imgs], |
| 3245 |
|
'author': author, |
| 3246 |
|
'title': title, |
| 3247 |
|
} |
| 3248 |
|
|
| 3249 |
|
|
|
@@ 3085-3108 (lines=24) @@
|
| 3082 |
|
} |
| 3083 |
|
|
| 3084 |
|
|
| 3085 |
|
class EarthExplodes(GenericNavigableComic): |
| 3086 |
|
"""Class to retrieve The Earth Explodes comics.""" |
| 3087 |
|
name = 'earthexplodes' |
| 3088 |
|
long_name = 'The Earth Explodes' |
| 3089 |
|
url = 'http://www.earthexplodes.com' |
| 3090 |
|
get_url_from_link = join_cls_url_to_href |
| 3091 |
|
get_first_comic_link = simulate_first_link |
| 3092 |
|
first_url = 'http://www.earthexplodes.com/comics/000/' |
| 3093 |
|
|
| 3094 |
|
@classmethod |
| 3095 |
|
def get_navi_link(cls, last_soup, next_): |
| 3096 |
|
"""Get link to next or previous comic.""" |
| 3097 |
|
return last_soup.find('a', id='next' if next_ else 'prev') |
| 3098 |
|
|
| 3099 |
|
@classmethod |
| 3100 |
|
def get_comic_info(cls, soup, link): |
| 3101 |
|
"""Get information about a particular comics.""" |
| 3102 |
|
title = soup.find('title').string |
| 3103 |
|
imgs = soup.find('div', id='image').find_all('img') |
| 3104 |
|
alt = imgs[0].get('title', '') |
| 3105 |
|
return { |
| 3106 |
|
'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs], |
| 3107 |
|
'title': title, |
| 3108 |
|
'alt': alt, |
| 3109 |
|
} |
| 3110 |
|
|
| 3111 |
|
|