Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1777-1794 (lines=18) @@
1774
        }
1775
1776
1777
class BigFootJustice(GenericNavigableComic):
1778
    """Class to retrieve Big Foot Justice comics."""
1779
    # Also on http://tapastic.com/series/bigfoot-justice
1780
    name = 'bigfoot'
1781
    long_name = 'Big Foot Justice'
1782
    url = 'http://bigfootjustice.com'
1783
    get_first_comic_link = get_a_navi_navifirst
1784
    get_navi_link = get_a_navi_comicnavnext_navinext
1785
1786
    @classmethod
1787
    def get_comic_info(cls, soup, link):
1788
        """Get information about a particular comics."""
1789
        imgs = soup.find('div', id='comic').find_all('img')
1790
        assert all(i['title'] == i['alt'] for i in imgs)
1791
        title = ' '.join(i['title'] for i in imgs)
1792
        return {
1793
            'img': [i['src'] for i in imgs],
1794
            'title': title,
1795
        }
1796
1797
@@ 2758-2774 (lines=17) @@
2755
        }
2756
2757
2758
class BuniComic(GenericNavigableComic):
2759
    """Class to retrieve Buni Comics."""
2760
    name = 'buni'
2761
    long_name = 'BuniComics'
2762
    url = 'http://www.bunicomic.com'
2763
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2764
    get_navi_link = get_link_rel_next
2765
2766
    @classmethod
2767
    def get_comic_info(cls, soup, link):
2768
        """Get information about a particular comics."""
2769
        imgs = soup.find('div', id='comic').find_all('img')
2770
        assert all(i['alt'] == i['title'] for i in imgs)
2771
        assert len(imgs) == 1
2772
        return {
2773
            'img': [i['src'] for i in imgs],
2774
            'title': imgs[0]['title'],
2775
        }
2776
2777