Code Duplication    Length = 18-19 lines in 2 locations

gitfollow/gitfollow.py 2 locations

@@ 80-98 (lines=19) @@
77
    :type page_number:int
78
    :return: github star url as string
79
    '''
80
    return "https://github.com/"+Name+"?page="+str(page_number)+"&tab=stars"
81
def repo_extract(input_string,username):
82
    '''
83
    This function extract repo from raw_html
84
    :param input_string: raw input html
85
    :param follower_name: follower_name
86
    :type input_string:str
87
    :type follower_name:str
88
    :return: repo_list as list
89
    '''
90
    user_list=[]
91
    index=0
92
    shift=len(username)+1
93
    while(index!=-1):
94
        index=input_string.find('src="/'+username,index+shift,len(input_string))
95
        length=input_string[index:].find('graphs/')
96
        star_repo=input_string[index+5:index+length]
97
        if star_repo.find("<svg")==-1 and len(star_repo)!=0:
98
            user_list.append(star_repo)
99
    return user_list
100
def star_extract(input_string):
101
    '''
@@ 62-79 (lines=18) @@
59
    '''
60
    return "https://github.com/"+Name+"?page="+str(page_number)+"&tab=repositories"
61
def url_maker_follower(Name,page_number):
62
    '''
63
    This function return github follower page url
64
    :param Name: username
65
    :param page_number: page number of follower page
66
    :type Name:str
67
    :type page_number:int
68
    :return: github follower url as string
69
    '''
70
    return "https://github.com/" + Name + "?page=" + str(page_number) + "&tab=followers"
71
def url_maker_star(Name,page_number):
72
    '''
73
    This function return github stars page url
74
    :param Name: username
75
    :param page_number: page number of stars
76
    :type Name :str
77
    :type page_number:int
78
    :return: github star url as string
79
    '''
80
    return "https://github.com/"+Name+"?page="+str(page_number)+"&tab=stars"
81
def repo_extract(input_string,username):
82
    '''