Code Duplication    Length = 12-13 lines in 2 locations

comics.py 2 locations

@@ 2981-2993 (lines=13) @@
2978
        return {
2979
            'title': title,
2980
            'img': [i['content'] for i in imgs],
2981
        }
2982
2983
2984
class SheldonComics(GenericNavigableComic):
2985
    """Class to retrieve Sheldon comics."""
2986
    # Also on http://www.gocomics.com/sheldon
2987
    name = 'sheldon'
2988
    long_name = 'Sheldon Comics'
2989
    url = 'http://www.sheldoncomics.com'
2990
2991
    @classmethod
2992
    def get_first_comic_link(cls):
2993
        """Get link to first comics."""
2994
        return get_soup_at_url(cls.url).find("a", id="nav-first")
2995
2996
    @classmethod
@@ 2674-2685 (lines=12) @@
2671
        assert all(i['alt'] == i['title'] for i in imgs)
2672
        return {
2673
            'short_url': short_url,
2674
            'img': [i['src'] for i in imgs],
2675
            'title': title,
2676
            'author': author,
2677
            'month': day.month,
2678
            'year': day.year,
2679
            'day': day.day,
2680
        }
2681
2682
2683
class BoumerieEn(GenericBoumerie):
2684
    """Class to retrieve Boumeries comics in English."""
2685
    name = 'boumeries_en'
2686
    long_name = 'Boumeries (En)'
2687
    url = 'http://comics.boumerie.com'
2688
    date_format = "%B %d, %Y"