Code Duplication    Length = 16-17 lines in 2 locations

comics.py 2 locations

@@ 4312-4328 (lines=17) @@
4309
    name = 'circumsolar-tumblr'
4310
    long_name = 'Victims Of Circumsolar (from Tumblr)'
4311
    url = 'https://victimsofcomics.tumblr.com'
4312
4313
4314
class RockPaperCynicTumblr(GenericTumblrV1):
4315
    """Class to retrieve RockPaperCynic comics."""
4316
    # Also on http://www.rockpapercynic.com
4317
    # Also on https://tapastic.com/series/rockpapercynic
4318
    name = 'rpc-tumblr'
4319
    long_name = 'Rock Paper Cynic (from Tumblr)'
4320
    url = 'http://rockpapercynic.tumblr.com'
4321
4322
4323
class DeadlyPanelTumblr(GenericTumblrV1):
4324
    """Class to retrieve Deadly Panel comics."""
4325
    # Also on http://www.deadlypanel.com
4326
    # Also on https://tapastic.com/series/deadlypanel
4327
    name = 'deadly-tumblr'
4328
    long_name = 'Deadly Panel (from Tumblr)'
4329
    url = 'https://deadlypanel.tumblr.com'
4330
4331
@@ 730-745 (lines=16) @@
727
    long_name = 'NeDroid'
728
    url = 'http://nedroid.com'
729
    get_first_comic_link = get_div_navfirst_a
730
    get_navi_link = get_link_rel_next
731
    get_url_from_link = join_cls_url_to_href
732
733
    @classmethod
734
    def get_comic_info(cls, soup, link):
735
        """Get information about a particular comics."""
736
        short_url_re = re.compile('^%s/\\?p=([0-9]*)' % cls.url)
737
        short_url = cls.get_url_from_link(soup.find('link', rel='shortlink'))
738
        num = int(short_url_re.match(short_url).groups()[0])
739
        imgs = soup.find('div', id='comic').find_all('img')
740
        assert len(imgs) == 1
741
        title = imgs[0]['alt']
742
        title2 = imgs[0]['title']
743
        return {
744
            'short_url': short_url,
745
            'title': title,
746
            'title2': title2,
747
            'img': [urljoin_wrapper(cls.url, i['src']) for i in imgs],
748
            'num': num,