Code Duplication    Length = 16-17 lines in 2 locations

comics.py 2 locations

@@ 4312-4328 (lines=17) @@
4309
    name = 'ubertool-tumblr'
4310
    long_name = 'Ubertool (from Tumblr)'
4311
    url = 'https://ubertool.tumblr.com'
4312
    _categories = ('UBERTOOL', )
4313
4314
4315
class LittleLifeLinesTumblr(GenericTumblrV1):
4316
    """Class to retrieve Little Life Lines comics."""
4317
    # Also on http://www.littlelifelines.com
4318
    name = 'life-tumblr'
4319
    long_name = 'Little Life Lines (from Tumblr)'
4320
    url = 'https://little-life-lines.tumblr.com'
4321
4322
4323
class TheyCanTalk(GenericTumblrV1):
4324
    """Class to retrieve They Can Talk comics."""
4325
    name = 'theycantalk'
4326
    long_name = 'They Can Talk'
4327
    url = 'http://theycantalk.com'
4328
4329
4330
class Will5NeverCome(GenericTumblrV1):
4331
    """Class to retrieve Will 5:00 Never Come comics."""
@@ 730-745 (lines=16) @@
727
    name = 'nedroid'
728
    long_name = 'NeDroid'
729
    url = 'http://nedroid.com'
730
    get_first_comic_link = get_div_navfirst_a
731
    get_navi_link = get_link_rel_next
732
    get_url_from_link = join_cls_url_to_href
733
734
    @classmethod
735
    def get_comic_info(cls, soup, link):
736
        """Get information about a particular comics."""
737
        short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url)
738
        short_url = cls.get_url_from_link(soup.find('link', rel='shortlink'))
739
        num = int(short_url_re.match(short_url).groups()[0])
740
        imgs = soup.find('div', id='comic').find_all('img')
741
        assert len(imgs) == 1
742
        title = imgs[0]['alt']
743
        title2 = imgs[0]['title']
744
        return {
745
            'short_url': short_url,
746
            'title': title,
747
            'title2': title2,
748
            'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs],