友達のチャンネルにアップロードされたリコンビデオを取得する方法は?

StackOverflow https://stackoverflow.com/questions/19855530

  •  29-07-2022
  •  | 
  •  

質問

理論的には、これは私が必要とするAPIです:

https://developers.google.com/youtube/2.0/developers_guide_protocol_subscriptions#Retrieving_new_subscription_videos

実際、クリックすると https://www.youtube.com/my_subscriptions 友達によってアップロードされた最近のビデオが表示されます(サブスクリプション)。

しかし、そのエンドポイント(alt = json)を呼び出します私はこれを手に入れます:

{
    "version": "1.0",
    "encoding": "UTF-8",
    "feed": {
        "xmlns": "http://www.w3.org/2005/Atom",
        "xmlns$openSearch": "http://a9.com/-/spec/opensearch/1.1/",
        "xmlns$gd": "http://schemas.google.com/g/2005",
        "gd$etag": "W/\"CEIMSHwyfSp7I2A9Wh5QGU0.\"",
        "id": {
            "$t": "tag:youtube.com,2008:user:ysWGKld9kilWfiqcfr1pfQ:newsubscriptionvideos"
        },
        "updated": {
            "$t": "2013-11-08T01:23:09.295-08:00"
        },
        "category": [
            {
                "scheme": "http://schemas.google.com/g/2005#kind",
                "term": "http://gdata.youtube.com/schemas/2007#video"
            }
        ],
        "title": {
            "$t": "New Subscription Videos for Mauro Vicentini"
        },
        "logo": {
            "$t": "http://www.gstatic.com/youtube/img/logo.png"
        },
        "link": [
            {
                "rel": "alternate",
                "type": "text/html",
                "href": "https://www.youtube.com/subscription_center"
            },
            {
                "rel": "http://schemas.google.com/g/2005#feed",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos"
            },
            {
                "rel": "http://schemas.google.com/g/2005#batch",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos/batch"
            },
            {
                "rel": "self",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos?alt=json&start-index=1&max-results=25"
            },
            {
                "rel": "service",
                "type": "application/atomsvc+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos?alt=atom-service"
            }
        ],
        "author": [
            {
                "name": {
                    "$t": "YouTube"
                },
                "uri": {
                    "$t": "http://www.youtube.com/"
                }
            }
        ],
        "generator": {
            "$t": "YouTube data API",
            "version": "2.1",
            "uri": "http://gdata.youtube.com"
        },
        "openSearch$totalResults": {
            "$t": 0
        },
        "openSearch$startIndex": {
            "$t": 1
        },
        "openSearch$itemsPerPage": {
            "$t": 25
        }
    }
}

実際、「ビデオ」フィードはありません。

どこが間違っていますか?

役に立ちましたか?

解決

多分このようなもの

https://gdata.youtube.com/feeds/api/users/ [userid ]/subscriptions?v=2&alt=jsonまたはhttps://gdata.youtube.com/feeds/api/users/ [userid ]/newsubscriptionvideosos? v = 2&alt = json

あなたが見つけることができるあなたのYouTubeUserIDを追加することを忘れないでください

https://www.youtube.com/account_advanced

今、あなたが他の誰かのサブスクリプションを表示したいが、あなたが彼らのユーザーIDを知らないなら、あなたはoath2.0を使用して認証されているかもしれません

または一緒に行くだけです

https://gdata.youtube.com/feeds/api/users/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top