Since youtube APIv3 revision on September 15, 2016, the Watch Later list id cannot be found in channels.contentDetails.relatedPlaylists.watchLater as it contains fixed string WL.
The revision states:
...
The channel resource's contentDetails.relatedPlaylists.watchHistory
and contentDetails.relatedPlaylists.watchLater properties now contain
values of HL and WL, respectively, for all channels.
To be clear, these properties are only visible to an authorized user
retrieving data about the user's own channel. The properties always
contain the values HL and WL, even for an authorized user retrieving
data about the user's own channel. Thus, the watch history and watch
later playlist IDs cannot be retrieved via the API.
...
The last part is pretty intriguing since I can't imagine how to obtain my WL id, hence I can't list the videos I've saved for later.
I checked also reddit and other SO questions (one, two, three, four) but without success. They usually suggest v2 or v3 before the mentioned revision.
The question: How can I obtain ids of my watch later videos?
I can only confirm what you already stated. If it is deprecated form API it is not possible to retrieve videos form that particular playlist. It is bound to be some ugly web scraping solution if it is a matter of getting it done no matter the cost.
Related
I've raised the following issue on Google's bug tracker on July 23rd 2019 and never got an answer if this will be fixed in YouTube's data API v3.
The problem is, that the current etag implementation of the YouTube data API v3 doesn't work for ChannelListResponse, PlaylistListResponse and PlaylistItemListResponse as the etag changes on each request, even if the data behind the corresponding request didn't change. This makes it impossible to cache this data and reduce the amount of API reuqests. The linked stackoverflow answer explains that the reason of this behaviour could be that the API gives back the items in another order per request and therefore sets a new etag.
How to reproduce:
Click this link and check the etag
Click the link again (multiple times) and you'll see that the etag changes from time to time
This etag beaviour works correctly on the PlaylistItemListResponse.Item entity (which is actually a video) where the etag stays always the same as long as the data of the video didn't change. So there are obviously different implementations how etags are handled on the YouTube data API v3.
Any idea if there's a workaround or if this issue will be fixed one day?
I'll try to answer to the following question:
Are there workarounds for the well-known issues of the etag properties of Channels.list, Playlists.list and PlaylistItems.list API endpoints?
1. The Channels.list endpoint
In case of Channels.list, the things are simple (yet not trivial), because this endpoint returns at most 50 Channel resources. (Usually only one, but when one is setting the value of id parameter as a comma-separated list of -- at most 50 -- channel IDs, then he/she will obtain several such resources from the endpoint.)
The simplicity comes from the fact that any such channel resource can be cached locally (in its original JSON text form received from the endpoint, or, otherwise, in any other form that retains all properties of this resource). Then, upon invoking the endpoint for a current server-stored resource, a structural (simple yet not trivial) difference operation can be applied for to see whether that resource changed and for to determine the exact changes that took place.
2. The Playlists.list endpoint
In the case of Playlists.list, the things are precisely analogous to those at point 1 w.r.t. the Channels.list endpoint.
3. The PlaylistItems.list endpoint
Things get more complicated when needing to keep track of the changes occurred w.r.t. the items of any given playlist. The PlaylistItems.list endpoint comes to use is such situation, but, unfortunately, several issues arise in this context:
Practically a playlist can grow to be huge (if only considering the uploads playlist of certain channels that have hundreds of thousands of entries).
By design, there's an upper 20000 limit set for the number of items returned via PlaylistItems.list when queried for a given channel's uploads playlist.
Due to the previous two bullets above, in cases, it's infeasible or even impossible to compute a set-theoretic difference between locally cached and remotely-stored list of items of a playlist. Thus, in the general case (i.e. when one is not considering the peculiarities of certain playlists), one cannot say with precision what are the items that were removed from, were added to and remained in the playlist.
The YouTube Data API provides no means to an user to determine which video items got deleted from a given playlist and when that happened. Yet that user may well determine which items were added to a playlist and when that happened by using the Activities.list endpoint.
Thus an user keeping track of changes occurring to a playlist can only answer partially to the set-theoretic difference question which solves his/her problem ideally.
A caveat of using the Activities.list endpoint is the following: the endpoint returns a whole set of type of activities that take place w.r.t. a given channel (as specified by the Activities resource). The type property enumerates them all:
snippet.type (string)
The type of activity that the resource describes.
Valid values for this property are: channelItem, comment (not currently returned), favorite, like, playlistItem, promotedItem, recommendation, social, subscription, upload, bulletin (deprecated).
Consequently, while monitoring Activities.list, the result sets obtained from the endpoint could well contain lots of noise when the API user is only interested in playlistItem activities.
I'm trying to sync teams and channels between Microsoft Teams and some internal database.
I noticed that:
Neither groups, nor teams, nor channels have a concept of "last modified time". The documentation suggests to use delta queries instead.
It seems that among these three resources, only groups support delta queries. When I try to use delta queries for teams or channels, I get an error.
Groups are not considered modified if a channel is added to (or removed from) a corresponding team. Also, if a channel is renamed, the teams' group is not considered modified either.
So questions:
Is it really not supported to get modified teams and/or channels? Or am I missing something?
Is it planned to add such a functionality to Microsoft Teams Graph API?
The situation is even worse than it seems on the first look, because even if I enumerate ALL the teams and ALL the channels, I cannot say which ones have been modified since last time I enumerated them, because they don't have anything like "last modified time", "version" etc. For instance, if I rename a channel (or edit its description), I won't be able to figure that out during subsequent sync.
At the moment the only Microsoft Teams entity that supports delta queries are Chat Messages in channels. See the documentation for supported entities across the Graph.
To request additional entities support, please go to uservoice and upvote existing ideas or create new ones.
We are developing a chat system where users can be in many chat rooms, and I'd like to be able to show the most recent channels first.
This could be either by the time the last message was sent, or even by the number of unread messages, as long as there is some order and I don't need to go through all the pages of channels and get additional metadata to sort it manually.
I can't see any options in the docs and even though the response metadata has a "key" set to "channels", I haven't been able to figure out a query parameter that can change that.
It seems like channels will always be returned ordered by the random unique channel ID, so for pretty much every use case you'd need to get all channels and sort manually. Is that the case or am I missing something?
Twilio developer evangelist here.
I'm afraid you cannot order the channels within the API right now. This feature is on the roadmap though, however I can't give any time estimates for it.
The solution for now is sorting manually. I will update once that changes though.
I have used Twitter API for fetching the tweets with a particular hash tag and all the data stored in my database.
I am currently working in core PHP.
API is working fine, thanks to Twitter
Now problem comes with the deleted tweets, Actually when a record of 100 latest tweets comes on my ajax file directly I store them in my database with a flag visible="y" . Now I want that if any of tweet stored in my database is being deleted from responsive twitter account automatically set visible = "N" into my database.
I searched a lot on internet but I could not find any respected answer.
Please reply me and ask me if any further information is needed.
Thanks to Stack Overflow for a good community.
The only way to do what you're suggesting, is to run some process that reads the tweets from your database and checks to see if they are still there.
You can call https://api.twitter.com/1.1/statuses/lookup.json and pass it a comma-delimited list of 100 tweets, and then compare the return value to your database to see if the tweets you asked for are still available or not.
You will have to iterate through your database 100 tweets at a time. Depending on how many tweets you are storing, you may run into rate limit issues.
You can make the status lookup call wit map parameter set to true. It will return null for deleted or protected tweets. It is more reliable way when compare to map set to false, because many a times lookup call doesn't return tweets even if it is not deleted (esp. for retweets).
In my current free-time project I am trying to fetch all songs from a given album.
Anyone, in Yahoo YQL, how is it possible to list all tracks of a given Release id?
You can influence what is returned as part of the results of queries to the music.release.id table by specifying a response value. In this case, you want track information for a release, so ask for tracks.
select * from music.release.id where ids="148083" and response="tracks"
Also see the Release Service and
Release List responses documentations.