-
Notifications
You must be signed in to change notification settings - Fork 422
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 search filters #106
Comments
@omarroth great work. And yes this is the right place :) |
Hi, is anyone working on this currently? If not, I would like to pick this up. |
No atm there is no one working on this. |
@theScrabi Cool, will get started then and keep things posted here. |
Small update on my end. I have implemented the existing content and sorting filters for YouTube search as per the implementation provided by @omarroth (thanks for that btw!). Have been testing it on my end and its working as per the original requirement. You can find those changes here. At this point I have 2 primary issues 2 address:
Hopefully, this should be done over the weekend and then we can move to actually implementing it on the app :) |
Sort filter and content filter are specifiable for each service already. |
Why is the test against a url not possible anymore? Also please open a pullrequest, so we can check the code :) |
Yes. But for YouTube, the content filters look like this currently:
Whereas now, it will become something like this:
The existing test just validates if "our" logic to generate the URL for YouTube search is correctly implemented. But if the logic were to change on YouTube's end tomorrow, then that wouldn't be reflected accurately.
Will do once I am finished with my changes. 👍 |
But isent this the purpouse of tests? If it suddenly changes sentry will be the service to notify us. |
Is this sorting issue the reason why NewPipe fails to sort the 'News' section chronologically? |
No, and No. The News section is a different issue, and yes there have been many threads about this problem. We are on it :) |
what happened to this? |
There was a PR created, see why it has been closed #124 (comment). |
This will be handy when writing the .proto files / an implementation: |
Hi! I wanted to provide some information on how YouTube's search filters work, as I noticed currently NewPipe uses hardcoded values. Sorry if this is the wrong place for this.
The
&sp=
parameter is a Base64'd protocol buffer that contains all the filters. I'd recommend looking here for a working implementation. It's pretty short, but essentially you have (about) two bytes for eachfilter
, one (or more) bytes as atype
, and then the other byte as avalue
, for example:Features (
live
,HD
, ...) have a value of1
:Once you've added all your filters, give it a header (which contains the only mandatory filter,
sort
, see the code above for details), Base64 encode, URI escape, and you're good to go.Hopefully this is useful, and I want to thank the NewPipe team for providing their excellent work for others.
The text was updated successfully, but these errors were encountered: