hellorahulk's picture
Create utils.py
9b9bd70
raw
history blame contribute delete
501 Bytes
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)