@@ 4184-4198 (lines=15) @@ | ||
4181 | # Also on http://librarycomic.com |
|
4182 | name = 'library-tumblr' |
|
4183 | long_name = 'LibraryComic (from Tumblr)' |
|
4184 | url = 'http://librarycomic.tumblr.com' |
|
4185 | ||
4186 | ||
4187 | class TizzyStitchBirdTumblr(GenericTumblrV1): |
|
4188 | """Class to retrieve Tizzy Stitch Bird comics.""" |
|
4189 | # Also on http://tizzystitchbird.com |
|
4190 | # Also on https://tapastic.com/series/TizzyStitchbird |
|
4191 | # Also on http://www.webtoons.com/en/challenge/tizzy-stitchbird/list?title_no=50082 |
|
4192 | name = 'tizzy-tumblr' |
|
4193 | long_name = 'Tizzy Stitch Bird (from Tumblr)' |
|
4194 | url = 'http://tizzystitchbird.tumblr.com' |
|
4195 | ||
4196 | ||
4197 | class HorovitzComics(GenericListableComic): |
|
4198 | """Generic class to handle the logic common to the different comics from Horovitz.""" |
|
4199 | url = 'http://www.horovitzcomics.com' |
|
4200 | _categories = ('HOROVITZ', ) |
|
4201 | img_re = re.compile('.*comics/([0-9]*)/([0-9]*)/([0-9]*)/.*$') |
|
@@ 2952-2964 (lines=13) @@ | ||
2949 | """Generic class to retrieve comics using WordPress with Inkblot.""" |
|
2950 | get_navi_link = get_link_rel_next |
|
2951 | ||
2952 | @classmethod |
|
2953 | def get_first_comic_link(cls): |
|
2954 | """Get link to first comics.""" |
|
2955 | return get_soup_at_url(cls.url).find('a', class_='webcomic-link webcomic1-link first-webcomic-link first-webcomic1-link') |
|
2956 | ||
2957 | @classmethod |
|
2958 | def get_comic_info(cls, soup, link): |
|
2959 | """Get information about a particular comics.""" |
|
2960 | title = soup.find('meta', property='og:title')['content'] |
|
2961 | imgs = soup.find('div', class_='webcomic-image').find_all('img') |
|
2962 | date_str = soup.find('meta', property='article:published_time')['content'][:10] |
|
2963 | day = string_to_date(date_str, "%Y-%m-%d") |
|
2964 | return { |
|
2965 | 'title': title, |
|
2966 | 'day': day.day, |
|
2967 | 'month': day.month, |
|
@@ 2656-2667 (lines=12) @@ | ||
2653 | ||
2654 | ||
2655 | class GenericCommitStrip(GenericNavigableComic): |
|
2656 | """Generic class to retrieve Commit Strips in different languages.""" |
|
2657 | get_navi_link = get_a_rel_next |
|
2658 | get_first_comic_link = simulate_first_link |
|
2659 | first_url = NotImplemented |
|
2660 | ||
2661 | @classmethod |
|
2662 | def get_comic_info(cls, soup, link): |
|
2663 | """Get information about a particular comics.""" |
|
2664 | desc = soup.find('meta', property='og:description')['content'] |
|
2665 | title = soup.find('meta', property='og:title')['content'] |
|
2666 | imgs = soup.find('div', class_='entry-content').find_all('img') |
|
2667 | title2 = ' '.join(i.get('title', '') for i in imgs) |
|
2668 | return { |
|
2669 | 'title': title, |
|
2670 | 'title2': title2, |