提取YouTube频道社区供稿数据

发布于 2025-01-29 01:30:47 字数 411 浏览 2 评论 0 原文

我正在尝试从分析渠道收集社区供稿数据。 我找不到使用YouTube数据API V3的方法。有没有办法提取此类数据?

我想提取的数据是在社区提要中。例如,这是一个来自。我想收集他的所有饲料。 “

I am trying to collect the community feed data from a channel for analytics.
I couldn't find a way using the YouTube Data API v3. Is there a way to extract such data?

The data I would like to extract is in the community feed. For instance, it's a community feed from Dr. Bharatendra Rai channel. I would like to collect all his feed.
Dr. Bharatendra Rai community post

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与往事干杯 2025-02-05 01:30:47

再一次 youtube数据API v3 没有提供基本功能。

我建议您使用我的 youtube操作api ,确实是通过请求 https://yt.lemnoslife.com/channels?part=Community&; amp; amp; amp; ad = channel_id ,视频,没有答案的民意调查,喜欢计数,评论计数,日期等)。

请注意,我的API无法启用调查答案,因为它需要与YouTube帐户连接。此外,目前我的API也不支持为给定的社区帖子检索评论。

请注意,我的api的分页我的API作品是YouTube数据之一API V3。

频道ID

{
    "kind": "youtube#channelListResponse",
    "etag": "NotImplemented",
    "items": [
        {
            "kind": "youtube#channel",
            "etag": "NotImplemented",
            "id": "UCQxJsAlqmBPAbR_0syDi9mg",
            "community": [
                {
                    "id": "UgkxZ8SQN2CQpX022xUKBJNYCvY3VtGYMrt3",
                    "date": "3 weeks ago",
                    "contentText": [
                        {
                            "text": "Quick question, everyone: Who owns the products that you buy? If the answer is you, shouldn\u2019t you be able to repair what you rightfully own?"
                        }
                    ],
                    "likes": 8,
                    "comments": 1,
                    "videoId": "d4sYQ22Y00k",
                    "image": null,
                    "poll": null,
                    "edited": false
                },
                ...
            ],
            "nextPageToken": "4qmFsgKBARIYVUNReEpzQWxxbUJQQWJSXzBzeURpOW1nGkxFZ2xqYjIxdGRXNXBkSG00QVFDcUF4d0tHRkV3T1ZGbFJ6RktUVVZrUmxNd1VucGpSVzkzVVhjOVBTZ0s4Z1lFQ2dKS0FBJTNEJTNEmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg=="
        }
    ]
}

YouTube 确切地,您将获得包含

{
    "id": "UgwAKK9XbGapMEH_rNB4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "Here's to all ten thousand of you \ud83c\udf89\nThis is so much more than a phone \u2013 to Fairphone, to an entire industry, and to our community. It\u2019s a physical expression of everything we believe in and have worked for since we started in 2010. \nWe've got lots of interesting, challenging, exciting content in the works and will do our best to give all of you the video's you're looking for on this channel. \n\nCheers for tuning in! Now let's go add a couple more zero's to that sub count ;)"
        }
    ],
    "likes": 39,
    "comments": 4,
    "videoId": null,
    "image": {
        "thumbnails": [
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s288-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 288,
                "height": 288
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s400-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 400,
                "height": 400
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s512-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 512,
                "height": 512
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s600-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 600,
                "height": 600
            }
        ]
    },
    "poll": null,
    "edited": false
}
  • 带有图片的文字(
{
    "id": "UgxjystGgDuX45mgJLp4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "Super exclusive "
        },
        {
            "text": "#SNEAKPEEK",
            "url": "https:\/\/www.youtube.com\/hashtag\/sneakpeek"
        },
        {
            "text": ":  Here's our co-founder and product lead Miquel Ballester in what used to be our recording studio (we're mid-office-move). Notice the professional cardboard-movingbox-tripod :)\n\nAnyways, Miquel is talking to one of our favorite Youtubers for an upcoming project, that we couldn't be more excited about. \n\nBest guess in the comments wins a personal AMA with Miquel \ud83d\udca1\ud83d\udc47"
        }
    ],
    "likes": 31,
    "comments": 19,
    "videoId": null,
    "image": {
        "thumbnails": [
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s288-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 288,
                "height": 288
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s400-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 400,
                "height": 400
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s512-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 512,
                "height": 512
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s640-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 640,
                "height": 640
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s800-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 800,
                "height": 800
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s1024-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 1024,
                "height": 1024
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s1600-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 1600,
                "height": 1600
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s2048-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 2048,
                "height": 2048
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s2900-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 2900,
                "height": 2900
            }
        ]
    },
    "poll": null,
    "edited": false
}
{
    "id": "UgwSoAm2bGLaJM44UTZ4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "What type of videos should we focus on in 2021?"
        }
    ],
    "likes": 25,
    "comments": 7,
    "videoId": null,
    "image": null,
    "poll": {
        "choices": [
            {
                "text": "Tutorials, how to's, tips & tricks"
            },
            {
                "text": "Behind the scenes \/ making of"
            },
            {
                "text": "Documentary series about our industry"
            },
            {
                "text": "Explanation-Animation"
            },
            {
                "text": "Community content (Ambassadors, changemakers etc.)"
            }
        ],
        "totalVotes": 138
    },
    "edited": false
}
  • ) href =“ https://www.youtube.com/post/post/ugkxfeexijycyz157nuukfi25v_xqfw4_vui” rel =“ nofollow noreferrer”>
{
    "id": "UgkxFeexIJyCyz157nuukfI25v_xqFW4_VUi",
    "date": "4 months ago",
    "contentText": [
        {
            "text": "YouTube has a new Creator Liaison, "
        },
        {
            "text": "Rene Ritchie",
            "url": "https:\/\/www.youtube.com\/channel\/UCLBHPoY3NugnZYURxln3fKQ"
        },
        {
            "text": "! He\u2019s worked in product marketing and tech media, posted his first video in 2008 and, for the last two years, has been a full-time YouTuber growing his own channel. Now, he\u2019s here to advocate for creators inside YouTube, to help YouTube better understand and empathize with creators, and to help creators better understand YouTube and everything it has to offer. If you have Platform-level Creator feedback, reach out to Rene at @YouTubeLiaison on Twitter. If you have questions and individual support issues, reach out to @TeamYouTube on Twitter. Welcome, Rene!!"
        }
    ],
    "likes": 2,
    "comments": 510,
    "videoId": null,
    "image": null,
    "poll": null,
    "edited": false
}

One more time YouTube Data API v3 doesn't provide a basic feature.

I would suggest you to use my open-source YouTube operational API, indeed by requesting https://yt.lemnoslife.com/channels?part=community&id=CHANNEL_ID you would get a JSON with the channel community posts (texts, images, videos, polls without answers, likes count, comments count, date etc) you are looking for in item['community'].

Note that my API doesn't enable retrieving poll answers as it requires to be connected with a YouTube account. Furthermore currently retrieving comments for a given community post isn't supported too by my API.

Note that the pagination of my API works as the one of YouTube Data API v3.

Example of result with the YouTube channel id UCQxJsAlqmBPAbR_0syDi9mg:

{
    "kind": "youtube#channelListResponse",
    "etag": "NotImplemented",
    "items": [
        {
            "kind": "youtube#channel",
            "etag": "NotImplemented",
            "id": "UCQxJsAlqmBPAbR_0syDi9mg",
            "community": [
                {
                    "id": "UgkxZ8SQN2CQpX022xUKBJNYCvY3VtGYMrt3",
                    "date": "3 weeks ago",
                    "contentText": [
                        {
                            "text": "Quick question, everyone: Who owns the products that you buy? If the answer is you, shouldn\u2019t you be able to repair what you rightfully own?"
                        }
                    ],
                    "likes": 8,
                    "comments": 1,
                    "videoId": "d4sYQ22Y00k",
                    "image": null,
                    "poll": null,
                    "edited": false
                },
                ...
            ],
            "nextPageToken": "4qmFsgKBARIYVUNReEpzQWxxbUJQQWJSXzBzeURpOW1nGkxFZ2xqYjIxdGRXNXBkSG00QVFDcUF4d0tHRkV3T1ZGbFJ6RktUVVZrUmxNd1VucGpSVzkzVVhjOVBTZ0s4Z1lFQ2dKS0FBJTNEJTNEmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg=="
        }
    ]
}

More precisely you would obtain for a post containing:

{
    "id": "UgwAKK9XbGapMEH_rNB4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "Here's to all ten thousand of you \ud83c\udf89\nThis is so much more than a phone \u2013 to Fairphone, to an entire industry, and to our community. It\u2019s a physical expression of everything we believe in and have worked for since we started in 2010. \nWe've got lots of interesting, challenging, exciting content in the works and will do our best to give all of you the video's you're looking for on this channel. \n\nCheers for tuning in! Now let's go add a couple more zero's to that sub count ;)"
        }
    ],
    "likes": 39,
    "comments": 4,
    "videoId": null,
    "image": {
        "thumbnails": [
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s288-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 288,
                "height": 288
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s400-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 400,
                "height": 400
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s512-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 512,
                "height": 512
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/6h9etF2mni8uU6rILsz5K3CGFdzepbPQfivxy0wBwtyheeIXanhMkRvAB4PNnJsQ9VUyXSlNvX_I=s600-c-fcrop64=1,151f0000d51effff-nd-v1",
                "width": 600,
                "height": 600
            }
        ]
    },
    "poll": null,
    "edited": false
}
{
    "id": "UgxjystGgDuX45mgJLp4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "Super exclusive "
        },
        {
            "text": "#SNEAKPEEK",
            "url": "https:\/\/www.youtube.com\/hashtag\/sneakpeek"
        },
        {
            "text": ":  Here's our co-founder and product lead Miquel Ballester in what used to be our recording studio (we're mid-office-move). Notice the professional cardboard-movingbox-tripod :)\n\nAnyways, Miquel is talking to one of our favorite Youtubers for an upcoming project, that we couldn't be more excited about. \n\nBest guess in the comments wins a personal AMA with Miquel \ud83d\udca1\ud83d\udc47"
        }
    ],
    "likes": 31,
    "comments": 19,
    "videoId": null,
    "image": {
        "thumbnails": [
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s288-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 288,
                "height": 288
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s400-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 400,
                "height": 400
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s512-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 512,
                "height": 512
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s640-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 640,
                "height": 640
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s800-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 800,
                "height": 800
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s1024-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 1024,
                "height": 1024
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s1600-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 1600,
                "height": 1600
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s2048-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 2048,
                "height": 2048
            },
            {
                "url": "https:\/\/yt3.ggpht.com\/QJeFrnIXTmSqYdH7kr3xGx5S-4DoTFZrvL7XaOlZFnCXk173MviBp7Vaw1SxR_m3n6_ezYqA37W_yg=s2900-c-fcrop64=1,00001cdaffffe5d3-nd-v1",
                "width": 2900,
                "height": 2900
            }
        ]
    },
    "poll": null,
    "edited": false
}
{
    "id": "UgwSoAm2bGLaJM44UTZ4AaABCQ",
    "date": "1 year ago",
    "contentText": [
        {
            "text": "What type of videos should we focus on in 2021?"
        }
    ],
    "likes": 25,
    "comments": 7,
    "videoId": null,
    "image": null,
    "poll": {
        "choices": [
            {
                "text": "Tutorials, how to's, tips & tricks"
            },
            {
                "text": "Behind the scenes \/ making of"
            },
            {
                "text": "Documentary series about our industry"
            },
            {
                "text": "Explanation-Animation"
            },
            {
                "text": "Community content (Ambassadors, changemakers etc.)"
            }
        ],
        "totalVotes": 138
    },
    "edited": false
}
{
    "id": "UgkxFeexIJyCyz157nuukfI25v_xqFW4_VUi",
    "date": "4 months ago",
    "contentText": [
        {
            "text": "YouTube has a new Creator Liaison, "
        },
        {
            "text": "Rene Ritchie",
            "url": "https:\/\/www.youtube.com\/channel\/UCLBHPoY3NugnZYURxln3fKQ"
        },
        {
            "text": "! He\u2019s worked in product marketing and tech media, posted his first video in 2008 and, for the last two years, has been a full-time YouTuber growing his own channel. Now, he\u2019s here to advocate for creators inside YouTube, to help YouTube better understand and empathize with creators, and to help creators better understand YouTube and everything it has to offer. If you have Platform-level Creator feedback, reach out to Rene at @YouTubeLiaison on Twitter. If you have questions and individual support issues, reach out to @TeamYouTube on Twitter. Welcome, Rene!!"
        }
    ],
    "likes": 2,
    "comments": 510,
    "videoId": null,
    "image": null,
    "poll": null,
    "edited": false
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文