Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

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