2012-05-02 79 views
0

我使用YQL從answers.yahoo.com中提取數據,使用子句:「select * from answers.getbycategory where category_id = 396545299」。你可以試試http://developer.yahoo.com/yql/console/爲什麼使用YQL提取數據的結果不完整?

這裏396545299意味着catagory_id是「書&作者」,你可以看到原來的數據http://answers.yahoo.com/dir/index;_ylt=Aptj80jBf2NtgwbZw_f_g5Kf5HNG;_ylv=3?sid=396545299&link=open#yan-questions

我使用YQL是不完整的,爲什麼找到的數據?

謝謝!

回答

0

立即嘗試此操作似乎正常工作。它可能是一個臨時錯誤,或者YQL和Yahoo Answers之間的某種速率限制或阻塞。通常您可以查看diagnostics返回數據以獲取更多線索。

例如此查詢:

select * from answers.getbycategory where category_id=396545299

結果在該數據返回:

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... 
相關問題