Create YQL for sites which do not have an API
-
27-09-2019 - |
Question
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 scrapping to get data from the site and return it to YQL. Is this possible and is any of the Open Tables similar in nature?
Solution
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 :)