您如何从其他网站接收数据,然后从网站显示某个字段? [关闭]

An example is like Trivago that searches other hotel websites then displays price, an image etc. Basically what I want to do is create a meta-search engine that will search another website(s), then display the price of the (hypothetically speaking) hotel room and display an image. Also I'd like if the code will allow the info (from the other website) to be continuously refreshed. Please HELP! I am struggling and if you can provide a sample code I can use, so that I just have to put in the website. If you can't it's okay, but I need somewhere to start!! Thanks!

Data aggregators generally work in one or more of these ways:

  • Custom parsers for each data source (obviously, we can't answer this, as it is code written specifically for each page structure; probably easiest to realistically implement)

  • Data mining and AI (Google has huge amount of researchers working on this, you can't replicate it)

  • Providing an API for data sources to push data (since having data in a well-known aggregator is good for them; they probably won't use your API unless you show them it is beneficial for them to add code to push to your aggregator)

  • Using an API data sources provide to pull their data (only if they provide such an API, and if they authorise you to use it)