• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Using Java to Login to an HTTPS Website

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Parth Sagdeo:
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


FYI,
Yahoo exposes mail and a few other of their services via Web services, but sadly for you, they have not yet exposed services to access user portfolios. If they would have done that, then it would have been very easy for you.
I am not sure, how easy it will be to access your protfolios simulating browser requests, as this is the first thing yahoo would have considered to secure the web access. But, yeah thats just a thought.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the following classes

com.jscape.inet.https.Https
com.jscape.inet.http.HttpSession

The HttpSession class has some automatic session/cookie handling built in for easy navigation and supports HTTP/S

http://www.jscape.com/secureinetfactory/
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Parth Sagdeo:
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



Did you ever complete this task? If not, then we should start a sf project dedicated to authenticating to all the major sites out there...
[ April 10, 2008: Message edited by: Lavern Matthew ]
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic