|
@@ 3440-3463 (lines=24) @@
|
| 3437 |
|
@classmethod |
| 3438 |
|
def get_comic_info(cls, soup, link): |
| 3439 |
|
"""Get information about a particular comics.""" |
| 3440 |
|
title = soup.find('title').string |
| 3441 |
|
imgs = soup.find('div', itemprop='description articleBody').find_all('img') |
| 3442 |
|
author = soup.find('span', itemprop='author').string |
| 3443 |
|
return { |
| 3444 |
|
'img': [i['src'] for i in imgs], |
| 3445 |
|
'author': author, |
| 3446 |
|
'title': title, |
| 3447 |
|
} |
| 3448 |
|
|
| 3449 |
|
|
| 3450 |
|
class GeekAndPoke(GenericNavigableComic): |
| 3451 |
|
"""Class to retrieve Geek And Poke comics.""" |
| 3452 |
|
name = 'geek' |
| 3453 |
|
long_name = 'Geek And Poke' |
| 3454 |
|
url = 'http://geek-and-poke.com' |
| 3455 |
|
get_url_from_link = join_cls_url_to_href |
| 3456 |
|
get_first_comic_link = simulate_first_link |
| 3457 |
|
first_url = 'http://geek-and-poke.com/geekandpoke/2006/8/27/a-new-place-for-a-not-so-old-blog.html' |
| 3458 |
|
|
| 3459 |
|
@classmethod |
| 3460 |
|
def get_navi_link(cls, last_soup, next_): |
| 3461 |
|
"""Get link to next or previous comic.""" |
| 3462 |
|
return last_soup.find('a', class_='prev-item' if next_ else 'next-item') |
| 3463 |
|
|
| 3464 |
|
@classmethod |
| 3465 |
|
def get_comic_info(cls, soup, link): |
| 3466 |
|
"""Get information about a particular comics.""" |
|
@@ 3373-3396 (lines=24) @@
|
| 3370 |
|
get_first_comic_link = simulate_first_link |
| 3371 |
|
get_navi_link = get_link_rel_next |
| 3372 |
|
first_url = 'https://marketoonist.com/2002/10/the-8-types-of-brand-managers-2.html' |
| 3373 |
|
|
| 3374 |
|
@classmethod |
| 3375 |
|
def get_comic_info(cls, soup, link): |
| 3376 |
|
"""Get information about a particular comics.""" |
| 3377 |
|
imgs = soup.find_all('meta', property='og:image') |
| 3378 |
|
date_str = soup.find('meta', property='article:published_time')['content'][:10] |
| 3379 |
|
day = string_to_date(date_str, "%Y-%m-%d") |
| 3380 |
|
title = soup.find('meta', property='og:title')['content'] |
| 3381 |
|
return { |
| 3382 |
|
'img': [i['content'] for i in imgs], |
| 3383 |
|
'day': day.day, |
| 3384 |
|
'month': day.month, |
| 3385 |
|
'year': day.year, |
| 3386 |
|
'title': title, |
| 3387 |
|
} |
| 3388 |
|
|
| 3389 |
|
|
| 3390 |
|
class ConsoliaComics(GenericNavigableComic): |
| 3391 |
|
"""Class to retrieve Consolia comics.""" |
| 3392 |
|
name = 'consolia' |
| 3393 |
|
long_name = 'consolia' |
| 3394 |
|
url = 'https://consolia-comic.com' |
| 3395 |
|
get_url_from_link = join_cls_url_to_href |
| 3396 |
|
|
| 3397 |
|
@classmethod |
| 3398 |
|
def get_first_comic_link(cls): |
| 3399 |
|
"""Get link to first comics.""" |
|
@@ 3183-3206 (lines=24) @@
|
| 3180 |
|
|
| 3181 |
|
|
| 3182 |
|
class Ubertool(GenericNavigableComic): |
| 3183 |
|
"""Class to retrieve Ubertool comics.""" |
| 3184 |
|
# Also on https://ubertool.tumblr.com |
| 3185 |
|
# Also on https://tapastic.com/series/ubertool |
| 3186 |
|
name = 'ubertool' |
| 3187 |
|
long_name = 'Ubertool' |
| 3188 |
|
url = 'http://ubertoolcomic.com' |
| 3189 |
|
_categories = ('UBERTOOL', ) |
| 3190 |
|
get_first_comic_link = get_a_comicnavbase_comicnavfirst |
| 3191 |
|
get_navi_link = get_a_comicnavbase_comicnavnext |
| 3192 |
|
|
| 3193 |
|
@classmethod |
| 3194 |
|
def get_comic_info(cls, soup, link): |
| 3195 |
|
"""Get information about a particular comics.""" |
| 3196 |
|
title = soup.find('h2', class_='post-title').string |
| 3197 |
|
date_str = soup.find('span', class_='post-date').string |
| 3198 |
|
day = string_to_date(date_str, "%B %d, %Y") |
| 3199 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 3200 |
|
return { |
| 3201 |
|
'img': [i['src'] for i in imgs], |
| 3202 |
|
'title': title, |
| 3203 |
|
'month': day.month, |
| 3204 |
|
'year': day.year, |
| 3205 |
|
'day': day.day, |
| 3206 |
|
} |
| 3207 |
|
|
| 3208 |
|
|
| 3209 |
|
class EarthExplodes(GenericNavigableComic): |