Reputation: 159
i would like to know how implement a function in a web site that ask other site for result and then keep these results and compare it or display. For example, if a web site that offer products has not API for external application, how can i search in it without human activity but by automated system? In short the function that i would implement is a tiny search motor that is limited only on some web sites e not for entire the web. Do you have an idea? It's necessary study any single external web site and the method that every search page in it ask?
Thanks, best regards.
Upvotes: 0
Views: 170
Reputation: 78920
The term you're looking for is "screen-scraping." If a site does not have an API, your main option is to programmatically duplicate the same requests that a user's web browser would issue, then extract what you need from the HTML that comes back in the response. Because client-side cross-origin requests are restricted by most browsers, you would need to do this server-side.
Upvotes: 2
Reputation: 1579
You could pull the target site in a stream and parse out the desired information. It's an ugly way to do it, but with the information provided I'm not sure how else you could attempt it.
Upvotes: 0