|
@@ 1820-1837 (lines=18) @@
|
| 1817 |
|
} |
| 1818 |
|
|
| 1819 |
|
|
| 1820 |
|
class BigFootJustice(GenericNavigableComic): |
| 1821 |
|
"""Class to retrieve Big Foot Justice comics.""" |
| 1822 |
|
# Also on http://tapastic.com/series/bigfoot-justice |
| 1823 |
|
name = 'bigfoot' |
| 1824 |
|
long_name = 'Big Foot Justice' |
| 1825 |
|
url = 'http://bigfootjustice.com' |
| 1826 |
|
get_first_comic_link = get_a_navi_navifirst |
| 1827 |
|
get_navi_link = get_a_navi_comicnavnext_navinext |
| 1828 |
|
|
| 1829 |
|
@classmethod |
| 1830 |
|
def get_comic_info(cls, soup, link): |
| 1831 |
|
"""Get information about a particular comics.""" |
| 1832 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 1833 |
|
assert all(i['title'] == i['alt'] for i in imgs) |
| 1834 |
|
title = ' '.join(i['title'] for i in imgs) |
| 1835 |
|
return { |
| 1836 |
|
'img': [i['src'] for i in imgs], |
| 1837 |
|
'title': title, |
| 1838 |
|
} |
| 1839 |
|
|
| 1840 |
|
|
|
@@ 2825-2841 (lines=17) @@
|
| 2822 |
|
} |
| 2823 |
|
|
| 2824 |
|
|
| 2825 |
|
class BuniComic(GenericNavigableComic): |
| 2826 |
|
"""Class to retrieve Buni Comics.""" |
| 2827 |
|
name = 'buni' |
| 2828 |
|
long_name = 'BuniComics' |
| 2829 |
|
url = 'http://www.bunicomic.com' |
| 2830 |
|
get_first_comic_link = get_a_comicnavbase_comicnavfirst |
| 2831 |
|
get_navi_link = get_link_rel_next |
| 2832 |
|
|
| 2833 |
|
@classmethod |
| 2834 |
|
def get_comic_info(cls, soup, link): |
| 2835 |
|
"""Get information about a particular comics.""" |
| 2836 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 2837 |
|
assert all(i['alt'] == i['title'] for i in imgs) |
| 2838 |
|
assert len(imgs) == 1, imgs |
| 2839 |
|
return { |
| 2840 |
|
'img': [i['src'] for i in imgs], |
| 2841 |
|
'title': imgs[0]['title'], |
| 2842 |
|
} |
| 2843 |
|
|
| 2844 |
|
|