问题
I'm creating an Android app which must do some web surfing in the background in order to provide a service to the user.
The site I must connect to has no API, it only provides standard HTTP access, with extensive cookie usage but (luckily for me) not much Javascript code.
I wonder if there is a library which behaves like python mechanize for Android, or if it's possible to use mechanize itself in the Android app.
回答1:
I'm not 100% sure it'll work in Android, but being Java-based, HtmlUnit is probably worth a look.
回答2:
Mechanize has been ported to Java, and does run in Android:
http://gistlabs.com/software/mechanize-for-java/
来源:https://stackoverflow.com/questions/9773655/is-there-a-tool-like-mechanize-for-android