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

Can't list multiple usernames at once using YouTube API

$
0
0

I'm new to python and I'm trying to make a bulk username to channel id converter since I couldn't find any online. However it seems to only allow one username at a time and whenever I try putting multiple it says : {'totalResults': 0}.

Here is the code I was trying to use:

from googleapiclient.discovery import buildapi_key = 'KEY'youtube = build('youtube', 'v3', developerKey=api_key)request = youtube.channels().list(    part='id, snippet',    forUsername=('jawed','mw'))response = request.execute()with open('output.txt', 'a', encoding="utf-8" ) as f:    f.write(str(response) +'\n')    print(response)

Viewing all articles
Browse latest Browse all 3831

Trending Articles



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