Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1804-1821 (lines=18) @@
1801
1802
1803
class BigFootJustice(GenericNavigableComic):
1804
    """Class to retrieve Big Foot Justice comics."""
1805
    # Also on http://tapastic.com/series/bigfoot-justice
1806
    name = 'bigfoot'
1807
    long_name = 'Big Foot Justice'
1808
    url = 'http://bigfootjustice.com'
1809
    get_first_comic_link = get_a_navi_navifirst
1810
    get_navi_link = get_a_navi_comicnavnext_navinext
1811
1812
    @classmethod
1813
    def get_comic_info(cls, soup, link):
1814
        """Get information about a particular comics."""
1815
        imgs = soup.find('div', id='comic').find_all('img')
1816
        assert all(i['title'] == i['alt'] for i in imgs)
1817
        title = ' '.join(i['title'] for i in imgs)
1818
        return {
1819
            'img': [i['src'] for i in imgs],
1820
            'title': title,
1821
        }
1822
1823
1824
class RespawnComic(GenericNavigableComic):
@@ 2785-2801 (lines=17) @@
2782
2783
2784
class BuniComic(GenericNavigableComic):
2785
    """Class to retrieve Buni Comics."""
2786
    name = 'buni'
2787
    long_name = 'BuniComics'
2788
    url = 'http://www.bunicomic.com'
2789
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2790
    get_navi_link = get_link_rel_next
2791
2792
    @classmethod
2793
    def get_comic_info(cls, soup, link):
2794
        """Get information about a particular comics."""
2795
        imgs = soup.find('div', id='comic').find_all('img')
2796
        assert all(i['alt'] == i['title'] for i in imgs)
2797
        assert len(imgs) == 1
2798
        return {
2799
            'img': [i['src'] for i in imgs],
2800
            'title': imgs[0]['title'],
2801
        }
2802
2803
2804
class GenericCommitStrip(GenericNavigableComic):