Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1732-1749 (lines=18) @@
1729
        }
1730
1731
1732
class BigFootJustice(GenericNavigableComic):
1733
    """Class to retrieve Big Foot Justice comics."""
1734
    # Also on http://tapastic.com/series/bigfoot-justice
1735
    name = 'bigfoot'
1736
    long_name = 'Big Foot Justice'
1737
    url = 'http://bigfootjustice.com'
1738
    get_first_comic_link = get_a_navi_navifirst
1739
    get_navi_link = get_a_navi_comicnavnext_navinext
1740
1741
    @classmethod
1742
    def get_comic_info(cls, soup, link):
1743
        """Get information about a particular comics."""
1744
        imgs = soup.find('div', id='comic').find_all('img')
1745
        assert all(i['title'] == i['alt'] for i in imgs)
1746
        title = ' '.join(i['title'] for i in imgs)
1747
        return {
1748
            'img': [i['src'] for i in imgs],
1749
            'title': title,
1750
        }
1751
1752
@@ 2616-2632 (lines=17) @@
2613
        }
2614
2615
2616
class BuniComic(GenericNavigableComic):
2617
    """Class to retrieve Buni Comics."""
2618
    name = 'buni'
2619
    long_name = 'BuniComics'
2620
    url = 'http://www.bunicomic.com'
2621
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2622
    get_navi_link = get_link_rel_next
2623
2624
    @classmethod
2625
    def get_comic_info(cls, soup, link):
2626
        """Get information about a particular comics."""
2627
        imgs = soup.find('div', id='comic').find_all('img')
2628
        assert all(i['alt'] == i['title'] for i in imgs)
2629
        assert len(imgs) == 1
2630
        return {
2631
            'img': [i['src'] for i in imgs],
2632
            'title': imgs[0]['title'],
2633
        }
2634
2635