I'm using YouTube API v3 and during searching i found strange behaviour:
https://www.googleapis.com/youtube/v3/search?part=snippet&videoCategoryId=10&fields=items(snippet(publishedAt))&key=MY_KEY&maxResults=50&type=video&order=date
Today was added just 2 movies in music category? Why i'm getting so small number of videos?
I copied your request and put my_key into that (with no functional change) and send it. I got 50 (max) result. I think you have another problem
Related
I have a task to parse links and titles from YouTube videos from one category (e.g. music).
I know that there's a huge amount of videos so that's my question. How to do it using for example nodeJS?
I have only one idea simply to use phantomJS and scroll scroll scroll down page to get as many videos as I can, but this solution is dumb.
Are there any other solutions, using YouTube API for example or other tools and methods?
https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoCategoryId=10&key=Your Key Here
try using this. First find out which category video id you need
How can I get recent comments in my media files from a date or id?
That is, I am interested in getting all the comments of any media file that have been published since a date or a comment id that I already have.
From what I've seen I should go through each media and go through all the comments it contains to find the new ones.
But this way does not seem right to me since I would have to make many calls going through the media and its comments again and again until I find a new one.
I have also seen that the subscriptions are not yet active for the media or comments, which would be great because it is what I seek to get the new comments, instead of having to go all the way through the same in search of some new.
Is there any way to do it?
There is no API currently to automatically get new comments from a bunch of media.
You have to get new comments from single media and compare manually for dates with code using this API:
https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN
Also note that this API only returns the latest 150 comments, so if the media is very popular and gets more that 150 comments, you have to time the API call at regular intervals and check dates so you dont miss out on some new comments
I'm trying to find all of the YouTube videos created by IGN's channel during the month of February 2014. IGN currently has 118,000+ videos uploaded, so going back through all of them is not possible. I previously used the following Google search string and a custom date range to find them:
site:youtube.com ignentertainment
This doesn't work anymore for some reason. I'd be much obliged if anyone has any ideas of how to do this. I have no idea what an API is, but if there's a VERY simple way of using that to do what I want that can be explained briefly, I'm willing to go that route.
Thanks.
You can use google to limit the period that it fetches search hits from.
Start by searching using "site:youtube.com ignentertainment" or simply "ignentertainment" and then click on the tools button, you now got a new bar between your search bar and the results that can limit time among other things.
Open the time related options and choose to input a specified period and your all done.
Edit: oh and the command site:youtube.com ignentertainment sure worked for me.
I recently read this article on how to scrape the Inbound.org community members profile using Excel. And you can watch the video here if you prefer it that way.
Since the release of this tutorial, the Inbound website structure has changed a bit, as you can see at minute 11:00 in the video, if you attempt to copy the XPath of the social media icons it appears slightly different and because of this I haven't been able to extract that information.
Here's what I get now:
/html/body/div[3]/div/div/div[1]/div/div[2]/a[1]/i
This is how I wrote the syntax in Excel:
=XPathOnUrl(A2,"//a[#class='twitter']","href")
And then like this:
=XPathOnUrl(A2,"//a[contains(#class,twitter)]/#href")
Although I tried in many different ways, none of them showed me the link to the member's social media profile.
I even tried changing the xpath in multiple ways to get different data from the page, but none of it was the social media information:
=XPathOnUrl(A2,"//*[contains(#class,member-banner-tagline)]/div[2]/div/div/div[1]/div/div[1]")
=XPathOnUrl(A2,"//*[contains(#class,member-banner-tagline)]/div[2]/div/div/div[1]/div/h1")
I honestly don't know what to try anymore, something's wrong and I can't figure it out. Anybody have enough experience with this or can pinpoint the problem here with my syntax?
Thanks a lot
The first formula you tried looks fine, but this is the one that works for me (SEO Tools version 4.3.4) :
=Dump(XPathOnUrl(A2;"//a[#class='twitter']";"href";HttpSettings(TRUE)))
I'm trying to do a search on the v3 api using this url:
https://www.googleapis.com/youtube/v3/search?part=id,snippet&channelId=UCtVd0c0tGXuTSbU5d8cSBUg&maxResults=10&order=date&q=game&key=[API_KEY]
but this returns me only one playlist.
When I do this search on youtube site directly it returns more results to me:
https://www.youtube.com/user/YouTubeDev/search?query=game
Why this happens, is there something wrong that I'm doing?
We ran into a similar issue when we tried to search for large amounts of content. This is especially evident if you set the time range you're looking for using publishedAfter and publishedBefore to a very small range (say for example 1 hour). Even when we get to very small result sets (you can only paginate around 20 times on the API using pageToken back when we tried it, so it was when our totalResults were less than 1,000), we were finding actually only as little as 540 items.
We reached out to YouTube and our contacts there confirmed that the totalResults are just an estimate, and are not actually accurate. You may get up to the amount of items specified, but there is no guarantee that you will get exactly that. Your best bet is to capture as much as you can, and scan for data using a different time range.
Source: Reddit
In the first one you are using search->list method. Which is searching for channels?
In the second one you are doing a playlist search inside the channel.
You can do the same on API via playlists->list.
(Or if you want the videos inside the channel straight, use videos->list)
Might be a bug. If so and not yet filed, you can file it here: https://code.google.com/p/gdata-issues/issues/list?q=label%3aAPI-YouTube
The problem seems to be caused by the parameter order=date.
Adding order to the "YouTube query" (using channel): https://www.youtube.com/channel/UCtVd0c0tGXuTSbU5d8cSBUg/search?query=game&order=date ,is not different. However omitting order from the "api request" gives the same result (6 items): https://www.googleapis.com/youtube/v3/search?part=id,snippet&channelId=UCtVd0c0tGXuTSbU5d8cSBUg&maxResults=10&q=game&key=YOUR-API-KEY-HERE
Note, that with using order=date in the api request only 1 item is shown, while the same response shows totalResults": 6 (which seems to be right). I did not try all, but using order=relevance does not give this problem.