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

[YouTube] Fix channel with redirects directly in the response #287

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

mauriciocolli
Copy link
Contributor

Some redirects were embed directly into the response as instructions for the page, instead of the usual http redirects.

  • Fix channel extraction when redirects are in the response.
  • Fix id extraction for some channels.
    • Some channels had no reliable way to get the redirected id in the response.

There's still some problems though, channels generated by YouTube won't have video tabs and in some cases, even the subscriberCountText has completely unrelated text in it (e.g. Movies & Shows).

@wb9688 Maybe we have to extract the essentials and report that it has no videos (technically the truth), or even ignore those generated channels completely? I guess the essentials are better than nothing (like the old extractor did).


Fixes #283.

Some redirects were embed directly into the response as instructions
for the page, instead of the usual http redirects.
Some channels had no reliable way to get the redirected id in the response,
so saving it for later was a valid alternative.
@mauriciocolli mauriciocolli added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Mar 14, 2020
@wb9688
Copy link
Contributor

wb9688 commented Mar 14, 2020

@mauriciocolli: What will happen in my tabs PR is that it will extract the name and stuff, and it'll always display both the Videos and the Playlists tab, both with just 'No items' in it in that case. The displayed tabs will be changed in a future PR. That Movies & Shows channel is completely worthless for us though.

@B0pol
Copy link
Member

B0pol commented Mar 14, 2020

@mauriciocolli: What will happen in my tabs PR is that it will extract the name and stuff, and it'll always display both the Videos and the Playlists tab, both with just 'No items' in it in that case. The displayed tabs will be changed in a future PR. That Movies & Shows channel is completely worthless for us though.

I agree with Films and TV (which looks like not even a channel but a shop), but that's not true for all YouTube-generated channels. I think Music, News, Live, Sport, Video Games would interest lots of people (just look at the subcount of these channels, it's very high).

@wb9688
Copy link
Contributor

wb9688 commented Mar 14, 2020

@B0pol: I agree, but as I said, that'll be for a later PR.

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Code looks good, especially those default values for json queries to prevent NullPointerExceptions :-D

@Stypox
Copy link
Member

Stypox commented Mar 16, 2020

I guess the essentials are better than nothing (like the old extractor did).

I agree

@TobiGr TobiGr merged commit 6fd9b38 into TeamNewPipe:dev Mar 23, 2020
@mauriciocolli mauriciocolli deleted the fix-channel-redirect branch March 30, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParsingException: Could not get channel id
5 participants