Aterin
Aterin

Reputation: 587

Android searching a website for information

I'm trying to search a website for information (i.e. lets say I make an application for cinemas, the user inputs the name of the film and the cinema he wants and the application prints the times).

So in the background the application would go to the cinemas webpage, use the webpages search engine, parse the page and print a list of times.

I honestly don't know where to start so any help or tips would be most welcome.

Thank you in advance, Aterin

Upvotes: 2

Views: 83

Answers (2)

Aterin
Aterin

Reputation: 587

After much thought I found a way of doing this, I need to use a GET with the url and fill in the url based on the input of the user.

For example on the website http://www.overclockers.co.uk/ it would be: String url = "http://www.overclockers.co.uk/search_results.php?keywords=" + keyword + "&cat=" + cat; and then filter the resulting HTML based on the websites CSS (in this case they have a tag for listing products, so all I need to do is search for the alt = keyword and then do another GET with the corresponding href.

There is however a serious problem with this method, if the website is altered then all this goes down the sink hole. That said, I can't think of any other solution.

Upvotes: 1

shyamal
shyamal

Reputation: 826

You would need to first locate a suitable API to serve your data and then parse the data within your application to display it as you deem fit.

Some info on Movies API

Upvotes: 0

Related Questions