Does anyone know how the youtube is able to determine if a video is coming from youtube or twitter? For example, looking at the video stats for http://www.youtube.com/watch?v=UrbHykKUfTM , youtube is able to give the number of counts for referral from facebook.
Here is a link that gives referral from twitter:
http://www.youtube.com/watch?v=26d9HLsURPM
I look at the URL from youtube's twitter share button, it don't seem to have any URL parameters that can alert youtube of where it is coming from.
http://twitter.com/share?count=horizontal&original_referer=http://www.youtube.com/watch%3Fv%3DUrbHykKUfTM&text=Check%20this%20video%20out%20--%20X-Men:%20First%20Class%20-%20Official%20Trailer&url=http://www.youtube.com/watch%3Fv%3DUrbHykKUfTM&via=youtube
HTTP has a Referer: field; considering the URL has the same misspelling as the HTTP spec's field, that's probably where they're getting it from.
Related
If someone on my website sent a POST request with some data, how would I redirect that to another API in Ruby on Rails? I am trying to make a rails website where a user on my website can input some data like a title, body text, some media and send that to the APIs of social media platforms like Facebook, Instagram, Pinterest, YouTube, TikTok, LinkedIn, and Twitter. So the user can connect their accounts and create a post or a video on that social media platform from my website. Is that possible, and if so, can someone help me with how I do that entire thing from my website? Thanks.
I didn't try a lot of things since I don't exactly know what to do.
I have a app with button as like-button of youtube and videoId of a video.
Before I get sessionid, cookies from webviewclient with a google account.
How to like that video then video appear in my likelist video in youtube without Youtube API?
I am grateful for any help.
the Video.rate method will allow you to submit a like or dislike on a video though the YouTube API.
This method does not require an API key it does though requier authorization
You Will need to use Oauth2 to authorize the user to your application who will be making the link
Using one of the following scopes.
I need to use youtube username in a javascript script that retrieves data from youtube API with username
the problem is that this channel has a custom url in format:
https://www.youtube.com/c/myname
but from tutorial and video i found i need to get the user from a custom url like this
https://www.youtube.com/user/myname
since, as far as i know, is not possible to set an url and surname based on second url for newer channel how can i found the username?
any way to get it with API?
youtube.channels.list does NOT provide the username. you have to use Google+ API to get it.
tube_dl is the answer.
pip install tube_dl
This module is a great video downloader and youtube parser.
Here's the sample code:
from tube_dl import Youtube
yt = Youtube('your video id').channelUrl
For tube_dl documentation, visit Github Page of tube_dl
You can try out the Channels.list method on the YouTube Data API. You can pass the username and it will return the list of channels that said user have.
The YouTube Data API developer site has more information if you want to learn more about it.
How can I form requests using the youtube api to get the videos from a channel as an rss feed?
I read this question, where a link to the new api (V3) is given, but I couldn't find it there. I tried with the deprecated syntax from api v2:
https://gdata.youtube.com/feeds/users/UCqAEtEr0A0Eo2IVcuWBfB9g/uploads
but it only works sometimes.
I also tried:
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20
where I enter the channel id and the search key, but I get a 'bad request' error.
To answer the question in the headline:
Pre-append https://www.youtube.com/feeds/videos.xml?channel_id= to the channel unique identifier.
For example, lets assume that the channel url is https://www.youtube.com/channel/feed/UCpjNXONNE-JUz74ACsRCgcw. So the rss feed URL would be https://www.youtube.com/feeds/videos.xml?channel_id=UCpjNXONNE-JUz74ACsRCgcw.
I found that there is a api for user:
To request a feed of another user's favorite videos, send a GET request to the following URL. Note that this request does not require authentication.
https://gdata.youtube.com/feeds/api/users/userId/favorites
is there a api for video?, for example:
https://gdata.youtube.com/feeds/api/vidoes/videoId/favorites
I can't find anything in the Data API reference which would suggest that it is possible to read who liked a video, only how many people did: https://developers.google.com/youtube/2.0/reference and https://developers.google.com/youtube/2.0/developers_guide_protocol_ratings