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] Implement emergency meta info #1135

Merged
merged 2 commits into from
Dec 29, 2023

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Dec 7, 2023

As seen in #1127, YouTube provides that meta info panel when users search for really sensitive content like suicide (e.g. "blue whale").

image

It contains:

  • an encouragement as title (e.g. "Siamo con te" / "We are with you")
  • a phone number as action (e.g. "Chiama ..." / "Call ...")
  • details about how to call the phone number (e.g. in which time ranges the phone number can be called)
  • an url pointing to the website of an association (e.g. "Samaritans Onlus")

Since NewPipe's meta infos contain only one details field, I concatenated the phone number on a new line after the phone number details.

image

This is how it looks in NewPipe:

image

Also add a test that just checks if a meta info is properly extracted. Since this test depends on #1127, this PR includes those commits, too. I will cherry-pick once #1127 is merged.

Also move meta info extraction to separate file, since YoutubeParsingHelper was longer than 2000 lines which caused checkstyle issues.

YouTube provides that meta info panel when users search for really sensitive content like suicide (e.g. "blue whale").

It contains:
- an encouragement as title (e.g. "We are with you")
- a phone number as action
- details about how to call the phone number (e.g. availability)
- an url pointing to the website of an association

Also add a test that just checks if a meta info is properly extracted
YoutubeParsingHelper was longer than 2000 lines which caused checkstyle issues
@TobiGr TobiGr added the youtube service, https://www.youtube.com/ label Dec 29, 2023
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

LGTM

@TobiGr TobiGr merged commit 1e93b1d into TeamNewPipe:dev Dec 29, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants