-
Notifications
You must be signed in to change notification settings - Fork 421
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
Support short custom YouTube channel URLs #409
Conversation
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.
Thanks for contributing!
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
* @return true - if value conform to short channel url, false - not | ||
*/ | ||
public boolean isCustomShortChannelUrl(String[] splitPath) { | ||
return splitPath.length == 1 && !splitPath[0].matches("playlist|watch"); |
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.
http://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DEhxJLojIE_o%26feature%3Dshare is a stream URL, but is accepted by your regex.
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.
Hi. Thank you for review. Do you think that simply adding "attribution_link" to exlude those links with regex would be sufficent solution ? I couldn't come up with something better that that.
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.
Mmmh, probably a list of all pages not pointing to a channel should be added to that regex
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.
Other YouTube URLs:
@Stypox what do you mean exactly?
@Bartoshr Instead of writing "fix for", could you write "closes" or "fixes"? This will ensure the linked issue automatically closes when this PR is merged. |
@opusforlife2 Sure, i will keep that in mind. |
...java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelLinkHandlerFactoryTest.java
Show resolved
Hide resolved
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
…youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java Fix typos Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
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.
Thank you! Remember to add final anywhere possible.
@wb9688 I'd merge this after the changes are implemented, even though probably the list of possible hardcoded non-channel urls may be bigger. We can always add more later
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
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.
Looks good to me. Just a small change.
.../schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
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.
Thank you!
What is it ?
fixes TeamNewPipe/NewPipe#3608