If I wanted to take data from a web page using Java, where would I start?

Since Google started to give a very nice cinematic list layout , I would like to make an Android application that the user could get from this and display it for the area they entered.

I am not asking how to make the application, but using Java, how could I dynamically receive information from this web page? Can I parse it as XML? It seems a bit complicated.

+3
source share
2 answers

Answering the question "title" literally, see my answer to this question, how to capture raw HTML code using web url ... Android Dev: how to extract data from the Internet and use data in your application?

I do this and use a third-party HtmlCleaner class that returns XML that can be searched using XPATH.

However, as already mentioned, there may be better ways to do what you want, and CommonsWare's comment in particular is too true. This painful and slightest change in html may completely abandon your analysis code and require you to rewrite it.

+1
source

I did a quick Google search and couldn't find the Google API for movie listings, although you could see if they expanded them in the Google Base API.

API Query Language. API- showtimes, Java. YQL, :

select * from movies.showtimes

. :

select * from movies.showtimes where location='myzip' and name='one of the movies'

select * from movies.showtimes where location='myzip' and name in whatever

, , API: http://developer.yahoo.com/yql/console/?env=http://datatables.org/alltables.env#h=desc%20movies.showtimes

, Java- ( LAMP .NET), , YQL API - RESTful API, API , XML.

, , !

0

Source: https://habr.com/ru/post/1782214/


All Articles