Can not find live - youtube-livestreaming-api

I have a text to speech robot that I use for my livestreams on youtube. The robot has been functioning fine for months.
It is giving me the error "Can not find live" despite having a livestream running.
My stream did particularly well yesterday, which may be related to why the API is behaving differently for me today?

It looks like my channel has been shadowbanned from appearing in search results for live videos. The youtube-live-chat node api that I uses relies on a search to get the chat id. Since I am shadowbanned from search results I must use the livebroadcasts list command instead.

Related

How can I get the Views Per Hour stat for a YouTube video?

I checked the Youtube API and it's mainly to do with adding functionalities related to the YouTube app rather than getting analytics data about videos.
There is a chrome extension called VidIQ that shows the views per hours of a particular video when going to the video's page on YouTube, so I tried reading the source code for it, but it is all compressed and I can't easily find what I'm looking for.
Could someone explain to me how VidIQ chrome extension is getting the views per hour stat for YouTube? Maybe it's not an official stat from Youtube but a rough estimate calculated by VidIQ. How do they get this information?
I tried debugging the VidIQ chrome extension to search through the source code but adding a simple html tag made the file corrupted and disabled the extension until I repaired it again. I'm having difficulties deciphering the source code.
Most of what VidIQ gets is from the YouTube analytics api and not directly from the YouTube data api although i would be they use some combination of both.
If you create a report that extracts views and run it every hour you should get the results you are looking for.
However i would be willing to be that they cache a lot of the data and do some internal analytics on it. They would need to cache it as the YouTube analytics api only returns data for the last 90 days last i checked.
If your intent is to Reverse Engineer VidIQ you may need to accept that a lot of the data you are seeing is internally stored in their system and generated by them based upon the data that is avaliable in the YouTube Analytics API and the YouTube data apis.

Google Search Console API Results Two Days Behind the Site. How to Fix?

So I just started working with the Google Search Console API to see top keywords that sent people to a site and interestingly, when I use the API, the most recent data I can get is from two days ago, but if I go directly into the search console website as a user, I can get data from today.
Is there a way to fix this or is it a known limitation? I Know there's a 48-hour delay in getting the search console data into Google Analytics, but I thought that applied only to the GA / Search console connection.
Simple! You just have to define the value for dataState as all to include this fresh data you're referring to.

Youtube Live-streaming API returns an empty list of streams

I'm trying to make an electron app that will work together with OBS. For this I need the Stream Name from youtube among other things.
But this stream name has proven hard to get from the API.
I'm currently testing it with the python examples on the documentation page.
This is the example that i use.
Before I started, I created a event with all the settings - and I'm able to see the Stream Name/Key on the website.
When I use the API, it just returns an empty list. I'm sure that I do have a stream, and that it's working as I created it myself, and I am streaming to the example view.
However I never get anything from that service. The other services work, like the list broadcasts one, it returns all planned events.
List Broadcasts:
$ python .\list_broadcasts.py
Broadcasts with status 'all':
Test Begivenhed (ib08ZcLQgZA)
List Streams:
$ python .\list_streams.py
Live streams:
The code for the examples can also be found here: https://github.com/youtube/api-samples/tree/master/python
Turns out that when you create a "Broadcast" a random stream is attached. It's impossible to get the key from this stream.
Instead you need to create a new "Stream/Customised Ingestion", this will make it all work, just make sure that your broadcast is attached with the steam.
You can reuse this stream, and that's a good thing for me, as I don't need to change the streaming key all the time.
You can create a new Stream/Customised Ingestion preset in the UI or via the API.

LiveStreams: list empty result

I'm testing YouTube live streaming API using Java client libraries.
I have a simple project which is basically the copy of ListStreams example taken from here:
https://developers.google.com/youtube/v3/live/code_samples/java#retrieve_a_channel_s_live_video_streams.
I have my application registered in Google developers console. I have created a test public live stream and a test broadcast.
Everything works fine, I can broadcast video from my phone to this live stream.
But when I try to get a list of live streams from my channel I always get an empty result.
The funny thing is that I can successfully retrieve my channel's broadcasts using the LiveBroadcasts.java example.
But no matter what I do the list of streams is always empty.
Did anyone have similar problems ?
Cheers, Dmitry.

How to get a screen shot of a web page from a url

Im trying to figure out how to let a user enter a website or link on my webpage and then based on that url I would like to display a screenshot of that link sort of similar to when you post a video link from youtube on face book it grabs a small image. Ive seen some services but Id rather implement something myself on my server.
I've used programs like webkit2png in the past, but it's mac-only. I have never used it but this looks like a more generic linux equivalent:
http://khtml2png.sourceforge.net/
I presume your server is running some flavor of linux; you might have to jump through some hoops to install Qt and ImageMagick if you don't have them already or if you are on a shared server.
For the record, although it says that it can't "scale the output image" in the newer versions of this library, that's a very straightforward operation you can apply with many other libraries/programs.