• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Java to Login to an HTTPS Website (Yahoo)  RSS feed

 
Parth Sagdeo
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm interested in making a program to log into yahoo.com and check my various stock portfolios. I already know how to access static web pages in Java, but this poses a unique challenge because it requires cookies and it uses SSH authentication (the https protocol). Does anyone have any tips on how I can get this to work, or know any helpful resources? I believe YPOPs (YPOPs does something similar (log in to Yahoo programatically), but their forums are pretty much dead. My biggest question right now is how I might accept cookies in Java so I can move around yahoo in a logged in state. Any ideas?

Thanks,
Parth
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i heard something about watij / httpunit...but these are basically used for functioanl web testing
 
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
Are you using the networking classes in the standard Java API? They work but are not so sophisticated and doing things like HTTPS and cookies can be difficult or isn't even possible with the standard API classes.

Have a look at Jakarta Commons HttpClient, which is a library that makes working with HTTP and HTTPS a lot easier. This library can also handle cookies for you.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not post the same question to multiple forums. Now you have answers here and here, and peoples time and effort to help you is being duplicated and thus wasted: CarefullyChooseOneForum
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!