-
Notifications
You must be signed in to change notification settings - Fork 405
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
Add support for Google search redirect url #362
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stypox
force-pushed
the
google-search-urls
branch
3 times, most recently
from
June 27, 2020 21:12
d66a361
to
d9a8786
Compare
@wb9688 @XiangRongLin I fixed #277 (comment) |
Stypox
force-pushed
the
google-search-urls
branch
from
June 27, 2020 21:30
d9a8786
to
7ed38b7
Compare
extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/ListLinkHandlerFactory.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java
Outdated
Show resolved
Hide resolved
@XiangRongLin done, thank you |
TobiGr
approved these changes
Oct 31, 2020
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, but needs a rebase.
Stypox
force-pushed
the
google-search-urls
branch
from
October 31, 2020 19:59
495f219
to
9e53cf0
Compare
Done |
This was referenced Nov 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR handles Google search redirect URLs such as
https://www.google.it/url?sa=t&rct=j&q=&esrc=s&cd=&cad=rja&uact=8&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHu80uDzh8RY&source=video
by extracting theurl=
parameter before anything else happens. For this reasonoriginalUrl
s insidelinkHandler
s are then not really the full original url, but only the extracted parameter, which I think is a good behaviour (those links are redirects, so using the pointed-to url as the original one looks good imo). Also note that Google search redirect URLs will be opened in NewPipe only when manually shared to it, since I wouldn't consider a good idea adding thegoogle
domain to the manifest.This PR also fixes
baseUrl
extraction from urls with custom intents like "vnd.youtube", thus allowing to remove some useless overrides ofgetUrl
.Fixes TeamNewPipe/NewPipe#3790
Test apk: app-debug.zip
@webber-naut please check if this suits you, thank you in advance ;-)