@@ 1725-1742 (lines=18) @@ | ||
1722 | 'title': title, |
|
1723 | 'author': author, |
|
1724 | } |
|
1725 | ||
1726 | ||
1727 | class BigFootJustice(GenericNavigableComic): |
|
1728 | """Class to retrieve Big Foot Justice comics.""" |
|
1729 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1730 | name = 'bigfoot' |
|
1731 | long_name = 'Big Foot Justice' |
|
1732 | url = 'http://bigfootjustice.com' |
|
1733 | get_first_comic_link = get_a_navi_navifirst |
|
1734 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1735 | ||
1736 | @classmethod |
|
1737 | def get_comic_info(cls, soup, link): |
|
1738 | """Get information about a particular comics.""" |
|
1739 | imgs = soup.find('div', id='comic').find_all('img') |
|
1740 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1741 | title = ' '.join(i['title'] for i in imgs) |
|
1742 | return { |
|
1743 | 'img': [i['src'] for i in imgs], |
|
1744 | 'title': title, |
|
1745 | } |
|
@@ 2600-2616 (lines=17) @@ | ||
2597 | 'year': day.year, |
|
2598 | 'day': day.day, |
|
2599 | } |
|
2600 | ||
2601 | ||
2602 | class BuniComic(GenericNavigableComic): |
|
2603 | """Class to retrieve Buni Comics.""" |
|
2604 | name = 'buni' |
|
2605 | long_name = 'BuniComics' |
|
2606 | url = 'http://www.bunicomic.com' |
|
2607 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2608 | get_navi_link = get_link_rel_next |
|
2609 | ||
2610 | @classmethod |
|
2611 | def get_comic_info(cls, soup, link): |
|
2612 | """Get information about a particular comics.""" |
|
2613 | imgs = soup.find('div', id='comic').find_all('img') |
|
2614 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2615 | assert len(imgs) == 1 |
|
2616 | return { |
|
2617 | 'img': [i['src'] for i in imgs], |
|
2618 | 'title': imgs[0]['title'], |
|
2619 | } |