That's because you are parsing the
string: <a href="http://www.nairaland.com/?" class="g" rel="nofollow">₦airaland Forum</a>
as if it's an URL, but it's not. You have to get the value of the href tag out of the string, that's the URL. Not the complete HTML a-element.