@@ 1744-1761 (lines=18) @@ | ||
1741 | } |
|
1742 | ||
1743 | ||
1744 | class BigFootJustice(GenericNavigableComic): |
|
1745 | """Class to retrieve Big Foot Justice comics.""" |
|
1746 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1747 | name = 'bigfoot' |
|
1748 | long_name = 'Big Foot Justice' |
|
1749 | url = 'http://bigfootjustice.com' |
|
1750 | get_first_comic_link = get_a_navi_navifirst |
|
1751 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1752 | ||
1753 | @classmethod |
|
1754 | def get_comic_info(cls, soup, link): |
|
1755 | """Get information about a particular comics.""" |
|
1756 | imgs = soup.find('div', id='comic').find_all('img') |
|
1757 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1758 | title = ' '.join(i['title'] for i in imgs) |
|
1759 | return { |
|
1760 | 'img': [i['src'] for i in imgs], |
|
1761 | 'title': title, |
|
1762 | } |
|
1763 | ||
1764 | ||
@@ 2626-2642 (lines=17) @@ | ||
2623 | } |
|
2624 | ||
2625 | ||
2626 | class BuniComic(GenericNavigableComic): |
|
2627 | """Class to retrieve Buni Comics.""" |
|
2628 | name = 'buni' |
|
2629 | long_name = 'BuniComics' |
|
2630 | url = 'http://www.bunicomic.com' |
|
2631 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2632 | get_navi_link = get_link_rel_next |
|
2633 | ||
2634 | @classmethod |
|
2635 | def get_comic_info(cls, soup, link): |
|
2636 | """Get information about a particular comics.""" |
|
2637 | imgs = soup.find('div', id='comic').find_all('img') |
|
2638 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2639 | assert len(imgs) == 1 |
|
2640 | return { |
|
2641 | 'img': [i['src'] for i in imgs], |
|
2642 | 'title': imgs[0]['title'], |
|
2643 | } |
|
2644 | ||
2645 |