Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1752-1769 (lines=18) @@
1749
    # Also on http://tapastic.com/series/bigfoot-justice
1750
    name = 'bigfoot'
1751
    long_name = 'Big Foot Justice'
1752
    url = 'http://bigfootjustice.com'
1753
    get_first_comic_link = get_a_navi_navifirst
1754
    get_navi_link = get_a_navi_comicnavnext_navinext
1755
1756
    @classmethod
1757
    def get_comic_info(cls, soup, link):
1758
        """Get information about a particular comics."""
1759
        imgs = soup.find('div', id='comic').find_all('img')
1760
        assert all(i['title'] == i['alt'] for i in imgs)
1761
        title = ' '.join(i['title'] for i in imgs)
1762
        return {
1763
            'img': [i['src'] for i in imgs],
1764
            'title': title,
1765
        }
1766
1767
1768
class RespawnComic(GenericNavigableComic):
1769
    """Class to retrieve Respawn Comic."""
1770
    # Also on http://respawncomic.tumblr.com
1771
    name = 'respawn'
1772
    long_name = 'Respawn Comic'
@@ 2681-2697 (lines=17) @@
2678
    name = 'buni'
2679
    long_name = 'BuniComics'
2680
    url = 'http://www.bunicomic.com'
2681
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2682
    get_navi_link = get_link_rel_next
2683
2684
    @classmethod
2685
    def get_comic_info(cls, soup, link):
2686
        """Get information about a particular comics."""
2687
        imgs = soup.find('div', id='comic').find_all('img')
2688
        assert all(i['alt'] == i['title'] for i in imgs)
2689
        assert len(imgs) == 1
2690
        return {
2691
            'img': [i['src'] for i in imgs],
2692
            'title': imgs[0]['title'],
2693
        }
2694
2695
2696
class GenericCommitStrip(GenericNavigableComic):
2697
    """Generic class to retrieve Commit Strips in different languages."""
2698
    get_navi_link = get_a_rel_next
2699
    get_first_comic_link = simulate_first_link
2700
    first_url = NotImplemented