-
Notifications
You must be signed in to change notification settings - Fork 425
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] Set EU consent cookie #600
Conversation
...ava/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSuggestionExtractor.java
Outdated
Show resolved
Hide resolved
...test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java
Show resolved
Hide resolved
9f48a7b
to
84c6e7b
Compare
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
8a6d015
to
7c3c3b9
Compare
27e460c
to
2a046c0
Compare
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.
lgtm
2a046c0
to
7355c48
Compare
I just pushed the same commit again to trigger the CI. GitHub Actions did not run all tests again after changing the target branch to master |
7355c48
to
682ec27
Compare
Ah. what a bummer. The randomized consent cookie makes the mocks useless, because the recorded requests are not equal to the current anymore. |
@TobiGr Instead of directly declaring a random number generator, you can inject one from outside. This way you inject a deterministic one in tests. I'll take a look at it This is something that can generally be done when trying to avoid randomness in tests. Thats also why Dependency Injection (DI) is so important |
@TobiGr done
|
regarding the two tests: that's why I wanted to set up a weekly mock update. I cannot make the tests complete successfully either. I'll merge this and release 0.21.1 now. We cannot wait any longer Thank you for fixing the mock tests! This solution looks good to me. |
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.
CONENT_COOKIE constants should be private as only the method generateConsentCookie should be used
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Outdated
Show resolved
Hide resolved
3469b80
to
e437d50
Compare
0aa21e3
to
33173eb
Compare
Addresses #592