Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

@@ 3516-3539 (lines=24) @@
3513
3514
3515
class GloryOwlComix(GenericNavigableComic):
3516
    """Class to retrieve Glory Owl comics."""
3517
    name = 'gloryowl'
3518
    long_name = 'Glory Owl'
3519
    url = 'http://gloryowlcomix.blogspot.fr'
3520
    _categories = ('NSFW', 'FRANCAIS')
3521
    get_first_comic_link = simulate_first_link
3522
    first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html'
3523
3524
    @classmethod
3525
    def get_navi_link(cls, last_soup, next_):
3526
        """Get link to next or previous comic."""
3527
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3528
3529
    @classmethod
3530
    def get_comic_info(cls, soup, link):
3531
        """Get information about a particular comics."""
3532
        title = soup.find('title').string
3533
        imgs = soup.find_all('link', rel='image_src')
3534
        author = soup.find('a', rel='author').string
3535
        return {
3536
            'img': [i['href'] for i in imgs],
3537
            'author': author,
3538
            'title': title,
3539
        }
3540
3541
3542
class AtRandomComics(GenericNavigableComic):
@@ 3449-3472 (lines=24) @@
3446
3447
3448
class TuMourrasMoinsBete(GenericNavigableComic):
3449
    """Class to retrieve Tu Mourras Moins Bete comics."""
3450
    name = 'mourrasmoinsbete'
3451
    long_name = 'Tu Mourras Moins Bete'
3452
    url = 'http://tumourrasmoinsbete.blogspot.fr'
3453
    _categories = ('FRANCAIS', )
3454
    get_first_comic_link = simulate_first_link
3455
    first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html'
3456
3457
    @classmethod
3458
    def get_navi_link(cls, last_soup, next_):
3459
        """Get link to next or previous comic."""
3460
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3461
3462
    @classmethod
3463
    def get_comic_info(cls, soup, link):
3464
        """Get information about a particular comics."""
3465
        title = soup.find('title').string
3466
        imgs = soup.find('div', itemprop='description articleBody').find_all('img')
3467
        author = soup.find('span', itemprop='author').string
3468
        return {
3469
            'img': [i['src'] for i in imgs],
3470
            'author': author,
3471
            'title': title,
3472
        }
3473
3474
3475
class GeekAndPoke(GenericNavigableComic):