@@ 1824-1841 (lines=18) @@ | ||
1821 | class BigFootJustice(GenericNavigableComic): |
|
1822 | """Class to retrieve Big Foot Justice comics.""" |
|
1823 | # Also on http://tapastic.com/series/bigfoot-justice |
|
1824 | name = 'bigfoot' |
|
1825 | long_name = 'Big Foot Justice' |
|
1826 | url = 'http://bigfootjustice.com' |
|
1827 | get_first_comic_link = get_a_navi_navifirst |
|
1828 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1829 | ||
1830 | @classmethod |
|
1831 | def get_comic_info(cls, soup, link): |
|
1832 | """Get information about a particular comics.""" |
|
1833 | imgs = soup.find('div', id='comic').find_all('img') |
|
1834 | assert all(i['title'] == i['alt'] for i in imgs) |
|
1835 | title = ' '.join(i['title'] for i in imgs) |
|
1836 | return { |
|
1837 | 'img': [i['src'] for i in imgs], |
|
1838 | 'title': title, |
|
1839 | } |
|
1840 | ||
1841 | ||
1842 | class RespawnComic(GenericNavigableComic): |
|
1843 | """Class to retrieve Respawn Comic.""" |
|
1844 | # Also on https://respawncomic.tumblr.com |
|
@@ 2837-2853 (lines=17) @@ | ||
2834 | 'month': day.month, |
|
2835 | 'year': day.year |
|
2836 | } |
|
2837 | ||
2838 | ||
2839 | class PlanC(GenericNavigableComic): |
|
2840 | """Class to retrieve Plan C comics.""" |
|
2841 | name = 'planc' |
|
2842 | long_name = 'Plan C' |
|
2843 | url = 'http://www.plancomic.com' |
|
2844 | get_first_comic_link = get_a_navi_navifirst |
|
2845 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
2846 | ||
2847 | @classmethod |
|
2848 | def get_comic_info(cls, soup, link): |
|
2849 | """Get information about a particular comics.""" |
|
2850 | title = soup.find('h2', class_='post-title').string |
|
2851 | date_str = soup.find("span", class_="post-date").string |
|
2852 | day = string_to_date(date_str, "%B %d, %Y") |
|
2853 | imgs = soup.find('div', id='comic').find_all('img') |
|
2854 | return { |
|
2855 | 'title': title, |
|
2856 | 'img': [i['src'] for i in imgs], |