How to get a specific YouTube comment? - php

I am trying to get a specific comment from a YouTube video. For example I want to get the details from the 34th comment of a YouTube video. Does anybody knows how can I do this without reading all the comment list?
Or if there isn't available any solution for retrieving only one comment, can you get a list with all the comments from a YouTube video? (I used the API method commentThreads but it has a limit of 100 comments within a call).
Btw, I read this How to get a specific comment of a youtube video? , but maybe the answer is outdated.

Just use https://www.googleapis.com/youtube/v3/comments to get specific comment from a video like
https://www.googleapis.com/youtube/v3/comments?part=snippet&id={COMMENT_ID}&textFormat=html&key={YOUR_API_KEY}
Use the ID that is specific for every comment and the API Key on your Google Developer Console. You can get the commentID clicking on the timestamp link beside the commenter's name.

Related

API YouTube link in PHP

I could see that in the past, we could retrieve for example the most viewed Youtube videos using this link (http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed)
But I think that link no longer works.
So I don't know how to retrieve the most viewed, most liked Youtube videos, search for a video using keywords...
I tried to watch directly on "https://developers.google.com/youtube/v3/docs/videos" but without any success
So I found this link which allows to retrieve the info of the videos thanks to a Youtube api key and one or more search keywords
https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=10&order=relevance&q=KEYWORD&key=APIKEY

eBay API - retrieve image by specific URL

I would like to ask you. How to retrieve image by the specific URL (that I already have)? I found a lots of articles about how to retrieve images and items by some keywords etc. but I don't need that search.
I tried to make a crawler to get the image, but it's impossible until I don't use the ebay API (the url to image is hidden).
Is it possible to retrieve images even if I don't want to use ebay AppID, so just somehow crawl the page?
I am not sure what solutions I can get, but I need to use it with PHP
Without API you can just use
http://i.ebayimg.com/images/i/1234567890123-0-1/s-l250/p.jpg
http://i.ebayimg.com/images/i/[EbayId]-0-1/s-l[width]/p.jpg
Here is an example of how to get the pictures via the API, just replace your appid and the item id you want (the pictures are in Item->PictureURL):
http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=JSON&appid=YOURAPPID&siteid=0&version=939&ItemID=ITEMID

Youtube API - Grab screenshot of a video at a specific time

I am looking to generate a high definition screenshot of youtube video at a specific time. Say I have the Youtube video ID (ctiJc4yEVow) and I want a screenshot of what appears at 1:32. Is there a clean and easy to implement way to do that? I have read way of using ffmpeg and some misc sloppy code, but nothing reliable.
The only thing I have seen is how to generate an image for a video, unspecific to any time.
https://i1.ytimg.com/vi//default.jpg
My issue is I need a specific time. Please help!
I don't see any way to do this within the official API. Their Videos:list and Thumbnails
pages don't offer any way to do this.
That said, you could link to the time you want, then screenshot that. This would work best with YouTube's autoplay turned off. Example link based on your post: youtube.com/watch?v=ctiJc4yEVow&t=1m32s

Is it possible to alter the source video a youtube ID refers to?

Using the Zend_Gdata php library, is it possible to edit an existing youtube video entry to have a new source video? The use-case is I'm ebedding a timelapse recording of construction work, and I'd like to update the video each evening without changing the embed link each time.
If this is not possible, is there another way I can achieve this without requiring the embed code to be changed each day?
You can use a playlist, and update the playlist elements all days without changing the embed code. You can use the YouTube Data API to change the playlist elements:
https://developers.google.com/youtube/v3/docs/playlistItems

Adding time-stamp to image of youtube video

What I'm trying to do is get the exact look of the videos on the youtube homepage (image: click here) including the time-stamp.
If you look in the source code, you'll find a link to the image of the video, however, I can't quite figure out how to get the time-stamp of the video and format it exactly how youtube has it simply from a youtube link (in this case: http://www.youtube.com/watch?v=IpBNr-oNT1g). I take it this would be done with PHP, but how?
Thanks!
http://itwigle.com/twig/Capturing_video_thumbnails_with_PHP
is this what you're looking for?

Categories