Since all the links have a class in common (class=”blue”), you can select all the web elements using this code, and then get the “href” attribute values:
elements = driver.find_elements_by_class_name('blue');
urls = [elements.get_attribute('href') for elements in elements]
I recommend this site if you want to learn more about Selenium Python : Learn to Locate Elements using Selenium Python with Examples
solved How do i get a list of all the urls from a website with python? [closed]