Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

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