Results 1 to 2 of 2
Thread: Get text from website.
- 05-05-2010, 04:27 AM #1
Member
- Join Date
- Jul 2009
- Posts
- 46
- Rep Power
- 0
Get text from website.
I'm trying to get the text from a website. This does give me information from the website. But, it returns all of the HTML. I am looking for a way just to get the plain text off of the website. Anyone know of a way to do this?
Java Code:BufferedReader in = null; String getid = null; try { URL yahoo; yahoo = new URL("http://www.yahoo.com"); in = new BufferedReader(new InputStreamReader(yahoo.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } } in.close(); } catch (IOException ex) { Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex); }
- 05-05-2010, 04:33 AM #2
Senior Member
- Join Date
- May 2010
- Posts
- 436
- Rep Power
- 4
But what else are you expecting to find on a website?
Are you looking to parse the HTML? If so, then perhaps your best bet is to Google for a decent Java HTML parser.I am looking for a way just to get the plain text off of the website. Anyone know of a way to do this?
Buena suerte.
Similar Threads
-
programming website?
By ragarwal in forum Forum LobbyReplies: 11Last Post: 12-21-2009, 12:37 PM -
migrate JSP website
By valhensing in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 12-14-2009, 03:34 PM -
Writing to a website
By Shawn in forum New To JavaReplies: 6Last Post: 03-20-2009, 12:32 PM -
WebSite Update!
By Xyle in forum Reviews / AdvertisingReplies: 1Last Post: 02-16-2009, 08:47 AM -
How to download website (Get all link in website)
By finalmem in forum Advanced JavaReplies: 0Last Post: 11-12-2008, 08:43 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks