@@ 1752-1769 (lines=18) @@ | ||
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 | } |
|
1767 | ||
1768 | ||
1769 | class RespawnComic(GenericNavigableComic): |
|
1770 | """Class to retrieve Respawn Comic.""" |
|
1771 | # Also on http://respawncomic.tumblr.com |
|
1772 | name = 'respawn' |
|
@@ 2681-2697 (lines=17) @@ | ||
2678 | """Class to retrieve Buni Comics.""" |
|
2679 | name = 'buni' |
|
2680 | long_name = 'BuniComics' |
|
2681 | url = 'http://www.bunicomic.com' |
|
2682 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2683 | get_navi_link = get_link_rel_next |
|
2684 | ||
2685 | @classmethod |
|
2686 | def get_comic_info(cls, soup, link): |
|
2687 | """Get information about a particular comics.""" |
|
2688 | imgs = soup.find('div', id='comic').find_all('img') |
|
2689 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2690 | assert len(imgs) == 1 |
|
2691 | return { |
|
2692 | 'img': [i['src'] for i in imgs], |
|
2693 | 'title': imgs[0]['title'], |
|
2694 | } |
|
2695 | ||
2696 | ||
2697 | class GenericCommitStrip(GenericNavigableComic): |
|
2698 | """Generic class to retrieve Commit Strips in different languages.""" |
|
2699 | get_navi_link = get_a_rel_next |
|
2700 | get_first_comic_link = simulate_first_link |