Code Duplication    Length = 17-18 lines in 2 locations

comics.py 2 locations

@@ 1820-1837 (lines=18) @@
1817
            'img': [i['src'] for i in imgs],
1818
            'title': title,
1819
            'author': author,
1820
        }
1821
1822
1823
class BigFootJustice(GenericNavigableComic):
1824
    """Class to retrieve Big Foot Justice comics."""
1825
    # Also on http://tapastic.com/series/bigfoot-justice
1826
    name = 'bigfoot'
1827
    long_name = 'Big Foot Justice'
1828
    url = 'http://bigfootjustice.com'
1829
    get_first_comic_link = get_a_navi_navifirst
1830
    get_navi_link = get_a_navi_comicnavnext_navinext
1831
1832
    @classmethod
1833
    def get_comic_info(cls, soup, link):
1834
        """Get information about a particular comics."""
1835
        imgs = soup.find('div', id='comic').find_all('img')
1836
        assert all(i['title'] == i['alt'] for i in imgs)
1837
        title = ' '.join(i['title'] for i in imgs)
1838
        return {
1839
            'img': [i['src'] for i in imgs],
1840
            'title': title,
@@ 2825-2841 (lines=17) @@
2822
        """Get information about a particular comics."""
2823
        title = soup.find('h2', class_='post-title').string
2824
        date_str = soup.find("span", class_="post-date").string
2825
        day = string_to_date(date_str, "%B %d, %Y")
2826
        imgs = soup.find('div', id='comic').find_all('img')
2827
        return {
2828
            'title': title,
2829
            'img': [i['src'] for i in imgs],
2830
            'month': day.month,
2831
            'year': day.year,
2832
            'day': day.day,
2833
        }
2834
2835
2836
class BuniComic(GenericNavigableComic):
2837
    """Class to retrieve Buni Comics."""
2838
    name = 'buni'
2839
    long_name = 'BuniComics'
2840
    url = 'http://www.bunicomic.com'
2841
    get_first_comic_link = get_a_comicnavbase_comicnavfirst
2842
    get_navi_link = get_link_rel_next
2843
2844
    @classmethod