Code Duplication    Length = 24-24 lines in 2 locations

comics.py 2 locations

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