Code Duplication    Length = 16-17 lines in 2 locations

comics.py 2 locations

@@ 4312-4328 (lines=17) @@
4309
4310
class HarkAVagrant(GenericTumblrV1):
4311
    """Class to retrieve Hark A Vagrant comics."""
4312
    # Also on http://www.harkavagrant.com
4313
    name = 'hark-tumblr'
4314
    long_name = 'Hark A Vagrant (from Tumblr)'
4315
    url = 'http://beatonna.tumblr.com'
4316
4317
4318
class OurSuperAdventureTumblr(GenericTumblrV1):
4319
    """Class to retrieve Our Super Adventure comics."""
4320
    # Also on https://tapastic.com/series/Our-Super-Adventure
4321
    # Also on http://www.oursuperadventure.com
4322
    # http://sarahgraley.com
4323
    name = 'superadventure-tumblr'
4324
    long_name = 'Our Super Adventure (from Tumblr)'
4325
    url = 'http://sarahssketchbook.tumblr.com'
4326
4327
4328
class JakeLikesOnions(GenericTumblrV1):
4329
    """Class to retrieve Jake Likes Onions comics."""
4330
    name = 'jake'
4331
    long_name = 'Jake Likes Onions'
@@ 730-745 (lines=16) @@
727
class NeDroid(GenericNavigableComic):
728
    """Class to retrieve NeDroid comics."""
729
    name = 'nedroid'
730
    long_name = 'NeDroid'
731
    url = 'http://nedroid.com'
732
    get_first_comic_link = get_div_navfirst_a
733
    get_navi_link = get_link_rel_next
734
    get_url_from_link = join_cls_url_to_href
735
736
    @classmethod
737
    def get_comic_info(cls, soup, link):
738
        """Get information about a particular comics."""
739
        short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url)
740
        short_url = cls.get_url_from_link(soup.find('link', rel='shortlink'))
741
        num = int(short_url_re.match(short_url).groups()[0])
742
        imgs = soup.find('div', id='comic').find_all('img')
743
        assert len(imgs) == 1
744
        title = imgs[0]['alt']
745
        title2 = imgs[0]['title']
746
        return {
747
            'short_url': short_url,
748
            'title': title,