开发者

Create YQL for sites which do not have an API

开发者 https://www.devze.com 2023-01-23 01:03 出处:网络
I plan to create a YQL open table for a site which does not have an XML/JSON based API. I plan to use HTML scrap开发者_运维技巧ping to get data from the site and return it to YQL. Is this possible and

I plan to create a YQL open table for a site which does not have an XML/JSON based API. I plan to use HTML scrap开发者_运维技巧ping to get data from the site and return it to YQL. Is this possible and is any of the Open Tables similar in nature?


Question 1: Yes, it is possible

If doing this you will probably use the <execute> part of your own datatable quite a bit. In there your can write javascript that processes the data on server side, before it is sent back to your client.

I cannot explain better how to use server side javascript with YQL than the documentation can and also it depends a lot on the specifics of your use case. Therefore let me point you to the relevant part of the documentation: YQL Documentation - execute element

Question 2: Examples

One example that you might find useful is this one, also from the docs. https://developer.yahoo.com/yql/guide/yql-execute-examples.html#yql-execute-example-css-selector

Additionally tables like this should be interesting for you: http://github.com/spullara/yql-tables/blob/master/search/search.imageweb.xml

Let me know how your experiment went, once it is done :)

0

精彩评论

暂无评论...
验证码 换一张
取 消