Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1769-1786 (lines=18) @@
1766
        }
1767
1768
1769
class BigFootJustice(GenericNavigableComic):
1770
    """Class to retrieve Big Foot Justice comics."""
1771
    # Also on http://tapastic.com/series/bigfoot-justice
1772
    name = 'bigfoot'
1773
    long_name = 'Big Foot Justice'
1774
    url = 'http://bigfootjustice.com'
1775
    get_first_comic_link = get_a_navi_navifirst
1776
    get_navi_link = get_a_navi_comicnavnext_navinext
1777
1778
    @classmethod
1779
    def get_comic_info(cls, soup, link):
1780
        """Get information about a particular comics."""
1781
        imgs = soup.find('div', id='comic').find_all('img')
1782
        assert all(i['title'] == i['alt'] for i in imgs)
1783
        title = ' '.join(i['title'] for i in imgs)
1784
        return {
1785
            'img': [i['src'] for i in imgs],
1786
            'title': title,
1787
        }
1788
1789
@@ 2749-2765 (lines=17) @@
2746
        }
2747
2748
2749
class BuniComic(GenericNavigableComic):
2750
    """Class to retrieve Buni Comics."""
2751
    name = 'buni'
2752
    long_name = 'BuniComics'
2753
    url = 'http://www.bunicomic.com'
2754
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2755
    get_navi_link = get_link_rel_next
2756
2757
    @classmethod
2758
    def get_comic_info(cls, soup, link):
2759
        """Get information about a particular comics."""
2760
        imgs = soup.find('div', id='comic').find_all('img')
2761
        assert all(i['alt'] == i['title'] for i in imgs)
2762
        assert len(imgs) == 1
2763
        return {
2764
            'img': [i['src'] for i in imgs],
2765
            'title': imgs[0]['title'],
2766
        }
2767
2768