Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1752-1769 (lines=18) @@
1749
        }
1750
1751
1752
class BigFootJustice(GenericNavigableComic):
1753
    """Class to retrieve Big Foot Justice comics."""
1754
    # Also on http://tapastic.com/series/bigfoot-justice
1755
    name = 'bigfoot'
1756
    long_name = 'Big Foot Justice'
1757
    url = 'http://bigfootjustice.com'
1758
    get_first_comic_link = get_a_navi_navifirst
1759
    get_navi_link = get_a_navi_comicnavnext_navinext
1760
1761
    @classmethod
1762
    def get_comic_info(cls, soup, link):
1763
        """Get information about a particular comics."""
1764
        imgs = soup.find('div', id='comic').find_all('img')
1765
        assert all(i['title'] == i['alt'] for i in imgs)
1766
        title = ' '.join(i['title'] for i in imgs)
1767
        return {
1768
            'img': [i['src'] for i in imgs],
1769
            'title': title,
1770
        }
1771
1772
@@ 2658-2674 (lines=17) @@
2655
        }
2656
2657
2658
class BuniComic(GenericNavigableComic):
2659
    """Class to retrieve Buni Comics."""
2660
    name = 'buni'
2661
    long_name = 'BuniComics'
2662
    url = 'http://www.bunicomic.com'
2663
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2664
    get_navi_link = get_link_rel_next
2665
2666
    @classmethod
2667
    def get_comic_info(cls, soup, link):
2668
        """Get information about a particular comics."""
2669
        imgs = soup.find('div', id='comic').find_all('img')
2670
        assert all(i['alt'] == i['title'] for i in imgs)
2671
        assert len(imgs) == 1
2672
        return {
2673
            'img': [i['src'] for i in imgs],
2674
            'title': imgs[0]['title'],
2675
        }
2676
2677