Python 2.7 搜索时未返回youtube api v3下一页标记

Python 2.7 搜索时未返回youtube api v3下一页标记,python-2.7,youtube-data-api,Python 2.7,Youtube Data Api,我正在尝试获取没有关联播放列表的youtube频道的视频ID列表。它包含134个视频,因此我试图使用下一页标记,正如在这个论坛的相关帖子中所解释的,但是,在我的搜索结果中,我没有得到下一页标记。这方面的python代码如下所示 from apiclient.discovery import build import json DEVELOPER_KEY = "myserverkey set in google console" YOUTUBE_API_SERVICE_NAME = "youtu

我正在尝试获取没有关联播放列表的youtube频道的视频ID列表。它包含134个视频,因此我试图使用下一页标记,正如在这个论坛的相关帖子中所解释的,但是,在我的搜索结果中,我没有得到下一页标记。这方面的python代码如下所示

from apiclient.discovery import build
import json

DEVELOPER_KEY = "myserverkey set in google console"
YOUTUBE_API_SERVICE_NAME = "youtube"
YOUTUBE_API_VERSION = "v3"

youtube = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION, developerKey=DEVELOPER_KEY)

#search_response = youtube.search().list(part="id",type="video",fields="items/id", order ="viewCount", maxResults= 50).execute()
search_response = youtube.search().list(
    channelId="UCgxzjK6GuOHVKR_08TT4hJQ",
    part="id",
    type="video",
    fields="items/id",
    order ="viewCount",
    maxResults=50
).execute()

videos = []
ytnextpagetoken = search_response.get("nextPageToken")

for search_result in search_response.get("items", []):
    videos.append("%s" % (search_result["id"]["videoId"]))

print(len(videos))
print(ytnextpagetoken)
基本上,我想迭代下一个页面标记的值并得到一个列表,然后一旦我有了这些值,我就可以过滤掉我想看到的视频并将它们嵌入到我的页面中

你能告诉我我做错了什么吗

我还尝试了channel.list,但它不返回播放列表

问候,, 阿琼