将YouTube DATA API的“ for”语句转换为“ while”语句

时间:2018-08-30 20:09:24

标签: python python-3.x youtube-data-api

这是我要问的部分:

    my_search_response = youtube.videos().list(parameters).execute()
    for result in my_search_response.get("items", []):
        if result['kind'] == "youtube#video":

结果遍历响应。我想把它变成一个while循环,但不确定如何?

我想要这样的东西:

    my_search_response = youtube.videos().list(parameters).execute()
    while result in my_search_response.get("items", []) != null:
        if result['kind'] == "youtube#video":

请让我知道谢谢

0 个答案:

没有答案