Results 1 to 20 of 20
- 05-31-2011, 01:42 PM #1
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
Not sure how to name this title so i'll just use this, HELP!
I am working on a project at the moment that has to show all the manga ( japanese strips ) from a webpage in a list in the application and when you select one of the manga it downloads it from the webpage in a folder and the application works as a reader as well so you can read the strips in the application. So i need something to get the information between the tags in the source of the webpage in my application and i need to find a way to download the images to my folder.
The webpage has no API
The images have random names
-Arnoud
- 05-31-2011, 01:49 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
Google HttpURLConnection.
- 05-31-2011, 02:32 PM #3
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
But how can i use this? I don't see any methods that i can use to get to the HTML tags
- 05-31-2011, 07:45 PM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
That is to get the actual page data. Google for "Java Parse HTML".
That (HttpURLConnection) is also, of course, what you will use to retreive the images from the img tag links.
- 05-31-2011, 07:49 PM #5
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
Well i tried that and i came across Jericho and Jsoup and some others but i can't find what is it that i need to do to get the information from the site because most things are talking about connecting to the ftp or parsing a document but i don't have information to connect and we can't use an downloaded document because i want the program to be up-tp-date when you start it up
- 05-31-2011, 07:51 PM #6
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
Use HttpURLConnection to connect then one of those pakages to parse the document you receive from the connection. I did say you use that to retrieve a document, did I not?
- 05-31-2011, 08:04 PM #7
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
Well you said i had to use that class but i could't find anything usefull in the API but maybe the thing with the packages works so i'll try that out :)
- 05-31-2011, 08:17 PM #8
Look at the javax.swing.text packages. It has classes for parsing HTML
- 05-31-2011, 08:56 PM #9
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
- 05-31-2011, 11:10 PM #10
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
I didn't see the getInputStream method in the API( HttpURLConnection (Java 2 Platform SE v1.4.2) ) :| but thanks i'll see how far i can come with these hints :) will post a reply later if i get stuck again or if this solved it :)
- 06-10-2011, 10:11 AM #11
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
I managed to get the html source in my console but i still can't download the image ?
Any hints on how to download the image?
- 06-10-2011, 10:36 AM #12
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
mmk found out how to show the image but still not how to save the image to a local folder :|
- 06-10-2011, 12:12 PM #13
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
I'm sorry, but find another hobby, you are not cut out for this one.
- 06-10-2011, 12:34 PM #14
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
So...you've managed to get hold of the image from the stream, and display it (in Swing?), but you can't figure out how to use that self-same stream to save it to a file?
- 06-10-2011, 01:35 PM #15
Look at the ImageIO class. It has methods for writing images to disk.found out how to show the image but still not how to save the image
- 06-10-2011, 02:20 PM #16
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
@Tolls : Yes that's right :|
@Norm : Thanks i'll try it out :)
- 06-10-2011, 04:00 PM #17
Member
- Join Date
- Apr 2011
- Posts
- 69
- Rep Power
- 0
- 06-10-2011, 05:56 PM #18
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
- 06-10-2011, 06:11 PM #19
Member
- Join Date
- May 2011
- Posts
- 9
- Rep Power
- 0
- 06-10-2011, 07:58 PM #20
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
Similar Threads
-
Title not displayer
By weezy2894 in forum Java AppletsReplies: 13Last Post: 04-18-2011, 04:12 AM -
How to rename GUI Title
By rjagan in forum New To JavaReplies: 2Last Post: 02-24-2011, 09:51 AM -
Change the title
By AndrewSD in forum NetBeansReplies: 1Last Post: 01-11-2011, 03:23 AM -
set * at tab title
By keffie91 in forum Advanced JavaReplies: 7Last Post: 10-06-2008, 07:21 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks