Jump to content

Java Help

I'm looking for a java library that can read info from an open browser on your pc and get info from open pages.

This is for a Discord rich presence app that'll scan for a certain page, then grab info from said page (link, title, tags, etc) and use said info for the rich presence status, details and image text.

So far, the best I've got is using HtmlUnit with manual link entry via JInputPane , but I'm looking for a way to automatically detect when you're on a page.

 

Thanks in advance for any help.

Link to comment
Share on other sites

Link to post
Share on other sites

HTMLUnit is a real pain.  It lacks a lot of the flexibility that normal web browsers have toward html, css, & js errors.

 

Fyi the term for these is "headless browsers"

 

I haven't had a chance to try it yet, but from what I hear PhantomJS is suppose to be really good.  It is javascript though, so I don't know if that'll work for what you need, but it's built on NodeJS, which uses Chrome's javascript engine.

 

Disclosure:  Not an expert on these, but I needed to do some webscraping a few months ago to create a "diy api". 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×