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)