Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

@@ 3321-3344 (lines=24) @@
3318
        }
3319
3320
3321
class GloryOwlComix(GenericNavigableComic):
3322
    """Class to retrieve Glory Owl comics."""
3323
    name = 'gloryowl'
3324
    long_name = 'Glory Owl'
3325
    url = 'http://gloryowlcomix.blogspot.fr'
3326
    _categories = ('NSFW', 'FRANCAIS')
3327
    get_first_comic_link = simulate_first_link
3328
    first_url = 'http://gloryowlcomix.blogspot.fr/2013/02/1_7.html'
3329
3330
    @classmethod
3331
    def get_navi_link(cls, last_soup, next_):
3332
        """Get link to next or previous comic."""
3333
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3334
3335
    @classmethod
3336
    def get_comic_info(cls, soup, link):
3337
        """Get information about a particular comics."""
3338
        title = soup.find('title').string
3339
        imgs = soup.find_all('link', rel='image_src')
3340
        author = soup.find('a', rel='author').string
3341
        return {
3342
            'img': [i['href'] for i in imgs],
3343
            'author': author,
3344
            'title': title,
3345
        }
3346
3347
@@ 3254-3277 (lines=24) @@
3251
        }
3252
3253
3254
class TuMourrasMoinsBete(GenericNavigableComic):
3255
    """Class to retrieve Tu Mourras Moins Bete comics."""
3256
    name = 'mourrasmoinsbete'
3257
    long_name = 'Tu Mourras Moins Bete'
3258
    url = 'http://tumourrasmoinsbete.blogspot.fr'
3259
    _categories = ('FRANCAIS', )
3260
    get_first_comic_link = simulate_first_link
3261
    first_url = 'http://tumourrasmoinsbete.blogspot.fr/2008/06/essai.html'
3262
3263
    @classmethod
3264
    def get_navi_link(cls, last_soup, next_):
3265
        """Get link to next or previous comic."""
3266
        return last_soup.find('a', id='Blog1_blog-pager-newer-link' if next_ else 'Blog1_blog-pager-older-link')
3267
3268
    @classmethod
3269
    def get_comic_info(cls, soup, link):
3270
        """Get information about a particular comics."""
3271
        title = soup.find('title').string
3272
        imgs = soup.find('div', itemprop='description articleBody').find_all('img')
3273
        author = soup.find('span', itemprop='author').string
3274
        return {
3275
            'img': [i['src'] for i in imgs],
3276
            'author': author,
3277
            'title': title,
3278
        }
3279
3280