@@ 1752-1769 (lines=18) @@ | ||
1749 | } |
|
1750 | ||
1751 | ||
1752 | class BigFootJustice(GenericNavigableComic): |
|
1753 | """Class to retrieve Big Foot Justice comics.""" |
|
1754 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1755 | name = 'bigfoot' |
|
1756 | long_name = 'Big Foot Justice' |
|
1757 | url = 'http://bigfootjustice.com' |
|
1758 | get_first_comic_link = get_a_navi_navifirst |
|
1759 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1760 | ||
1761 | @classmethod |
|
1762 | def get_comic_info(cls, soup, link): |
|
1763 | """Get information about a particular comics.""" |
|
1764 | imgs = soup.find('div', id='comic').find_all('img') |
|
1765 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1766 | title = ' '.join(i['title'] for i in imgs) |
|
1767 | return { |
|
1768 | 'img': [i['src'] for i in imgs], |
|
1769 | 'title': title, |
|
1770 | } |
|
1771 | ||
1772 | ||
@@ 2681-2697 (lines=17) @@ | ||
2678 | } |
|
2679 | ||
2680 | ||
2681 | class BuniComic(GenericNavigableComic): |
|
2682 | """Class to retrieve Buni Comics.""" |
|
2683 | name = 'buni' |
|
2684 | long_name = 'BuniComics' |
|
2685 | url = 'http://www.bunicomic.com' |
|
2686 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2687 | get_navi_link = get_link_rel_next |
|
2688 | ||
2689 | @classmethod |
|
2690 | def get_comic_info(cls, soup, link): |
|
2691 | """Get information about a particular comics.""" |
|
2692 | imgs = soup.find('div', id='comic').find_all('img') |
|
2693 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2694 | assert len(imgs) == 1 |
|
2695 | return { |
|
2696 | 'img': [i['src'] for i in imgs], |
|
2697 | 'title': imgs[0]['title'], |
|
2698 | } |
|
2699 | ||
2700 |