-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YouTube] Support handles and all channel usernames #964
[YouTube] Support handles and all channel usernames #964
Conversation
b4c3d3d
to
396d1d9
Compare
More non-channel paths have been also added to the excluded custom name paths, documentation and exception messages have been improved and fixed in some places, and the licence header of YoutubeChannelLinkHandlerFactory has been moved to its beginning and updated.
…s support Unneeded public modifiers in test methods of YoutubeChannelLinkHandlerFactoryTest have been also removed.
396d1d9
to
20cd8e8
Compare
} | ||
|
||
final String id = splitPath[1]; | ||
|
||
if (id == null || !id.matches("[A-Za-z0-9_-]+")) { | ||
throw new ParsingException("The given id is not a Youtube-Video-ID"); | ||
if (isBlank(id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should use something else to match all custom names of channels or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have a channel ID that does not match the old pattern, e.g. by consisting of non latin characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. dumb question. you put one into your tests... https://www.youtube.com/c/%EB%85%B8%EB%A7%88%EB%93%9C%EC%BD%94%EB%8D%94NomadCoders
Merging this PR now, as we could always improve this later, and a few more changes in the parsing logic are needed to fix #965 on the fly. |
This PR adds support of YouTube handles into the extractor, and supports all user IDs instead of only the ones which match this regular expression.
Furthermore, in this PR, I added more non-channels endpoints to the list of excluded endpoints, improved and fixed documentation, comments and exception messages of
YoutubeChannelLinkHandlerFactory
, and moved its license header, updated on the fly, at its beginning.Finally, I added new tests for handles and for a channel which have characters which doesn't match the regular expression linked above, and removed the unneeded
public
test modifiers forYoutubeChannelLinkHandlerFactoryTest
.I also make use of a handle for resolving the Gronkh channel ID instead of its custom name, and updated the mocks of this test, as it was needed.
Fixes #875 and TeamNewPipe/NewPipe#9243 for the extractor implementation.