Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

ChannelSearch not working on "* - topic" channels #175

Closed
fabi321 opened this issue Apr 29, 2022 · 0 comments
Closed

ChannelSearch not working on "* - topic" channels #175

fabi321 opened this issue Apr 29, 2022 · 0 comments

Comments

@fabi321
Copy link
Contributor

fabi321 commented Apr 29, 2022

ChannelSearch('The Beatles - Topic', 'UC2XdaAVUannpujzv32jcouQ')

fails to execute and raises an Error: Could not parse YouTube response. Error in core.channelsearch:40.
The raw response looks like this

`response["contents"]["twoColumnBrowseResultsRenderer"]["tabs"][-1]` of raw JSON response from youtube
{
    "contents": {
        "twoColumnBrowseResultsRenderer": {
            "tabs": [
                {
                    "tabRenderer": {
                        "endpoint": {
                            "clickTrackingParams": "CBcQ8JMBGAciEwjM2c-dorr3AhXK4hEIHSUlAr8=",
                            "commandMetadata": {
                                "webCommandMetadata": {
                                    "url": "/channel/UC2XdaAVUannpujzv32jcouQ/about",
                                    "webPageType": "WEB_PAGE_TYPE_CHANNEL",
                                    "rootVe": 3611,
                                    "apiUrl": "/youtubei/v1/browse"
                                }
                            },
                            "browseEndpoint": {
                                "browseId": "UC2XdaAVUannpujzv32jcouQ",
                                "params": "EgVhYm91dA%3D%3D",
                                "canonicalBaseUrl": "/channel/UC2XdaAVUannpujzv32jcouQ"
                            }
                        },
                        "title": "About",
                        "selected": false,
                        "trackingParams": "CBcQ8JMBGAciEwjM2c-dorr3AhXK4hEIHSUlAr8="
                    }
                }
            ]
        }
    }
}

It only contains tabRenderer entries, and no expandableTabRenderer entries, as the current code expects it.
The other tab entries are flawed in the same way.

@mytja mytja closed this as completed in 090d9fb Apr 30, 2022
mytja added a commit that referenced this issue Apr 30, 2022
Made ChannelSearch more resilliant, Fixes #175
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant