@@ 896-918 (lines=23) @@ | ||
893 | } |
|
894 | ||
895 | ||
896 | class TheGentlemanArmchair(GenericNavigableComic): |
|
897 | """Class to retrieve The Gentleman Armchair comics.""" |
|
898 | name = 'gentlemanarmchair' |
|
899 | long_name = 'The Gentleman Armchair' |
|
900 | url = 'http://thegentlemansarmchair.com' |
|
901 | get_first_comic_link = get_a_navi_navifirst |
|
902 | get_navi_link = get_link_rel_next |
|
903 | ||
904 | @classmethod |
|
905 | def get_comic_info(cls, soup, link): |
|
906 | """Get information about a particular comics.""" |
|
907 | title = soup.find('h2', class_='post-title').string |
|
908 | author = soup.find("span", class_="post-author").find("a").string |
|
909 | date_str = soup.find('span', class_='post-date').string |
|
910 | day = string_to_date(date_str, "%B %d, %Y") |
|
911 | imgs = soup.find('div', id='comic').find_all('img') |
|
912 | return { |
|
913 | 'img': [i['src'] for i in imgs], |
|
914 | 'title': title, |
|
915 | 'author': author, |
|
916 | 'month': day.month, |
|
917 | 'year': day.year, |
|
918 | 'day': day.day, |
|
919 | } |
|
920 | ||
921 | ||
@@ 2323-2347 (lines=25) @@ | ||
2320 | } |
|
2321 | ||
2322 | ||
2323 | class LonnieMillsap(GenericNavigableComic): |
|
2324 | """Class to retrieve Lonnie Millsap's comics.""" |
|
2325 | name = 'millsap' |
|
2326 | long_name = 'Lonnie Millsap' |
|
2327 | url = 'http://www.lonniemillsap.com' |
|
2328 | get_navi_link = get_link_rel_next |
|
2329 | get_first_comic_link = simulate_first_link |
|
2330 | first_url = 'http://www.lonniemillsap.com/?p=42' |
|
2331 | ||
2332 | @classmethod |
|
2333 | def get_comic_info(cls, soup, link): |
|
2334 | """Get information about a particular comics.""" |
|
2335 | title = soup.find('h2', class_='post-title').string |
|
2336 | post = soup.find('div', class_='post-content') |
|
2337 | author = post.find("span", class_="post-author").find("a").string |
|
2338 | date_str = post.find("span", class_="post-date").string |
|
2339 | day = string_to_date(date_str, "%B %d, %Y") |
|
2340 | imgs = post.find("div", class_="entry").find_all("img") |
|
2341 | return { |
|
2342 | 'title': title, |
|
2343 | 'author': author, |
|
2344 | 'img': [i['src'] for i in imgs], |
|
2345 | 'month': day.month, |
|
2346 | 'year': day.year, |
|
2347 | 'day': day.day, |
|
2348 | } |
|
2349 | ||
2350 |