Answer the question
In order to leave comments, you need to log in
How to get a browser rendered relative link in selenium?
Greetings.
Often relative links appear on the page, like this:
If you just parse such a tag through Selenium, and then glue it with the domain:<a href="Ford/Mustang"></a>
url = 'https://site.com/Car/Ford'
tag_a = 'Ford/Mustang'
new_url = urlparse(url).netloc + '/' + tag_a
https://site.com/Ford/Mustang
https://site.com/Car/Ford/Ford-Mustang
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question