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

How to get list of subscribers of any channel(not only mine) using youtube api with python?

$
0
0

I am trying to get list subscribers of any channel using youtube api using python. But i am getting issue when i run my code it asks me to enter authorisation code and i do not know what it is. I have also enabled oath api. see my code belowimport os

from google_auth_oauthlib.flow import InstalledAppFlowfrom google.auth.transport.requests import Requestfrom googleapiclient.discovery import buildimport googleapiclient.errorsflow = InstalledAppFlow.from_client_secrets_file("client_secrets.json",                             scopes=["https://www.googleapis.com/auth/youtube.readonly"])flow.run_local_server(port=8080, prompt="consent")credentials = flow.run_console()youtube = build("youtube", "v3", credentials=credentials)request = youtube.subscriptions.list(        part="snippet,contentDetails",        channelId="UC_x5XG1OV2P6uZZ5FSM9Ttw")response = request.execute()print(response)

is there any way to do so?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



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