Code Duplication    Length = 18-18 lines in 2 locations

comics.py 2 locations

@@ 3555-3572 (lines=18) @@
3552
            'year': day.year,
3553
            'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs],
3554
        }
3555
3556
3557
class GloryOwlComix(GenericBlogspotComic):
3558
    """Class to retrieve Glory Owl comics."""
3559
    name = 'gloryowl'
3560
    long_name = 'Glory Owl'
3561
    url = 'http://gloryowlcomix.blogspot.fr'
3562
    _categories = ('NSFW', 'FRANCAIS')
3563
    first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html'
3564
3565
    @classmethod
3566
    def get_comic_info(cls, soup, link):
3567
        """Get information about a particular comics."""
3568
        title = soup.find('title').string
3569
        imgs = soup.find_all('link', rel='image_src')
3570
        author = soup.find('a', rel='author').string
3571
        return {
3572
            'img': [i['href'] for i in imgs],
3573
            'author': author,
3574
            'title': title,
3575
        }
@@ 3470-3487 (lines=18) @@
3467
    def get_navi_link(cls, last_soup, next_):
3468
        """Get link to next or previous comic."""
3469
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3470
3471
3472
class TuMourrasMoinsBete(GenericBlogspotComic):
3473
    """Class to retrieve Tu Mourras Moins Bete comics."""
3474
    name = 'mourrasmoinsbete'
3475
    long_name = 'Tu Mourras Moins Bete'
3476
    url = 'http://tumourrasmoinsbete.blogspot.fr'
3477
    _categories = ('FRANCAIS', )
3478
    first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html'
3479
3480
    @classmethod
3481
    def get_comic_info(cls, soup, link):
3482
        """Get information about a particular comics."""
3483
        title = soup.find('title').string
3484
        imgs = soup.find('div', itemprop='description articleBody').find_all('img')
3485
        author = soup.find('span', itemprop='author').string
3486
        return {
3487
            'img': [i['src'] for i in imgs],
3488
            'author': author,
3489
            'title': title,
3490
        }