Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1778-1795 (lines=18) @@
1775
            'img': [i['src'] for i in imgs],
1776
            'title': title,
1777
            'author': author,
1778
        }
1779
1780
1781
class BigFootJustice(GenericNavigableComic):
1782
    """Class to retrieve Big Foot Justice comics."""
1783
    # Also on http://tapastic.com/series/bigfoot-justice
1784
    name = 'bigfoot'
1785
    long_name = 'Big Foot Justice'
1786
    url = 'http://bigfootjustice.com'
1787
    get_first_comic_link = get_a_navi_navifirst
1788
    get_navi_link = get_a_navi_comicnavnext_navinext
1789
1790
    @classmethod
1791
    def get_comic_info(cls, soup, link):
1792
        """Get information about a particular comics."""
1793
        imgs = soup.find('div', id='comic').find_all('img')
1794
        assert all(i['title'] == i['alt'] for i in imgs)
1795
        title = ' '.join(i['title'] for i in imgs)
1796
        return {
1797
            'img': [i['src'] for i in imgs],
1798
            'title': title,
@@ 2707-2723 (lines=17) @@
2704
            'month': day.month,
2705
            'year': day.year,
2706
            'day': day.day,
2707
        }
2708
2709
2710
class BuniComic(GenericNavigableComic):
2711
    """Class to retrieve Buni Comics."""
2712
    name = 'buni'
2713
    long_name = 'BuniComics'
2714
    url = 'http://www.bunicomic.com'
2715
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2716
    get_navi_link = get_link_rel_next
2717
2718
    @classmethod
2719
    def get_comic_info(cls, soup, link):
2720
        """Get information about a particular comics."""
2721
        imgs = soup.find('div', id='comic').find_all('img')
2722
        assert all(i['alt'] == i['title'] for i in imgs)
2723
        assert len(imgs) == 1
2724
        return {
2725
            'img': [i['src'] for i in imgs],
2726
            'title': imgs[0]['title'],