I'm playing with YouTube API. Using the following URL: https://gdata.youtube.com/feeds/api/users/RayWilliamJohnson/uploads, how do I get the video URLs? The URLs all seem to have the schema https://. Shouldn't there be an http:// only?
Find <entry> tag, which gives each video's information. <id> tag inside <entry> should be what you need.
For example, <entry><id>http://gdata.youtube.com/feeds/api/videos/u5yEXai8MoQ</id>
Related
I hope that I am posting using the right tags.
I added the dash.js player to a page in my website
I did create some mpd files from mp4 ones.
I wanted to know how can I generate URL for these files so that my app can access them.
In case it will help I am using Apache2 to serve my application.
The mpd file provides an index with pointers to the individual steams for your video - e.g. the different bitrate video files, the Audi stream, and subtitles etc.
The pointers in the mpd file are relative or absolute URL's which the client, e.g. the browser can access.
To allow the browser access the mpd itself you just have to put it someplace in your server file structure that clients can access, or that the server will redirect client requests for video to.
The online apache documentation provides an overview of how you can match URL requests to file locations:
https://httpd.apache.org/docs/trunk/urlmapping.html
SoundCloud's API has a nice endpoint for submitting a permalink and getting back information about the media there.
Given the many YouTube URL variants (i.e. http://www.youtube.com/watch?v=-<someID>, http://youtu.be/-<someID>, http://www.youtube.com/v/-<someID>?version=3&autohide=1, etc...) is there a way to request a Video Resource given a URL?
You can use Videos: list which returns a list of videos that match the API request parameters.
HTTP request:
GET https://www.googleapis.com/youtube/v3/videos
You can also add query parameters and additional properties in your HTTP request for multiple video resources properties as given in the documentation.
Sample requests to the YouTube API are shown in Sample API Requests.
https://www.googleapis.com/youtube/v3/videos?part=snippet&id={VIDEO_ID}&key={YOUR_API_KEY}
I notice in the head section of www.youtube.com that the meta property="og:image" content is not a valid URL...
There I read: //s.ytimg.com/yts/img/youtube_logo_stacked-vfl225ZTx.png
A good one and the one which is readable by my browser is:
http://s.ytimg.com/yts/img/youtube_logo_stacked-vfl225ZTx.png
I am interesting to know why Google did this choice?
Thanks from France!
The url that Google chose is called a protocol-less url. Depending on which protocol you are accessing youtube.com (i.e. http or https), the protocol of the image will change. So if you check you can actually access the image both by http or https.
More interestingly even though facebook linter gives error, when you share the youtube.com home page on facebook, it actually picks the correct image.
Hope this helps.
I need to get the video/playlists/show data from youtube.com.
Example :
http://www.youtube.com/channel/SWMb9NxQL9I6c
http://www.youtube.com/show/mtvroadies9/featured
Is there a way I can get the video details for the above URL using the youtube API?
Yes, using:
https://developers.google.com/youtube/v3/docs/channels
e.g.
https://www.googleapis.com/youtube/v3/channels?part=snippet&id=SWMb9NxQL9I6c&key={YOUR_API_KEY}
You need to look at the YouTube Data API. You will find there documentation about how the API can be accessed. You can also find client libraries.
You could also make the requests yourself. Here is an example URL that retrieves the latest videos from a channel :
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20"
I am trying to filter tweets from the Streaming API using a url in the track parameter. However I'm not getting the tweets I expect. My suspicion is that the filter doesn't apply to the expanded url and but to the automatically shortened url (t.co).
Can anyone confirm that this is the case? The Streaming Api docs don't even mention how the filtering is applied.
If this is the case does anyone have a workaround?
I'm using the extended URL with cURL. I get the live tweets on my terminal for a particular search parameter. You may like to look into this one.
curl https://stream.twitter.com/1/statuses/filter.json?track=SEARCH_PARAMETER -uUSERNAME:PASSWORD