Solved

Open a URL, scan the page(look for certain words)

Posted on 2003-12-04
3
232 Views
Last Modified: 2010-04-17
Hi

In java, how can I open an URL eg. http://www.google.com , then read that page meaning
search for certain words..and if those words exist I would output a message.

SB

0
Comment
Question by:ScarletBlue
3 Comments
 
LVL 2

Accepted Solution

by:
override_y2k earned 20 total points
ID: 9876661
Do something like

String url = "http://yahoo.com

Then use javas openURL command to open it

........
    try {
    someutility.openURL(url);
    return;      
    }
........            

Also you will need to catch various exceptions.Then create a search tool that searches the page for a given word.

......
if(wordpresent = true) {
  System.out.println("Word is present");
}
....

Regards.

O2K
0
 

Author Comment

by:ScarletBlue
ID: 10319544
Hi CleanupPing
I have already accepted O2K's answer. It's written "Accepted Answer " in green. Please
confirm this.
thanx
scarlet
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
java constructor error 8 87
Fix45 challenge 15 86
nestparen challenge 4 56
topping1 challenge 7 51
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now