Code Duplication    Length = 12-15 lines in 3 locations

comics.py 3 locations

@@ 4184-4198 (lines=15) @@
4181
4182
class VerbalVomitTumblr(GenericTumblrV1):
4183
    """Class to retrieve Verbal Vomit comics."""
4184
    # Also on http://www.verbal-vomit.com
4185
    name = 'vomit-tumblr'
4186
    long_name = 'Verbal Vomit (from Tumblr)'
4187
    url = 'http://verbalvomits.tumblr.com'
4188
4189
4190
class LibraryComic(GenericTumblrV1):
4191
    """Class to retrieve LibraryComic."""
4192
    # Also on http://librarycomic.com
4193
    name = 'library-tumblr'
4194
    long_name = 'LibraryComic (from Tumblr)'
4195
    url = 'http://librarycomic.tumblr.com'
4196
4197
4198
class TizzyStitchBirdTumblr(GenericTumblrV1):
4199
    """Class to retrieve Tizzy Stitch Bird comics."""
4200
    # Also on http://tizzystitchbird.com
4201
    # Also on https://tapastic.com/series/TizzyStitchbird
@@ 2952-2964 (lines=13) @@
2949
            'year': day.year,
2950
            'img': [i['src'] for i in imgs],
2951
        }
2952
2953
2954
class GenericWordPressInkblot(GenericNavigableComic):
2955
    """Generic class to retrieve comics using WordPress with Inkblot."""
2956
    get_navi_link = get_link_rel_next
2957
2958
    @classmethod
2959
    def get_first_comic_link(cls):
2960
        """Get link to first comics."""
2961
        return get_soup_at_url(cls.url).find('a', class_='webcomic-link webcomic1-link first-webcomic-link first-webcomic1-link')
2962
2963
    @classmethod
2964
    def get_comic_info(cls, soup, link):
2965
        """Get information about a particular comics."""
2966
        title = soup.find('meta', property='og:title')['content']
2967
        imgs = soup.find('div', class_='webcomic-image').find_all('img')
@@ 2656-2667 (lines=12) @@
2653
        assert all(i['alt'] == i['title'] for i in imgs)
2654
        assert len(imgs) == 1
2655
        return {
2656
            'img': [i['src'] for i in imgs],
2657
            'title': imgs[0]['title'],
2658
        }
2659
2660
2661
class GenericCommitStrip(GenericNavigableComic):
2662
    """Generic class to retrieve Commit Strips in different languages."""
2663
    get_navi_link = get_a_rel_next
2664
    get_first_comic_link = simulate_first_link
2665
    first_url = NotImplemented
2666
2667
    @classmethod
2668
    def get_comic_info(cls, soup, link):
2669
        """Get information about a particular comics."""
2670
        desc = soup.find('meta', property='og:description')['content']