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

WIP channels fix #1849

Merged
merged 2 commits into from
Mar 6, 2021
Merged

WIP channels fix #1849

merged 2 commits into from
Mar 6, 2021

Conversation

saltycrys
Copy link
Member

This is a preliminary fix for channels. Needs testing and a proper rewrite.

@saltycrys saltycrys added the need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something label Mar 3, 2021
@hackerncoder
Copy link
Contributor

Wouldn't this be blocked by #1848? Before that gets approved this can't (otherwise you need to remove Bump dep.)

@saltycrys
Copy link
Member Author

I successfully tested the new LSQUIC version in Docker and merged #1848.

Anybody looking for a temporary fix for channels and subscriptions can use 378c0d0.

@Perflyst
Copy link
Contributor

Perflyst commented Mar 3, 2021

Thanks, will test hopefully tomorrow.

@ytprivatecom
Copy link

Live on ytprivate.com

url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated, sort_by: sort_by, v2: true)
return YT_POOL.client &.get(url)
def get_channel_videos_response(ucid, page = 1, auto_generated = nil, sort_by = "newest", youtubei_browse = true)
if youtubei_browse

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You always have this as true, so probably you can just delete the other branch.

)
else
url = produce_channel_videos_url(ucid, page, auto_generated: auto_generated, sort_by: sort_by, v2: true)
return YT_POOL.client &.get(url)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is exactly the previous channels call unmodified. The shape of this thing is different than the shape of the other branch, in that you have to do response.body["response"] in this case but the other branch doesn't have that.

If you choose not to delete this, then I'm not sure it make sense to have it in the same method, because it wouldn't be interchangeable at all.

"continuation": continuation,
}.to_json
return YT_POOL.client &.post(
"/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if they ever change this? It's the same for everyone, but maybe they rotate it sometimes.

@@ -388,7 +388,7 @@ def fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by)
return items, continuation
end

def produce_channel_videos_url(ucid, page = 1, auto_generated = nil, sort_by = "newest", v2 = false)
def produce_channel_videos_continuation(ucid, page = 1, auto_generated = nil, sort_by = "newest", v2 = false)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

factoring this out probably isn't needed if you delete the youtubei_browse =false path

@AudricV
Copy link
Contributor

AudricV commented Mar 4, 2021

Note also that long playlists are broken, but I think it can be included in this PR because the continuation request has the same logic (same headers with a continuation token, if I am not wrong). If you want to know more and find a real fix (in Java), see TeamNewPipe/NewPipeExtractor#567.

@unixfox
Copy link
Member

unixfox commented Mar 5, 2021

In testing on yewtu.be
Seems to work great.

@TheFrenchGhosty
Copy link
Member

Merging since it's a really important fix.

@saltycrys saltycrys deleted the channels branch March 13, 2021 12:45
@saltycrys
Copy link
Member Author

This wasn't meant to get merged, at least not as is. I stopped working on it as soon as channels worked again.

@tenpura-shrimp could you revert and rewrite this please? I left produce_channel_videos_url in there because it's also used in BypassCaptchaJob but maybe it can be removed. Playlists also need this, see #1883.

@TheFrenchGhosty TheFrenchGhosty removed the need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something label Mar 13, 2021
@TheFrenchGhosty
Copy link
Member

@saltycrys I merged it as is because it worked to fix channels, I know it wasn't ideal, but it's still better than not having channels... so it's okay-ish. Obviously it needs to be enhanced.

@github-actions
Copy link

github-actions bot commented Jun 8, 2021

This pull request has been automatically locked since there has not been any activity in it in the last 30 days. If you want to tell us about needed or wanted changes or if problems related to this code are discovered, feel free to open an issue or a new pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants