Estimate The Number Of Videos On Youtube - youtube

How to estimate the number of videos hosted on Youtube?
A sample search on Google: site:www.youtube.com/watch return 1,080,000,000. By Using Youtube API gdata.youtube.com/feeds/api/videos/-/* and parsing tag (goto view source for example to do that), suggested on http://beerpla.net/2008/08/14/how-to-find-out-the-number-of-videos-on-youtube/ by Artem Russakovskii return only 1.000.000. He updated the figure under the page on August 2010 to an estimated 141 million to 144 million.
Any ideas?
Thanks in advance for any suggestion.
Randy

Related

Google Docs IMPORTXML exact data value

first of all: I'm completely new to this, I just started with XML/HTML an hour ago and I tried to import data from a website to work with it in Google Docs/tables. The website uses HTML and I try to import the exact value behind a displayed one and rounded version on the website i.e. for example instead of 86% displayed I want the value 0.8597.
In this example I try to grab the Playoff chances for every NFL team in the 2021 season, recent week, based of FiveThirtyEight's predictions.
First off, I import the team names using this formula:
=IMPORTXML("https://projects.fivethirtyeight.com/2021-nfl-predictions/"; "//table[#id='standings-table']/tbody/tr/td[#class='team']/span[#class='full']")
After that, I try to import the playoff chances with this formula:
=IMPORTXML("https://projects.fivethirtyeight.com/2021-nfl-predictions/"; "//table[#id='standings-table']/tbody/tr/td[#class='pct div']")
That returns the following:
TEAM
Playoff chances
Rams
86%
Buccaneers
83%
...
...
But I want this:
TEAM
Playoff chances
Rams
0.8597
Buccaneers
0.82702
...
...
The whole element with the values looks like this, in this case for the Los Angeles Rams (LAR) <td class="pct div" data-team="LAR" data-cat="make_playoffs" data-val="0.8597" style="background-color:rgb(36, 159, 219);color:#000;">86%</td>
Instead of the >86%< I want to receive the data-val="0.8597"
I tried to describe my problem as good as I can, I hope you can understand it. Thanks for anyone reading this or even answering!
-Daxelinho
In your situation, how about the following xpath?
Modified xpath:
//table[#id='standings-table']/tbody/tr/td[#class='pct div']/#data-val
and
//td[#class='pct div']/#data-val
Result:
When the above xpath is used, the following result is obtained.
In this case, the sample formula is =IMPORTXML("https://projects.fivethirtyeight.com/2021-nfl-predictions/", "//td[#class='pct div']/#data-val")

What does the number in codec section of YouTube "stats for nerds" mean

YouTube "stats for nerds" gives the information about the video being played. In the codec section it shows the mimetype and a number in bracket. What does this number mean.
And how to get the latest Itag table for reference.
After a bit of searching I was able to figure it out myself
The number in brackets is the itag number for the codec + container + Profile combination. It is a unique number assigned by YouTube to identify different video types.
As for the latest itag table I was able to get it from Wikipedia.

The Here API returns distance, what unit of measurement is the numeric in?

here API... "distance"... is it meters? Is it miles? Feet?
Using the API here.com I am able to get lots of great info, one item is the distance somewhere is from the supplied location in their search api. The documentation shows the distance as a text example output, but I can't find anywhere that explains what the unit of measurement is. Maybe all sites use meters and this is just a dumb question? Maybe I am just not that good at searching through the documentation and it wasn't as hard to find as it seems? Maybe you have worked with the Here API and just know the answer?
Any help would be appreciated!
-dan
As mentioned in their documents, they use meters
information about each route segment (interconnection) in between two consecutive waypoints including the distance between them in meters and the estimated time in seconds
check it out here press ( cmd + F for mac or ctrl + F for windows ) and paste the above sentence you should be able to see it.
UPDATE: Check also here they mention its meters
It is meters. Please use our documentation page to get information on all the request and response fields for any API - developer.here.com/documentation/versions

How to determine the mean duration of YouTube videos for specific search term?

I know YouTube is very closed and doesn't publish any detailed statistics, but I have a specific research interest to find out the length of arbitrary How-To videos.
When I search for that term I will get a few million results. Would it be possible to determine the playback duration for portions of the search results? Since the usage of the YouTube API is limited one could grasp a few videos per day and maybe with multiple API-keys.
Beside using the API there might be powerful scrapers I could use.
JS browser utility
I'd recommend you a simple JS utility to use in a browser dev tools. Read here how to use it for counting. I've modified it to count video length time.
The JavaScript code
So open a youtube search page and open your browser’s Dev tools (it’s F12 on PCs, Preferences -> Advanced -> Show Develop menu on Mac). Once they are open, go to Console (Console tab) and enter the following code:
function domCounter(selector){
var a = document.querySelectorAll(selector);
var hour = 0, min = 0;
for(var i=0; i<a.length;i++){
var time = a[i].innerHTML.split(':');
// console.log(time);
hour += parseInt(time[0]);
min += parseInt(time[1]);
}
return hour + Math.round(min/60);
}
How to find css selector
So to call it in a browser console you just hit:
domCounter('span.video-time')
Disclaimer
This utility works for one search page result though. You might get improve it to traverse pagination.
You won't be able to get the duration videos returned from the search endpoint without looking at the video duration for each one.
The search endpoint does, however, provide videoDuration parameter you can pass in to your request to only return videos of a specific duration range:
The videoDuration parameter filters video search results based on
their duration. If you specify a value for this parameter, you must
also set the type parameter's value to video.
Acceptable values are:
any – Do not filter video search results based on their duration. This is the default value.
long – Only include videos longer than 20 minutes. medium – Only include videos that are between four and 20 minutes long (inclusive).
short – Only include videos that are less than four minutes long.

Divide YouTube Video into different hyperlinks?

I have a YouTube Video (which was NOT uploaded by myself) with 50 min length:
The video talks about different contents, each content starts at different time for example:
content_x starts # 0minutes : 0Seconds
content_y starts #10minutes : 0Seconds
..etc
Now I would like to divide these contents according as hyperlink such that if i would like to watch any section, I can just click this link in the respective time (minutes & seconds).
I would prefer to do that in the description part for the YouTube video or in "About Section" so can you guide me how to do that? or any other simpler idea on how to reach different video contents in YouTube in dynamic and descriptive way?
You can append the time you want to the end of the youtube link
Eg
http://www.youtube.com/watch?v=XXX#t=31m08s
where 31m08s represents 31 minutes 8 seconds.
Similarly you can make links for the rest of the sections you want
Check this site : www.youtubetime.com it will generate a Youtube link with a specific starting time. Alternatively, tou can just write your time separated by spaces in a video's description (e.g.
very long description 0:00 part 1 1:00 part 2
etc... or you can write a comment with these time links and use it as an "index".
Hope that I've answered your question.
Right click the video and select Copy video URL at current time.
Then paste it anywhere.

Resources