-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to get information about a video? #17
Comments
Here's an example that'll print a video's details: from innertube import InnerTube, Client
from pprint import pprint
video_id = 'zL3wWykAKfs' # Still Woozy - Goodie Bag
ios = InnerTube(Client.IOS)
data = ios.player(video_id=video_id)
pprint(data.videoDetails) |
You can get the short view count using from innertube import InnerTube, Client
from pprint import pprint
video_id = 'zL3wWykAKfs' # Still Woozy - Goodie Bag
ios = InnerTube(Client.IOS)
data = ios.next(video_id=video_id)
pprint(data.playerOverlays.playerOverlayRenderer.autoplay.playerOverlayAutoplayRenderer.shortViewCountText) |
Each of the different services give data in different places, for example here's the from innertube import InnerTube, Client
from pprint import pprint
video_id = 'zL3wWykAKfs' # Still Woozy - Goodie Bag
web_remix = InnerTube(Client.WEB_REMIX)
data = web_remix.music_get_queue(video_ids=[video_id])
pprint(data.queueDatas[0].content.playlistPanelVideoRenderer.longBylineText.runs) |
As for comments, unfortunately I haven't implemented this functionality as this is not a part of the InnerTube API, instead I'd recommend looking into the Here's some example code I wrote a while back to interact with those endpoints: https://github.com/tombulled/youtube/blob/5bf5dce4b0a9271e507d615fe05384b9d69fb3e9/youtube/operations.py#L36 |
Thanks I will try these. |
Is there a way to get information about a particular video such as likes,comments count or comments itself?
The text was updated successfully, but these errors were encountered: