|
@@ 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 |
|
|
|
@@ 2800-2816 (lines=17) @@
|
| 2797 |
|
} |
| 2798 |
|
|
| 2799 |
|
|
| 2800 |
|
class BuniComic(GenericNavigableComic): |
| 2801 |
|
"""Class to retrieve Buni Comics.""" |
| 2802 |
|
name = 'buni' |
| 2803 |
|
long_name = 'BuniComics' |
| 2804 |
|
url = 'http://www.bunicomic.com' |
| 2805 |
|
get_first_comic_link = get_a_comicnavbase_comicnavfirst |
| 2806 |
|
get_navi_link = get_link_rel_next |
| 2807 |
|
|
| 2808 |
|
@classmethod |
| 2809 |
|
def get_comic_info(cls, soup, link): |
| 2810 |
|
"""Get information about a particular comics.""" |
| 2811 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 2812 |
|
assert all(i['alt'] == i['title'] for i in imgs) |
| 2813 |
|
assert len(imgs) == 1, imgs |
| 2814 |
|
return { |
| 2815 |
|
'img': [i['src'] for i in imgs], |
| 2816 |
|
'title': imgs[0]['title'], |
| 2817 |
|
} |
| 2818 |
|
|
| 2819 |
|
|