Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

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