|
@@ 3163-3185 (lines=23) @@
|
| 3160 |
|
} |
| 3161 |
|
|
| 3162 |
|
|
| 3163 |
|
class GloryOwlComix(GenericNavigableComic): |
| 3164 |
|
"""Class to retrieve Glory Owl comics.""" |
| 3165 |
|
name = 'gloryowl' |
| 3166 |
|
long_name = 'Glory Owl' |
| 3167 |
|
url = 'http://gloryowlcomix.blogspot.fr' |
| 3168 |
|
get_first_comic_link = simulate_first_link |
| 3169 |
|
first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html' |
| 3170 |
|
|
| 3171 |
|
@classmethod |
| 3172 |
|
def get_navi_link(cls, last_soup, next_): |
| 3173 |
|
"""Get link to next or previous comic.""" |
| 3174 |
|
return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link') |
| 3175 |
|
|
| 3176 |
|
@classmethod |
| 3177 |
|
def get_comic_info(cls, soup, link): |
| 3178 |
|
"""Get information about a particular comics.""" |
| 3179 |
|
title = soup.find('title').string |
| 3180 |
|
imgs = soup.find_all('link', rel='image_src') |
| 3181 |
|
author = soup.find('a', rel='author').string |
| 3182 |
|
return { |
| 3183 |
|
'img': [i['href'] for i in imgs], |
| 3184 |
|
'author': author, |
| 3185 |
|
'title': title, |
| 3186 |
|
} |
| 3187 |
|
|
| 3188 |
|
|
|
@@ 3097-3119 (lines=23) @@
|
| 3094 |
|
} |
| 3095 |
|
|
| 3096 |
|
|
| 3097 |
|
class TuMourrasMoinsBete(GenericNavigableComic): |
| 3098 |
|
"""Class to retrieve Tu Mourras Moins Bete comics.""" |
| 3099 |
|
name = 'mourrasmoinsbete' |
| 3100 |
|
long_name = 'Tu Mourras Moins Bete' |
| 3101 |
|
url = 'http://tumourrasmoinsbete.blogspot.fr' |
| 3102 |
|
get_first_comic_link = simulate_first_link |
| 3103 |
|
first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html' |
| 3104 |
|
|
| 3105 |
|
@classmethod |
| 3106 |
|
def get_navi_link(cls, last_soup, next_): |
| 3107 |
|
"""Get link to next or previous comic.""" |
| 3108 |
|
return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link') |
| 3109 |
|
|
| 3110 |
|
@classmethod |
| 3111 |
|
def get_comic_info(cls, soup, link): |
| 3112 |
|
"""Get information about a particular comics.""" |
| 3113 |
|
title = soup.find('title').string |
| 3114 |
|
imgs = soup.find('div', itemprop='description articleBody').find_all('img') |
| 3115 |
|
author = soup.find('span', itemprop='author').string |
| 3116 |
|
return { |
| 3117 |
|
'img': [i['src'] for i in imgs], |
| 3118 |
|
'author': author, |
| 3119 |
|
'title': title, |
| 3120 |
|
} |
| 3121 |
|
|
| 3122 |
|
|