0

I use YQL to extract data from answers.yahoo.com by using the clause:"select * from answers.getbycategory where category_id=396545299". You can try it at http://developer.yahoo.com/yql/console/.

Here 396545299 means the catagory_id is "Books & Authors" and you can see the original data in http://answers.yahoo.com/dir/index;_ylt=Aptj80jBf2NtgwbZw_f_g5Kf5HNG;_ylv=3?sid=396545299&link=open#yan-questions

I found the data by using a YQL is incomplete, why?

thanks!

xunzhang
  • 2,838
  • 6
  • 27
  • 44

1 Answers1

0

Trying this right now it seems to work correctly. It may have been either a temporary error, or some sort of rate limiting or blocking between YQL and Yahoo Answers. Usually you can look in the diagnostics return data for further clues.

For example this query:

select * from answers.getbycategory where category_id=396545299

results in this data returned:

cbfunc({
 "query": {
  "count": 10,
  "created": "2012-06-20T01:02:27Z",
  "lang": "en-US",
  "diagnostics": {
   "publiclyCallable": "true",
   "url": {
    "execution-start-time": "22",
    "execution-stop-time": "779",
    "execution-time": "757",
    "proxy": "DEFAULT",
    "content": "http://answers.yahooapis.com/AnswersService/V1/getByCategory?category_id=396545299&start=0&results=10"
   },
   "user-time": "780",
   "service-time": "757",
   "build-version": "28117"
  },
  "results": {
   "Question": [
    {
     "id": "20120619180104AAhkAbT",
     "type": "Open",
     "Subject": "Cool names for Mage In novel?",
     "Content": "Ok, I'm writing a book about a boy that secretly does magic, but can't tell anyone because everybody disapproves, it's considered a sin to do magic to the people in the kingdom, and the king actually beheads people who do it. But I can't think of a good name for the Mage.\n",
     "Date": "2012-06-19 18:01:04",
     "Timestamp": "1340154064",
     "Link": "http://answers.yahoo.com/question/?qid=20120619180104AAhkAbT",
     "Category": {
      "id": "396545299",
      "content": "Books & Authors"
     },
     "UserId": "zpgtqzI6aa",
     "UserNick": null,
     "UserPhotoURL": null,
     "NumAnswers": "0",
     "NumComments": "0",
     "ChosenAnswer": null,
     "ChosenAnswererId": null,
     "ChosenAnswererNick": null,
     "ChosenAnswerTimestamp": null,
     "ChosenAnswerAwardTimestamp": null
    },
   ...etc...
BrianC
  • 10,591
  • 2
  • 30
  • 50