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

feat(PlaylistVideo): Extract video_info and accessibility_label texts #376

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Apr 7, 2023

Description

Unfortunately playlist videos don't have fields for the uploaded date or number of views. Instead they are in the video info property. The video info property contains text runs that can consist of the short view count and uploaded date, the number of people watching the live stream or be empty.

This pull request also extracts the accessibility label string, which among other things contains the exact number of video views (thanks @AudricV for pointing that out). One important thing to note, is that said string is language dependant, so any library user wanting to parse it will have to keep that in mind, also 0 views are shown as no views.

Here are a couple of playlists to see the different values of those properties:
Normal videos: https://www.youtube.com/playlist?list=PL8mG-RkN2uTypNLvzSMJZjjztzVatqgQ6
Some upcoming videos: https://www.youtube.com/playlist?list=PLAWO6dmnJ7Oxne23Iv14NbOcXeRv2eLYz
Live videos: https://www.youtube.com/playlist?list=PL6NdkXsPL07IFb3kA-m9QNY8oUMctNM3i

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@LuanRT LuanRT merged commit c9135e6 into LuanRT:main Apr 7, 2023
@absidue absidue deleted the playlist-extra-strings branch April 7, 2023 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants