How can I get the actual video URL of a YouTube live stream?

You need to get the HLS m3u8 playlist files from the video’s manifest. There are ways to do this by hand, but for simplicity I’ll be using the youtube-dl tool to get this information. I’ll be using this live stream as an example: https://www.youtube.com/watch?v=_Gtc-GtLlTk First, get the formats of the video: ➜ ~ youtube-dl –list-formats … Read more

YouTube API v3 get all channels associated with a logged in user

Found the answer in YouTube’s API Blog here: http://apiblog.youtube.com/2013/06/google-page-identities-and-youtube-api.html According to this as I’m using Android with OAuth2 there is no native Android account switcher, and the then the API will choose the “wrong” channel in some cases, or even no channel (e.g., if the personal account doesn’t have a channel). So I’ve got two … Read more

cURL error 60: SSL certificate prblm: unable to get local issuer certificate [duplicate]

If you are on Windows using Xampp, I am stealing a better answer from here, would be helpful if Google shows you this question first. Download and extract for cacert.pem here (a clean file format/data) https://curl.haxx.se/docs/caextract.html Put it in : C:\xampp\php\extras\ssl\cacert.pem Add this line to your php.ini curl.cainfo = “C:\xampp\php\extras\ssl\cacert.pem” restart your webserver/Apache

Google API to get impressions of youtube videos?

As always YouTube APIs doesn’t provide access to a basic feature but here is a workaround: The following answer is similar to the one I wrote about retrieving Unique viewers from the Audience tab. Go on your Video analytics interface in YouTube Studio. Open the Web Developer Tools Network tab of your web-browser (by using … Read more

How to bypass entering authentication code to authorize my code everytime I use the YouTube Data API v3

Indeed there’s the possibility to save your credentials object the first time running successfully an OAuth authorization/authentication flow; then to load the credentials object from that file each time running the program for the n-th time, where n >= 2. Here is how I recommend to structure your code: import os, pickle from google_auth_oauthlib.flow import … Read more