Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

@@ 3419-3442 (lines=24) @@
3416
        }
3417
3418
3419
class GloryOwlComix(GenericNavigableComic):
3420
    """Class to retrieve Glory Owl comics."""
3421
    name = 'gloryowl'
3422
    long_name = 'Glory Owl'
3423
    url = 'http://gloryowlcomix.blogspot.fr'
3424
    _categories = ('NSFW', 'FRANCAIS')
3425
    get_first_comic_link = simulate_first_link
3426
    first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html'
3427
3428
    @classmethod
3429
    def get_navi_link(cls, last_soup, next_):
3430
        """Get link to next or previous comic."""
3431
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3432
3433
    @classmethod
3434
    def get_comic_info(cls, soup, link):
3435
        """Get information about a particular comics."""
3436
        title = soup.find('title').string
3437
        imgs = soup.find_all('link', rel='image_src')
3438
        author = soup.find('a', rel='author').string
3439
        return {
3440
            'img': [i['href'] for i in imgs],
3441
            'author': author,
3442
            'title': title,
3443
        }
3444
3445
@@ 3352-3375 (lines=24) @@
3349
        }
3350
3351
3352
class TuMourrasMoinsBete(GenericNavigableComic):
3353
    """Class to retrieve Tu Mourras Moins Bete comics."""
3354
    name = 'mourrasmoinsbete'
3355
    long_name = 'Tu Mourras Moins Bete'
3356
    url = 'http://tumourrasmoinsbete.blogspot.fr'
3357
    _categories = ('FRANCAIS', )
3358
    get_first_comic_link = simulate_first_link
3359
    first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html'
3360
3361
    @classmethod
3362
    def get_navi_link(cls, last_soup, next_):
3363
        """Get link to next or previous comic."""
3364
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3365
3366
    @classmethod
3367
    def get_comic_info(cls, soup, link):
3368
        """Get information about a particular comics."""
3369
        title = soup.find('title').string
3370
        imgs = soup.find('div', itemprop='description articleBody').find_all('img')
3371
        author = soup.find('span', itemprop='author').string
3372
        return {
3373
            'img': [i['src'] for i in imgs],
3374
            'author': author,
3375
            'title': title,
3376
        }
3377
3378