-
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
Fix Peertube account subscribers extraction #575
Conversation
I already took a look at that one, too. But there seems to be a huge difference between the API result for this channel and the follower count on the website: 491 vs 952 |
When I loaded the first time the website, it shows 491 followers first briefly and after 952. I don't understand why. |
I GOT IT I noticed something : it is what we've previously called a "parent channel". The channel, owner channel has 491 subscribers, but all the different sub-channels, video-channels have 461 subscribers if you sum them all. That makes 952 subscribers The request that gives 491: https://framatube.org/api/v1/accounts/framasoft To have the full subscriber count you have to make another request to get video channels (add /video-channels) That's what the web client does according to a quick look at the network tab of devtools |
057bdc5
to
830e1e0
Compare
@B0pol I implement what you said, this should be done now. |
...java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.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. We should add a comment about what is done here and why it is done, so other people going through the code will know.
...java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.java
Show resolved
Hide resolved
Apply fix provided in the PR and move all accounts/ strings to a constant, ACCOUNTS.
a4622c3
to
ae28331
Compare
A Peertube test is failing because of a new thumbnail URL, which changes at every time the test is run. |
Fix Peertube account subscribers extraction by adding the subscribers of all channels of an account to the subscribers of this account.
Minimal subscriber count for Framasoft account has been increased to 750 in the test.