Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1847-1864 (lines=18) @@
1844
        }
1845
1846
1847
class BigFootJustice(GenericNavigableComic):
1848
    """Class to retrieve Big Foot Justice comics."""
1849
    # Also on http://tapastic.com/series/bigfoot-justice
1850
    name = 'bigfoot'
1851
    long_name = 'Big Foot Justice'
1852
    url = 'http://bigfootjustice.com'
1853
    get_first_comic_link = get_a_navi_navifirst
1854
    get_navi_link = get_a_navi_comicnavnext_navinext
1855
1856
    @classmethod
1857
    def get_comic_info(cls, soup, link):
1858
        """Get information about a particular comics."""
1859
        imgs = soup.find('div', id='comic').find_all('img')
1860
        assert all(i['title'] == i['alt'] for i in imgs)
1861
        title = ' '.join(i['title'] for i in imgs)
1862
        return {
1863
            'img': [i['src'] for i in imgs],
1864
            'title': title,
1865
        }
1866
1867
@@ 2889-2905 (lines=17) @@
2886
        }
2887
2888
2889
class BuniComic(GenericNavigableComic):
2890
    """Class to retrieve Buni Comics."""
2891
    name = 'buni'
2892
    long_name = 'BuniComics'
2893
    url = 'http://www.bunicomic.com'
2894
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2895
    get_navi_link = get_link_rel_next
2896
2897
    @classmethod
2898
    def get_comic_info(cls, soup, link):
2899
        """Get information about a particular comics."""
2900
        imgs = soup.find('div', id='comic').find_all('img')
2901
        assert all(i['alt'] == i['title'] for i in imgs)
2902
        assert len(imgs) == 1, imgs
2903
        return {
2904
            'img': [i['src'] for i in imgs],
2905
            'title': imgs[0]['title'],
2906
        }
2907
2908