There is nothing wrong with the link you are returning.
Looking at your code, you retrieve the attribute href, which in the case of your example refers to the element:
<a class=gbmt href="/preferences?hl=en">Search settings</a>
(You can see this link, if you click on "Settings" at the bottom right, the list should appear with several links)
As you can see, the attribute hrefcontains only /preferences?hl=enthat just makes it a relative reference. The full URL will be the address of the page you are currently on + href. In this case:
http:
You just need to tweak your code to add an argument to your method if the URL is relative.
source
share