Code Duplication    Length = 18-18 lines in 2 locations

comics.py 2 locations

@@ 3672-3689 (lines=18) @@
3669
        }
3670
3671
3672
class GloryOwlComix(GenericBlogspotComic):
3673
    """Class to retrieve Glory Owl comics."""
3674
    name = 'gloryowl'
3675
    long_name = 'Glory Owl'
3676
    url = 'http://gloryowlcomix.blogspot.fr'
3677
    _categories = ('NSFW', 'FRANCAIS')
3678
    first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html'
3679
3680
    @classmethod
3681
    def get_comic_info(cls, soup, link):
3682
        """Get information about a particular comics."""
3683
        title = soup.find('title').string
3684
        imgs = soup.find_all('link', rel='image_src')
3685
        author = soup.find('a', rel='author').string
3686
        return {
3687
            'img': [i['href'] for i in imgs],
3688
            'author': author,
3689
            'title': title,
3690
        }
3691
3692
@@ 3586-3603 (lines=18) @@
3583
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3584
3585
3586
class TuMourrasMoinsBete(GenericBlogspotComic):
3587
    """Class to retrieve Tu Mourras Moins Bete comics."""
3588
    name = 'mourrasmoinsbete'
3589
    long_name = 'Tu Mourras Moins Bete'
3590
    url = 'http://tumourrasmoinsbete.blogspot.fr'
3591
    _categories = ('FRANCAIS', )
3592
    first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html'
3593
3594
    @classmethod
3595
    def get_comic_info(cls, soup, link):
3596
        """Get information about a particular comics."""
3597
        title = soup.find('title').string
3598
        imgs = soup.find('div', itemprop='description articleBody').find_all('img')
3599
        author = soup.find('span', itemprop='author').string
3600
        return {
3601
            'img': [i['src'] for i in imgs],
3602
            'author': author,
3603
            'title': title,
3604
        }
3605
3606