如何从API获取有关Youtube视频章节的信息?

纳萨奈尔·特罗耶

最近,Youtube添加了将进度条中的视频分解为“章节”的功能。

https://support.google.com/youtube/answer/9884579?hl=zh-CN

目前,我能够从Youtube API获取有关视频的信息。但是,似乎没有关于视频章节的任何信息,而且我在有关章节的API文档中也没有找到任何内容。我是否缺少某些内容,还是根本无法获取章节数据?

毛里西奥·阿里亚斯·奥拉夫

据我所知,此类数据在视频说明中以纯文本格式显示。

因此,您可以使用以下示例:

本演示中使用的视频:YuGiOh中受到2500攻击的十大怪物

网址请求:

https://www.googleapis.com/youtube/v3/videos?part=snippet&id=NNgYId7b4j0&key=[YOUR_API_KEY]

响应:

{
    "kind": "youtube#videoListResponse",
    "etag": "YpVLmrSx1iP8hAJOnumaTBoKqqQ",
    "items": [
        {
            "kind": "youtube#video",
            "etag": "oIoJq5F3RHvBbtVohafaJ_1SThU",
            "id": "NNgYId7b4j0",
            "snippet": {
                "publishedAt": "2020-09-14T18:37:46Z",
                "channelId": "UC0roOaAn95Rtgoe078RkVXQ",
                "title": "Top 10 Monsters with 2500 Attack in YuGiOh",
                "description": "In this video we'll go over the best monsters that have 2500 attack, and attack threshold for a lot of boss monsters actually.\n\nCheck out my DnD channel @TheD&DLogs \n\n--The List--\nIntro: (0:00)\n10- Blue-Eyes Spirit Dragon: (0:00)\n9- Invoked Mechaba: (2:14)\n8- Number S39: Utopia the Lightning: (3:23)\n7- Earthbound Immortal Aslla Piscu: (4:35)\n6- Eldlich the golden Lord: (6:04)\n5- True King Lithosagym the Disaster: (7:34)\n4- Block Dragon: (8:54)\n3- Astrograph sorcerer: (10:25)\n2- Beatrice lady of the eternal: (12:36)\n1- Firewall Dragon: (14:37)\n- \n-----------------------------------------\n#yugioh #top10 \n\nDuels are all done on EDOpro, its completely free and updated all the time. If you want it, just look for the EDOpro discord and you'll find all you need to download it from there\n\nSome of the Video backgrounds in this video were made by \"Amitai Angor AA VFX\" https://www.youtube.com/dvdangor2011\n\n\nhttps://twitter.com/hirumared\nhttps://twitter.com/TheDuelLogs",
                "thumbnails": {
                    "default": {
                        "url": "https://i.ytimg.com/vi/NNgYId7b4j0/default.jpg",
                        "width": 120,
                        "height": 90
                    },
                    "medium": {
                        "url": "https://i.ytimg.com/vi/NNgYId7b4j0/mqdefault.jpg",
                        "width": 320,
                        "height": 180
                    },
                    "high": {
                        "url": "https://i.ytimg.com/vi/NNgYId7b4j0/hqdefault.jpg",
                        "width": 480,
                        "height": 360
                    },
                    "standard": {
                        "url": "https://i.ytimg.com/vi/NNgYId7b4j0/sddefault.jpg",
                        "width": 640,
                        "height": 480
                    },
                    "maxres": {
                        "url": "https://i.ytimg.com/vi/NNgYId7b4j0/maxresdefault.jpg",
                        "width": 1280,
                        "height": 720
                    }
                },
                "channelTitle": "TheDuelLogs",
                "tags": [
                    "yugioh",
                    "ygo",
                    "dev",
                    "pro",
                    "link",
                    "duels",
                    "auto-matic duels",
                    "online",
                    "current",
                    "ban",
                    "list",
                    "dueling",
                    "network",
                    "theduellogs",
                    "the",
                    "duel",
                    "logs",
                    "loggs",
                    "Yu",
                    "Gi",
                    "Oh!",
                    "YGOpro",
                    "gimmick",
                    "links",
                    "top ten",
                    "2020",
                    "edopro"
                ],
                "categoryId": "20",
                "liveBroadcastContent": "none",
                "localized": {
                    "title": "Top 10 Monsters with 2500 Attack in YuGiOh",
                    "description": "In this video we'll go over the best monsters that have 2500 attack, and attack threshold for a lot of boss monsters actually.\n\nCheck out my DnD channel @TheD&DLogs \n\n--The List--\nIntro: (0:00)\n10- Blue-Eyes Spirit Dragon: (0:00)\n9- Invoked Mechaba: (2:14)\n8- Number S39: Utopia the Lightning: (3:23)\n7- Earthbound Immortal Aslla Piscu: (4:35)\n6- Eldlich the golden Lord: (6:04)\n5- True King Lithosagym the Disaster: (7:34)\n4- Block Dragon: (8:54)\n3- Astrograph sorcerer: (10:25)\n2- Beatrice lady of the eternal: (12:36)\n1- Firewall Dragon: (14:37)\n- \n-----------------------------------------\n#yugioh #top10 \n\nDuels are all done on EDOpro, its completely free and updated all the time. If you want it, just look for the EDOpro discord and you'll find all you need to download it from there\n\nSome of the Video backgrounds in this video were made by \"Amitai Angor AA VFX\" https://www.youtube.com/dvdangor2011\n\n\nhttps://twitter.com/hirumared\nhttps://twitter.com/TheDuelLogs"
                },
                "defaultAudioLanguage": "en"
            }
        }
    ],
    "pageInfo": {
        "totalResults": 1,
        "resultsPerPage": 1
    }
}

得到答复:

response.items[0].snippet.description

结果:

"In this video we'll go over the best monsters that have 2500 attack, and attack threshold for a lot of boss monsters actually.

Check out my DnD channel @TheD&DLogs 

--The List--
Intro: (0:00)
10- Blue-Eyes Spirit Dragon: (0:00)
9- Invoked Mechaba: (2:14)
8- Number S39: Utopia the Lightning: (3:23)
7- Earthbound Immortal Aslla Piscu: (4:35)
6- Eldlich the golden Lord: (6:04)
5- True King Lithosagym the Disaster: (7:34)
4- Block Dragon: (8:54)
3- Astrograph sorcerer: (10:25)
2- Beatrice lady of the eternal: (12:36)
1- Firewall Dragon: (14:37)
- 
-----------------------------------------
#yugioh #top10 

Duels are all done on EDOpro, its completely free and updated all the time. If you want it, just look for the EDOpro discord and you'll find all you need to download it from there

Some of the Video backgrounds in this video were made by "Amitai Angor AA VFX" https://www.youtube.com/dvdangor2011


https://twitter.com/hirumared
https://twitter.com/TheDuelLogs"

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

使用YouTube API通过查询获取有关所有视频的观看次数的信息

来自分类Dev

如何通过API获取有关所有可用映像的信息以创建VM实例

来自分类Dev

如何在Slack API中获取有关单个IM的信息?

来自分类Dev

如何使用Facebook Graph API获取有关用户喜欢的组的信息

来自分类Dev

Python-如何获取有关SyntaxError的更多信息?

来自分类Dev

如何获取有关点击兴趣点的信息?

来自分类Dev

如何从windbg获取有关设备堆栈的信息

来自分类Dev

如何获取有关WebRTC PeerConnection的连接类型的信息?

来自分类Dev

如何获取有关当前GRUB /启动配置的信息?

来自分类Dev

Vue 3如何获取有关$ children的信息

来自分类Dev

Python-如何获取有关SyntaxError的更多信息?

来自分类Dev

如何获取有关当前GRUB /启动配置的信息?

来自分类Dev

如何获取有关套接字文件的更多信息?

来自分类Dev

如何从终端获取有关BIOS的信息?

来自分类Dev

如何获取有关点击兴趣点的信息?

来自分类Dev

如何获取有关DataGrid中验证错误的信息

来自分类Dev

如何获取有关此设备的更多信息?

来自分类Dev

如何获取有关“ sudo”失败的详细信息

来自分类Dev

如何获取有关SQL Server中表的信息?

来自分类Dev

如何获取有关异常错误的更多信息?

来自分类Dev

如何在MySQL中获取有关DATABASES的信息?

来自分类Dev

如何从坐标中获取有关位置或状态的信息

来自分类Dev

获取有关EventSource错误的信息

来自分类Dev

获取有关URL的路由信息

来自分类Dev

获取有关架构更改的信息

来自分类Dev

每周获取有关交易的信息

来自分类Dev

获取有关EventSource错误的信息

来自分类Dev

获取有关URL的路由信息

来自分类Dev

获取有关CPU的信息

Related 相关文章

  1. 1

    使用YouTube API通过查询获取有关所有视频的观看次数的信息

  2. 2

    如何通过API获取有关所有可用映像的信息以创建VM实例

  3. 3

    如何在Slack API中获取有关单个IM的信息?

  4. 4

    如何使用Facebook Graph API获取有关用户喜欢的组的信息

  5. 5

    Python-如何获取有关SyntaxError的更多信息?

  6. 6

    如何获取有关点击兴趣点的信息?

  7. 7

    如何从windbg获取有关设备堆栈的信息

  8. 8

    如何获取有关WebRTC PeerConnection的连接类型的信息?

  9. 9

    如何获取有关当前GRUB /启动配置的信息?

  10. 10

    Vue 3如何获取有关$ children的信息

  11. 11

    Python-如何获取有关SyntaxError的更多信息?

  12. 12

    如何获取有关当前GRUB /启动配置的信息?

  13. 13

    如何获取有关套接字文件的更多信息?

  14. 14

    如何从终端获取有关BIOS的信息?

  15. 15

    如何获取有关点击兴趣点的信息?

  16. 16

    如何获取有关DataGrid中验证错误的信息

  17. 17

    如何获取有关此设备的更多信息?

  18. 18

    如何获取有关“ sudo”失败的详细信息

  19. 19

    如何获取有关SQL Server中表的信息?

  20. 20

    如何获取有关异常错误的更多信息?

  21. 21

    如何在MySQL中获取有关DATABASES的信息?

  22. 22

    如何从坐标中获取有关位置或状态的信息

  23. 23

    获取有关EventSource错误的信息

  24. 24

    获取有关URL的路由信息

  25. 25

    获取有关架构更改的信息

  26. 26

    每周获取有关交易的信息

  27. 27

    获取有关EventSource错误的信息

  28. 28

    获取有关URL的路由信息

  29. 29

    获取有关CPU的信息

热门标签

归档