Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

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