Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1727-1744 (lines=18) @@
1724
        }
1725
1726
1727
class BigFootJustice(GenericNavigableComic):
1728
    """Class to retrieve Big Foot Justice comics."""
1729
    # Also on http://tapastic.com/series/bigfoot-justice
1730
    name = 'bigfoot'
1731
    long_name = 'Big Foot Justice'
1732
    url = 'http://bigfootjustice.com'
1733
    get_first_comic_link = get_a_navi_navifirst
1734
    get_navi_link = get_a_navi_comicnavnext_navinext
1735
1736
    @classmethod
1737
    def get_comic_info(cls, soup, link):
1738
        """Get information about a particular comics."""
1739
        imgs = soup.find('div', id='comic').find_all('img')
1740
        assert all(i['title'] == i['alt'] for i in imgs)
1741
        title = ' '.join(i['title'] for i in imgs)
1742
        return {
1743
            'img': [i['src'] for i in imgs],
1744
            'title': title,
1745
        }
1746
1747
@@ 2598-2614 (lines=17) @@
2595
        }
2596
2597
2598
class BuniComic(GenericNavigableComic):
2599
    """Class to retrieve Buni Comics."""
2600
    name = 'buni'
2601
    long_name = 'BuniComics'
2602
    url = 'http://www.bunicomic.com'
2603
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2604
    get_navi_link = get_link_rel_next
2605
2606
    @classmethod
2607
    def get_comic_info(cls, soup, link):
2608
        """Get information about a particular comics."""
2609
        imgs = soup.find('div', id='comic').find_all('img')
2610
        assert all(i['alt'] == i['title'] for i in imgs)
2611
        assert len(imgs) == 1
2612
        return {
2613
            'img': [i['src'] for i in imgs],
2614
            'title': imgs[0]['title'],
2615
        }
2616
2617