File size: 501 Bytes
9b9bd70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

def get_priority_link(links: list):
    '''
    Function to return the highest priority website link idx with the type of website

    Args: List of links from google search
    Returns:
    Highest priority search result TAG and its index
    '''
    for i in range(len(links)):
        link = links[i]
        if link!=None:
            #We can add other websites here

            #For Craft
            if('https://craft.co/' in link and 'competitors' in link):
                return ("craft",i)