mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.1k stars 644 forks source link

"User not Found" when searching for YouTube users that have names with spaces. #795

Open BrunoDSL opened 6 years ago

BrunoDSL commented 6 years ago

For some reason, the program is unable to look for YouTube user names that have spaces between them ("Gamers Nexus", "Scott Manley", etc.), stating the user isn't found. However, if you look for their videos in other fashion (using regular search), they show up with the proper space separated user name if you add the "user" column in the listing.

Either an escape sequence should be provided for that kind of user/playlist search or it should take into consideration spaces and whatnot when the search is between quotes or similar.

Your Environment

mpsyt version 0.28.0 Windows 7 Home Premium SP1 x64 mpv 20171225

vn-ki commented 6 years ago

Use channels. ex: channels Scott Manley.

user is for searching by username of the channel. (Ex: user nerdwriter1 for the channel Nerdwriter)

BrunoDSL commented 6 years ago

Yes, but that makes the act of simply looking for the most recent videos from some place require an extra step.

vn-ki commented 6 years ago

I'm not 100% sure, but I think this is the only way (It's just one more step).

If the channel has a username (the new ones don't have one), you can use user on that. Ex: For Scott Manley, use user szyzyg (From his channel url, https://www.youtube.com/user/szyzyg)

ghost commented 6 years ago

Is the channels command a recent addition? I was using user to search for channels previously and it worked even with spaces, incomplete names, disregarding capitalization, additional search terms etc.

For example user pewds would find PewDiePie, user alan thrall would find Alan Thrall (whose username is athrall7), I could add an additional search term to specify if the channel name wasn't unique.

I don't know exactly if it was a particular update that changed it, I reinstalled my system and afterwards the search with user would only work with the exact username like you say.

Anyways, since channels now provides essentially the same functionality, I will just have to change the way I search.

johanbluecreek commented 6 years ago

Is the channels command a recent addition? I was using user to search for channels previously and it worked even with spaces, incomplete names, disregarding capitalization, additional search terms etc.

For example user pewds would find PewDiePie, user alan thrall would find Alan Thrall (whose username is athrall7), I could add an additional search term to specify if the channel name wasn't unique.

I don't know exactly if it was a particular update that changed it, I reinstalled my system and afterwards the search with user would only work with the exact username like you say.

Anyways, since channels now provides essentially the same functionality, I will just have to change the way I search.

Can confirm this. I have two computers, one almost a perfect copy of the other on the level of configuration of a gentoo system, only one is more recent. The more recent one, user searches has never "worked" properly, and even though the older computer runs the same version of mpsyt, same configurations, etc. The older one has this behaviour where the user searches are fuzzy and/or smart, and works very well.

Vrihub commented 6 years ago

Use channels. ex: channels Scott Manley.

This can be a workaround, but I still miss the user <username>/<query> feature; it doesn't work with channels

BrunoDSL commented 6 years ago

Considering there's no visible difference between a channel and a user for the end user, why need two commands that do essentially the same thing?

Vrihub commented 6 years ago

Considering there's no visible difference between a channel and a user for the end user, why need two commands that do essentially the same thing?

They don't do the same thing, they also have different semantics (e.g. user supports attaching a /query... after the username).

I guess we are losing the focus on the original issue: i.e. the user command is currently broken for usernames that contain spaces (neither quoting the whole string or escaping spaces with a backslash work).

I had a look at the code, and it looks like this is a bug in pafy, am I wrong?

scaryvoid commented 5 years ago

I know this is a bit old but it still seems to be an issue. I've ran into this searching for 'Ubuntu Podcast'. It seems like the actual query using the URL in pafy returns 0 results:

url=https://www.googleapis.com/youtube/v3/channels?part=id%2Csnippet&forUsername=ubuntu+podcast&key= data={ "kind": "youtube#channelListResponse", "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/ewwRz0VbTYpp2EGbOkvZ5M_1mbo\"", "pageInfo": { "totalResults": 0, "resultsPerPage": 5 }, "items": [] }

Sorry, maybe I should post this in pafy??