Skip to content
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 New Yt trending pages #1805

Open
theScrabi opened this issue Oct 12, 2018 · 12 comments
Open

Support New Yt trending pages #1805

theScrabi opened this issue Oct 12, 2018 · 12 comments
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface help wanted Help is wanted in fixing this issue requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/

Comments

@theScrabi
Copy link
Member

theScrabi commented Oct 12, 2018

Youtube has recently introduced new trending pages

bildschirmfoto vom 2018-10-12 02-24-10

This now makes it possible to also see topic related trending, like music, live stream, news etc. Since I think this is (at least) something good youtube did we should add support for this.
NewPipe is written to support more than only one of these "Kiosks" per service, so it should be pretty simple to just add some more kisoks to the extractor.

This should not be to much complicated, and it is a welcome thing for getting in touch with the extractor.

Optional UI changes

Short or long term we need to change the UI to better support multiple Kiosks. @Somethingweirdhere what do you think about my suggestion?

small_arrow_closed small_arrow_open

@theScrabi theScrabi added feature request Issue is related to a feature in the app help wanted Help is wanted in fixing this issue labels Oct 12, 2018
@gregordr
Copy link
Contributor

Looks good to me! One thing though: There is still a main Trending page. Can you access it by pressing Trends, and expand the list by tapping on the arrow? Or would we title it Kiosks, and add Trends on the same level as Music, Sports and Live?

@theScrabi
Copy link
Member Author

I think it was awesome if the kiosk could be togfled, meaning the last selected kiosk will be shown beside the arrow, and if someone clicks on it he can sellect one of the other ones

@gregordr
Copy link
Contributor

@theScrabi Hm yeah, I think that makes sense!

@gregordr
Copy link
Contributor

Anyone already working on this?

@gregordr
Copy link
Contributor

gregordr commented Oct 23, 2018

Alright, will get working on it then.

Can you confirm to me that if you go to Trending News, you also get the URLhttps://www.youtube.com/feed/trending?bp=4gIuCggvbS8wNWpoZxIiUEwzWlE1Q3BOdWxRa2lqaUkwSWxMc0I0R3NQWjhUNVlDZA%3D%3D
? If not, the URL changes according to country or something else and we have to find a way to get that.

Edit:
I have played around, but I ran into the problem that everything after a ? seems to be ignored, which is quite terrible because that's where our URLs differ.

@gregordr
Copy link
Contributor

gregordr commented Oct 24, 2018

I solved the above problem by using an URL shortener... but that's not the best solution. Any ideas?

Edit:
gregordr/NewPipeExtractor@d024434

This is the extractor URL.

Parse this: implementation 'com.github.Somethingweirdhere:NewPipeExtractor:d024434fcbcb2656b23e181fc2b5485a134b3d49'

To test it. It works, but before making a pull request I think we should do something about the links instead of using bit.ly.

@omarroth
Copy link

omarroth commented Nov 5, 2018

I can verify that the News link you provided is the same for me. Although trending pages differ depending on region. I would probably recommend hardcoding the links rather than using a link shortener, similar to what is currently done in SearchQueryHandler, so instead of url + "&sp=..." it would be url + "&bp=...".

For something more robust, I would probably recommend taking a look at TeamNewPipe/NewPipeExtractor#106, as it appears to be quite similar. Although I haven't investigated very much, this appears to be the structure of the &bp= param (after Base64-decoding):

e2 02 SIZE =>
    0a SIZE =>
        /m/?????
    12 SIZE =>
        PLID

Where SIZE is a single byte indicating the length of the indented data (in bytes).

Notice that each trending param actually refers internally to a playlist, examples:

@gregordr
Copy link
Contributor

gregordr commented Nov 5, 2018

@omarroth I have already tried that: gregordr/NewPipeExtractor@3fcf812

The issue is that apparently everything after the ? get's ignored

@omarroth
Copy link

omarroth commented Nov 7, 2018

Ah, I missed that. Sorry that I won't be much help there.

@gregordr
Copy link
Contributor

@theScrabi @TobiGr @karyogamy What do you think about this? Merge this way? Try to find out why the ? are being ignored? Any other thoughts?

@theScrabi
Copy link
Member Author

I may look at this, but atm it has rather low priority.

@Stypox Stypox added GUI Issue is related to the graphical user interface youtube Service, https://www.youtube.com/ labels Aug 28, 2019
@Orion983
Copy link

Orion983 commented Dec 3, 2020

Goodness I swear this didn't come up when I made my issue! Ah well nice issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface help wanted Help is wanted in fixing this issue requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/
Projects
None yet
Development

No branches or pull requests

6 participants