Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

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