Code Duplication    Length = 16-17 lines in 2 locations

comics.py 2 locations

@@ 1666-1682 (lines=17) @@
1663
        }
1664
1665
1666
class BigFootJustice(GenericNavigableComic):
1667
    """Class to retrieve Big Foot Justice comics."""
1668
    # Also on http://tapastic.com/series/bigfoot-justice
1669
    name = 'bigfoot'
1670
    long_name = 'Big Foot Justice'
1671
    url = 'http://bigfootjustice.com'
1672
    get_first_comic_link = get_a_navi_navifirst
1673
    get_navi_link = get_a_navi_comicnavnext_navinext
1674
1675
    @classmethod
1676
    def get_comic_info(cls, soup, link):
1677
        imgs = soup.find('div', id='comic').find_all('img')
1678
        assert all(i['title'] == i['alt'] for i in imgs)
1679
        title = ' '.join(i['title'] for i in imgs)
1680
        return {
1681
            'img': [i['src'] for i in imgs],
1682
            'title': title,
1683
        }
1684
1685
@@ 2513-2528 (lines=16) @@
2510
        }
2511
2512
2513
class BuniComic(GenericNavigableComic):
2514
    """Class to retrieve Buni Comics."""
2515
    name = 'buni'
2516
    long_name = 'BuniComics'
2517
    url = 'http://www.bunicomic.com'
2518
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2519
    get_navi_link = get_link_rel_next
2520
2521
    @classmethod
2522
    def get_comic_info(cls, soup, link):
2523
        imgs = soup.find('div', id='comic').find_all('img')
2524
        assert all(i['alt'] == i['title'] for i in imgs)
2525
        assert len(imgs) == 1
2526
        return {
2527
            'img': [i['src'] for i in imgs],
2528
            'title': imgs[0]['title'],
2529
        }
2530
2531