Selenium: Find any link related to a specific website : <p>I was wondering if the 'find link' function in selenium can choose a link which is not specifically a partial or exact string match but 'a branch to a main website'.</p>

<p>For example, say I wanted to find "cats.com" I type into the google "dogs are the best". And selenium will click on the first link whether it be:</p>

<p>'<a href="https://www.cats.com/dogs1" rel="nofollow noreferrer">https://www.cats.com/dogs1</a>'</p>

<p>or</p>

<p>'<a href="https://www.cats.com/page24" rel="nofollow noreferrer">https://www.cats.com/page24</a>'</p>

<p>becuse they are all located within the main website, cats.com
Is there such a thing? </p>
