Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Get comment section on a YT livestream - Python

$
0
0

im reading the doc and im kinda struggling; what im willing to do is check if the user’s channel has an active live broadcast, and also i want to get the comment on this livestream, but even if i found the documentation about livestream and also comment section i cant get how to track the comment on it

Here is the code provided by the api documentation for retrieving comment i dont see where i can insert the live link, thanks by advance !

# -*- coding: utf-8 -*-# Sample Python code for youtube.comments.list# See instructions for running these code samples locally:# https://developers.google.com/explorer-help/code-samples#pythonimport osimport googleapiclient.discoverydef main():    # Disable OAuthlib's HTTPS verification when running locally.    # *DO NOT* leave this option enabled in production.    os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"    api_service_name = "youtube"    api_version = "v3"    DEVELOPER_KEY = "YOUR_API_KEY"    youtube = googleapiclient.discovery.build(        api_service_name, api_version, developerKey = DEVELOPER_KEY)    request = youtube.comments().list(        part="snippet",        parentId="UgzDE2tasfmrYLyNkGt4AaABAg"    )    response = request.execute()    print(response)if __name__ == "__main__":    main()

Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>