• Post Reply Bookmark Topic Watch Topic
  • New Topic

writing a bot for some internet site

 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,

I want to create some bot for a site. I dun know any idea how to do it. I am confident that i'll be able to parse the html of the website to retrive the desire data but i am confuse how to login to the site from my java program.

the site use hidden fields, ssl and other secruity things to log on and in return it sends the cookies.

1: how can i make my custom HTTP header to be sent to, for login
2: how wud i assure to maintain my session from my java program
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use a HttpClient library to talk to the site.
Parse the response.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about managing cookies?

the login page redirect the request to "HTTPS" protocol, how to handle that ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpClient can handle cookies.

To handle redirects automatically you may need to set some flag; then your code doesn't need to worry about that. Check the documentation for "automatically follow redirects" or something similar.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks . I'll start trying on it in a while. i hope i wun get stuck somewhere.
 
Denise Willington
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im not to sure on how to creat bots.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!