Benjamin-Loison / YouTube-operational-API

YouTube operational API works when YouTube Data API v3 fails.
378 stars 46 forks source link

Failing to resolve the ID for some channels. #176

Closed zoredache closed 1 year ago

zoredache commented 1 year ago

I have some old YouTube bookmarks I was trying to get the channel id for. When I try to access them I am getting a null result for the id.

channel: https://www.youtube.com/user/mydamnchannel API request: GET https://yt.lemnoslife.com/channels?cId=mydamnchannel

channel: https://www.youtube.com/user/packetanalyzer API request: GET https://yt.lemnoslife.com/channels?cId=packetanalyzer

channel: https://www.youtube.com/user/communitychannel API request: GET https://yt.lemnoslife.com/channels?cId=communitychannel

Results for all the above

{
    "kind": "youtube#channelListResponse",
    "etag": "NotImplemented",
    "items": [
        {
            "kind": "youtube#channel",
            "etag": "NotImplemented",
            "id": null
        }
    ]
}

Using the YouTube API explorer with the forUsername argument set to mydamnchannel, packetanalyzer, or communitychannel does seem to correctly return the channel id and other data.

Benjamin-Loison commented 1 year ago

The aim of this repository concerning the web-scraping part is about completing YouTube Data API v3 than replacing it. Why are you unhappy (if you even are) with YouTube Data API v3 Channels: list endpoint forUsername filter?

Related to #91.

Benjamin-Loison commented 1 year ago

For this kind of channels (/user/ ones), the expected process it is to currently get from YouTube Data API v3 the channel id and then pass it to my API if you are interested in some details that the YouTube Data API v3 doesn't provide.

Benjamin-Loison commented 1 year ago

Note that I did an update to add support for forUsername filter in my API. Let me know if I understood your problem incorrectly. So now https://yt.lemnoslife.com/channels?forUsername=mydamnchannel is working for instance.

This Stack Overflow answer may make it clearer in your head about the many YouTube ids.

Benjamin-Loison commented 1 year ago

Don't hesitate to re-open the issue if you don't consider it solved.