@@ 1777-1794 (lines=18) @@ | ||
1774 | } |
|
1775 | ||
1776 | ||
1777 | class BigFootJustice(GenericNavigableComic): |
|
1778 | """Class to retrieve Big Foot Justice comics.""" |
|
1779 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1780 | name = 'bigfoot' |
|
1781 | long_name = 'Big Foot Justice' |
|
1782 | url = 'http://bigfootjustice.com' |
|
1783 | get_first_comic_link = get_a_navi_navifirst |
|
1784 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1785 | ||
1786 | @classmethod |
|
1787 | def get_comic_info(cls, soup, link): |
|
1788 | """Get information about a particular comics.""" |
|
1789 | imgs = soup.find('div', id='comic').find_all('img') |
|
1790 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1791 | title = ' '.join(i['title'] for i in imgs) |
|
1792 | return { |
|
1793 | 'img': [i['src'] for i in imgs], |
|
1794 | 'title': title, |
|
1795 | } |
|
1796 | ||
1797 | ||
@@ 2730-2746 (lines=17) @@ | ||
2727 | } |
|
2728 | ||
2729 | ||
2730 | class BuniComic(GenericNavigableComic): |
|
2731 | """Class to retrieve Buni Comics.""" |
|
2732 | name = 'buni' |
|
2733 | long_name = 'BuniComics' |
|
2734 | url = 'http://www.bunicomic.com' |
|
2735 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2736 | get_navi_link = get_link_rel_next |
|
2737 | ||
2738 | @classmethod |
|
2739 | def get_comic_info(cls, soup, link): |
|
2740 | """Get information about a particular comics.""" |
|
2741 | imgs = soup.find('div', id='comic').find_all('img') |
|
2742 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2743 | assert len(imgs) == 1 |
|
2744 | return { |
|
2745 | 'img': [i['src'] for i in imgs], |
|
2746 | 'title': imgs[0]['title'], |
|
2747 | } |
|
2748 | ||
2749 |