• Post Reply Bookmark Topic Watch Topic
  • New Topic

why i am i getting this error?  RSS feed

 
Victor Ade
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm Trying to parse Url with jsoup



but I get this error:




How can i  solve it?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Victor Ade
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote: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.


I figured out what was missing in my code thanks to Jesper de jong.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!