Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1751-1768 (lines=18) @@
1748
        }
1749
1750
1751
class BigFootJustice(GenericNavigableComic):
1752
    """Class to retrieve Big Foot Justice comics."""
1753
    # Also on http://tapastic.com/series/bigfoot-justice
1754
    name = 'bigfoot'
1755
    long_name = 'Big Foot Justice'
1756
    url = 'http://bigfootjustice.com'
1757
    get_first_comic_link = get_a_navi_navifirst
1758
    get_navi_link = get_a_navi_comicnavnext_navinext
1759
1760
    @classmethod
1761
    def get_comic_info(cls, soup, link):
1762
        """Get information about a particular comics."""
1763
        imgs = soup.find('div', id='comic').find_all('img')
1764
        assert all(i['title'] == i['alt'] for i in imgs)
1765
        title = ' '.join(i['title'] for i in imgs)
1766
        return {
1767
            'img': [i['src'] for i in imgs],
1768
            'title': title,
1769
        }
1770
1771
@@ 2635-2651 (lines=17) @@
2632
        }
2633
2634
2635
class BuniComic(GenericNavigableComic):
2636
    """Class to retrieve Buni Comics."""
2637
    name = 'buni'
2638
    long_name = 'BuniComics'
2639
    url = 'http://www.bunicomic.com'
2640
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2641
    get_navi_link = get_link_rel_next
2642
2643
    @classmethod
2644
    def get_comic_info(cls, soup, link):
2645
        """Get information about a particular comics."""
2646
        imgs = soup.find('div', id='comic').find_all('img')
2647
        assert all(i['alt'] == i['title'] for i in imgs)
2648
        assert len(imgs) == 1
2649
        return {
2650
            'img': [i['src'] for i in imgs],
2651
            'title': imgs[0]['title'],
2652
        }
2653
2654