Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

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