processingFailure error (400) while retrieving CommentThreads list

前端 未结 3 1082
孤城傲影
孤城傲影 2020-12-07 05:11

I a trying to retrieve all the comments of a video via Python iteration/paging. I am logged correctly with a developer key

import googleapiclient.discovery          


        
3条回答
  •  天涯浪人
    2020-12-07 05:54

    According to Google's Python Client Library sample code and to Google's Youtube API sample code, you should have been coding your pagination loop as shown below:

    request = yt.commentThreads().list(...)
    while request:
        response = request.execute()
        # your processing code goes here ...
        request = yt.commentThreads().list_next(request, response)
    

提交回复
热议问题