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