r/javahelp • • Jul 02 '14

A Java Manga App

I want to make a java program. It has a search box to search mangas from different site. Then it will download the pages from the site.

It is an app like mangasearch you can find on android but use on a computer. The question is I don't know how to use java to search on manga websites and how to download the pages.

Thanks!

1 Upvotes

15 comments sorted by

View all comments

4

u/Blackduck606 Extreme Brewer Jul 03 '14

If you want HTML parsing, I've had a good experience with Jsoup. You can easily crawl webpages with it for content.

You should probably look into if the websites you want to access have APIs for them. If they don't, your best bet is probably to just search www.somerandomsite.com/?search=some+query and then use Jsoup to parse the results and then the Java standard lib can read content from websites. The problem you'll face constantly is that since you're hardcoding how navigate the website, the program will stop working correctly every time a website changes its layout.

1

u/[deleted] Jul 03 '14

Can I go into their database and collect the data from there even I don't have their API?

1

u/nret Jul 03 '14

Yes, if you can successfully scrap their website you can essentially rebuild their DB, but it would probably take your program longer than instant to get the job done (might even take days depending on how much is has to scrap)... Which will also need to be reran when they update mangos... Their webdevs would probably also notice the spike in traffic from your ip cause by your crawler, might be bad.

You'd be best off prompting the user for what they want, and using the sites search feature.