YouTube API v3 apiclient.errors.HttpError “No filter selected.” - where do I select a filter?

后端 未结 2 450
悲哀的现实
悲哀的现实 2021-01-02 23:30

My first attempt at setting up the Google apiclient for YouTube and by following the docs I made this as a test (didn\'t find a specific example for the YouTube

相关标签:
2条回答
  • 2021-01-02 23:45

    Following @pypat's suggestion, I changed the attributes for my list() method

    videos = service.videos()
    request = videos.list(part = 'id', id = '7lCDEYXw3mM')
    response = request.execute()
    

    With both part and id being required to produce a result.

    In order to get the full list or properties for a given video, the attribute part has to include a list of property groups

    request = videos.list(part = 'id, snippet, contentDetails, statistics, status, topicDetails',
                          id = '7lCDEYXw3mM')
    
    0 讨论(0)
  • 2021-01-03 00:01

    You need at least one selector to list. 'id' is one of them. You can always check YouTube API Samples project for reference. Here's a Python list usage in one of examples.

    0 讨论(0)
提交回复
热议问题