Creating a bot in java

I just want to create a Bot that can work (preferably) on a web server and just "clicks" on a web page object using java.
check out some tutorials that might help me.

+4
source share
3 answers

I think you can start with the Apache Droids project . They have a module for crawling web pages

+1
source

HtmlUnit is a programmable web browser (in Java). See http://htmlunit.sourceforge.net/gettingStarted.html .

+3
source

Since "click" is just a machine requesting a resource, you can do something simple:

clickURL = new BufferedReader(new InputStreamReader(new URL(URLOrFilename).openStream())); 

This will open the stream. I don’t know if you need to read anything at all (for example, BufferedReader.readLine() ), or if you can close the stream immediately, but it will be done. Wrap it in the main() method, and you're done.

You will need to import the appropriate Java I / O libraries.

0
source

All Articles