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