|
@@ 2988-3013 (lines=26) @@
|
| 2985 |
|
|
| 2986 |
|
|
| 2987 |
|
class WoodenPlankStudios(GenericWordPressInkblot): |
| 2988 |
|
"""Class to retrieve Wooden Plank Studios comics.""" |
| 2989 |
|
name = 'woodenplank' |
| 2990 |
|
long_name = 'Wooden Plank Studios' |
| 2991 |
|
url = 'http://woodenplankstudios.com' |
| 2992 |
|
|
| 2993 |
|
|
| 2994 |
|
class ElectricBunnyComic(GenericNavigableComic): |
| 2995 |
|
"""Class to retrieve Electric Bunny Comics.""" |
| 2996 |
|
# Also on http://electricbunnycomics.tumblr.com |
| 2997 |
|
name = 'bunny' |
| 2998 |
|
long_name = 'Electric Bunny Comic' |
| 2999 |
|
url = 'http://www.electricbunnycomics.com/View/Comic/153/Welcome+to+Hell' |
| 3000 |
|
get_url_from_link = join_cls_url_to_href |
| 3001 |
|
|
| 3002 |
|
@classmethod |
| 3003 |
|
def get_first_comic_link(cls): |
| 3004 |
|
"""Get link to first comics.""" |
| 3005 |
|
return get_soup_at_url(cls.url).find('img', alt='First').parent |
| 3006 |
|
|
| 3007 |
|
@classmethod |
| 3008 |
|
def get_navi_link(cls, last_soup, next_): |
| 3009 |
|
img = last_soup.find('img', alt='Next' if next_ else 'Back') |
| 3010 |
|
return img.parent if img else None |
| 3011 |
|
|
| 3012 |
|
@classmethod |
| 3013 |
|
def get_comic_info(cls, soup, link): |
| 3014 |
|
"""Get information about a particular comics.""" |
| 3015 |
|
title = soup.find('meta', property='og:title')['content'] |
| 3016 |
|
imgs = soup.find_all('meta', property='og:image') |
|
@@ 1467-1491 (lines=25) @@
|
| 1464 |
|
'year': day.year, |
| 1465 |
|
} |
| 1466 |
|
|
| 1467 |
|
|
| 1468 |
|
class Quarktees(GenericNavigableComic): |
| 1469 |
|
"""Class to retrieve the Quarktees comics.""" |
| 1470 |
|
name = 'quarktees' |
| 1471 |
|
long_name = 'Quarktees' |
| 1472 |
|
url = 'http://www.quarktees.com/blogs/news' |
| 1473 |
|
get_url_from_link = join_cls_url_to_href |
| 1474 |
|
|
| 1475 |
|
@classmethod |
| 1476 |
|
def get_first_comic_link(cls): |
| 1477 |
|
"""Get link to first comics.""" |
| 1478 |
|
return {'href': 'http://www.quarktees.com/blogs/news/12486621-coming-soon'} |
| 1479 |
|
|
| 1480 |
|
@classmethod |
| 1481 |
|
def get_navi_link(cls, last_soup, next_): |
| 1482 |
|
return last_soup.find('a', id='article-next' if next_ else 'article-prev') |
| 1483 |
|
|
| 1484 |
|
@classmethod |
| 1485 |
|
def get_comic_info(cls, soup, link): |
| 1486 |
|
"""Get information about a particular comics.""" |
| 1487 |
|
title = soup.find('meta', property='og:title')['content'] |
| 1488 |
|
article = soup.find('div', class_='single-article') |
| 1489 |
|
imgs = article.find_all('img') |
| 1490 |
|
return { |
| 1491 |
|
'title': title, |
| 1492 |
|
'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs], |
| 1493 |
|
} |
| 1494 |
|
|