After much frustration I need some help getting a HTML parser for Android.
I basically need a parser which will log into a website and retrieve the main page, which heavily uses javascript and ajax to render data. From there I need to be able to access other pages which are linked with anchor tags. Again, emphasis on the Ajax and javascript on the page, all the data is created through these means.
EDIT: After some research it looks like I need a headless browser that is compatible with Android.
At first I tried with JSoup and it only retrieves the page without the javascript and ajax data being written in. Unless I'm understanding something wrong here, JSoup is not fitting in this situation.
I have also tried HtmlUnit, which works perfectly, but I am unable to get it up and running in android because of the known jar conflicts and the "not being able to convert to dalivik" error.
If anyone knows another suitable HTML parser, or can help me with either getting JSoup and ajax pages to play nice, or knows how to get HtmlUnit running on android, I would be forever in your debt.
I have already spent the majority of a week with JSoup and HtmlUnit, and basically have gone back to square one. Frustration has set in and I'm completely lost on what to do.
Again, I need a HTML parser, that will allow Ajax and Javascript to load before I can parse, and it needs to be android friendly!
Thank you!
You can try to intercept the individual Ajax communications. They are either get or post communication. And you can call them with JSoup one by one. It is feasible for a handful of Ajax call. In fact there are less data and can be more quicker to parse on Android this way.