Search limit with Dailymotion API - dailymotion-api

I want to use Dailymotion API in order to search videos. I have read the documentation and I have not found any answer to my question.
Are there limits with the search query Dailymotion API ?
https://developer.dailymotion.com/api#video
"While some basic features are available without authentication, you will need to register yourself as a developer in order to perform more elaborate API calls, authenticate users and act on their behalf."
Is the "search videos" a basic feature ?
Thank you very much

Here is the answer to your question: https://developer.dailymotion.com/api#rate-limit
Basically, so far dailymotion API only enforces quotas on video upload and on field to get stream (this is very limited). There is no restriction on the search query.
You need to register to dailymotion to get an API key, which will be useful for calls that require authentication.

Related

Dailymotion API Usage

I am just hitting below mentioned url of Dailymotion api to search for a video and then use video id to be played in videoplayer provided by daily motion.
https://api.dailymotion.com/videos?fields=description,id,taken_time,thumbnail_180_url,title,url,views_total,&search=kohli&limit=100
I am hitting this without any API key. Is there any limit for only this kind of usage?
There is no limit defined anywhere in Dailymotion API Documentation. API key is required for special requests like to generate access token, to get user information after logging in, to upload videos, mostly for authentications etc.

Is it possible to access the live tweets of a user using tweepy?

I am trying to access live tweets of a user whenever he tweets it. So, all I want is something that continuously monitors a user account and whenever he tweets something I have to capture it. All the tweets are random so I cannot use any filters.
For any security reasons, if I cannot access other's tweets can I do it on my own account?
With tweepy you can connect to the REST API or the Streaming API.
Using the Streaming API you can use the filter endpoint to select the users you wish to follow with that streaming connection and you will receive updates as they get published.
Twitter's documentation: https://dev.twitter.com/docs/api/1.1/post/statuses/filter, tweepy's code: https://github.com/tweepy/tweepy/blob/master/tweepy/streaming.py
Tweepy's documentation doesn't give examples on the Streaming functions but you can find sample code searching at GitHub or StackOverflow for "tweepy filter follow".
Tweepy talks to the Twitter REST API, and the REST API doesn't have any way to react to someone posting a tweet.
HOWEVER...
You could certainly write an application that retrieves the tweets of a partcular user and looks for any tweets that weren't there the last time you checked.
You'd want to be cautious about how often you check so you don't run afoul of the API rate limits.

Retrieving Dailymotion popular videos

I want to retrieve popular videos on Dailymotion without login. Youtube has an API for the same. Is there any API available to perform this task?
You need to use the "sort" parameter with rated, visited ...
Something like https://api.dailymotion.com/videos?sort=visited
See here for more infos.

Using YouTube API v3 to tell if a channel has a live stream

The goal of my YouTube API call is, given a channelId, to return whether that channel is currently live streaming. This is the call I'm making currently:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANNEL_ID}&eventType=live&type=video&key={YOUR_API_KEY}
While this call is functional, there is a significant delay between the channel starting a live stream and this call returning the stream.
Is there a better call to use in the YouTube v3 API that doesn't require oAuth? The functionality of my app is read-only.
Thanks!
Probably late but still someone else would use it, i found the answer on google api docs:
https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
(Scroll to bottom, you can use their onsite api to make calls on the fly)
The call you have to make is:
GET https://www.googleapis.com/youtube/v3/liveBroadcasts?part=id%2Csnippet%2Cstatus&mine=true&broadcastStatus=active&key={YOUR_API_KEY}
(atm, they have an issue wth the status field). You can remove the filter and check the returned results for
{ "status": { "lifeCycleStatus": "live"}}
And as per google docs:
Before you start
You need a Google Account to access the Google Developers Console, request an >API key, and register your application.
Register your application with Google so that it can submit API requests.
After registering your application, select the YouTube Data API as one of the >services that your application uses:
Go to the Developers Console and select the project that you just registered.
Open the API Library in the Google Developers Console. If prompted, select a >project or create a new one. In the list of APIs, make sure the status is ON for >the YouTube Data API v3 and, if you are a YouTube Content Partner, the YouTube >Content ID API.
Calling the Data API
The API request must be authorized by the Google Account that owns the >broadcasting YouTube channel.
You can check this link for generating an access(OAuth 2.0) token: https://developers.google.com/identity/protocols/OAuth2?hl=en
I hope this helps.
I was digging for a "cheaper" way to find if a channel is live to save some API quota. I attempted to use Konstantin's workaround by looking at the {channel/channel_id}/live but this appears to not work anymore.
The channel no longer redirects when a person is live. Instead it runs on that page.
If they have a username URL then /c/ works: https://www.youtube.com/c/USER_NAME/live
If they have don't have a username and use the default like UC4R8DWoMoI7CAwX8_LjQHig, then you need to use https://www.youtube.com/channel/USER_NAME/live
The /search call is rather expensive. If you are only allotted the initial 10k quota points, you'd run out of points after only 100 queries. That may not be a bother for some use cases, but it is nevertheless limited.
Instead, you can use Playwright and do the following:
page.goto("https://YouTube.com/channel/{channel id}/live")
Then check for a redirection which will happen when the channel is live:
const redirect = page.url()
If redirect contains a link to a YouTube video, then you know the channel is live. Otherwise it is not live and will yield a link similar to the one that's passed in to the goto() function.

How to allow users to upload video from my website to my youtube account?

Is it possible to allow uses to upload video to my youtube account with v3 api? I want allow users to upload video through my website to youtube but not ask them to login to their youtube account. I know it was possible in v2 api. Is it also doable in v3 api?
I've tried so hard to do the same thing as you /w the v3 API. The principal difficulty is to set our credentials in the code. With the v3 API, all the old login methods are "deprecated", to lead place to oAuth V2 login method.
In the API, i've didn't found a parameter where to set credentials. I hope you can find it. Let me know if this is the case.
If you success to create an httpClient object /w your credentials, this is perfect, the code is easy after doing this.
In the case you seach the right code for the v2 version : here
Good luck :)
I'm digging into this question now, too. So far, one workaround is to use the email upload option (found within Youtube's settings once logged in).
There's a limit of 25mb here so it's probably just a temporary proof of concept but powerful enough for smaller vids (mixed with FFMpeg tools wrapped for the language of your choice, I'm using Node.js http://www.benfarrell.com/2012/06/14/morph-your-media-with-node-js/)
Ideally, I want a user to upload a vid, store it in RAM, and then get it pushed to my youtube channel. We'll see what we find...

Resources