@@ 1769-1786 (lines=18) @@ | ||
1766 | 'title': title, |
|
1767 | 'author': author, |
|
1768 | } |
|
1769 | ||
1770 | ||
1771 | class BigFootJustice(GenericNavigableComic): |
|
1772 | """Class to retrieve Big Foot Justice comics.""" |
|
1773 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1774 | name = 'bigfoot' |
|
1775 | long_name = 'Big Foot Justice' |
|
1776 | url = 'http://bigfootjustice.com' |
|
1777 | get_first_comic_link = get_a_navi_navifirst |
|
1778 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1779 | ||
1780 | @classmethod |
|
1781 | def get_comic_info(cls, soup, link): |
|
1782 | """Get information about a particular comics.""" |
|
1783 | imgs = soup.find('div', id='comic').find_all('img') |
|
1784 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1785 | title = ' '.join(i['title'] for i in imgs) |
|
1786 | return { |
|
1787 | 'img': [i['src'] for i in imgs], |
|
1788 | 'title': title, |
|
1789 | } |
|
@@ 2749-2765 (lines=17) @@ | ||
2746 | 'year': day.year, |
|
2747 | 'day': day.day, |
|
2748 | } |
|
2749 | ||
2750 | ||
2751 | class BuniComic(GenericNavigableComic): |
|
2752 | """Class to retrieve Buni Comics.""" |
|
2753 | name = 'buni' |
|
2754 | long_name = 'BuniComics' |
|
2755 | url = 'http://www.bunicomic.com' |
|
2756 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2757 | get_navi_link = get_link_rel_next |
|
2758 | ||
2759 | @classmethod |
|
2760 | def get_comic_info(cls, soup, link): |
|
2761 | """Get information about a particular comics.""" |
|
2762 | imgs = soup.find('div', id='comic').find_all('img') |
|
2763 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2764 | assert len(imgs) == 1, imgs |
|
2765 | return { |
|
2766 | 'img': [i['src'] for i in imgs], |
|
2767 | 'title': imgs[0]['title'], |
|
2768 | } |