Cracking the YouTube Views Counting Algorithm

You can say, I am the El Chapo Guzmán when it comes to beating the YouTube views counting algorithm. Everyday, they come up with new updates to stop me but I always stay ahead of the game – Watching over them and laughing at their pathetic moves of trying to stop me.. This pretty much sums up how good I am really in this game.

youtube views script tutorial

There is a lot of information present on internet no matter whatever you search for. However when it comes to making script for youtube views, there is little to none information. Even still if you manage to find something, it will be outdated [shared ages ago]. So today, i decided to shed some light on the basics of how it is done – I am not going to reveal all the steps one by one.. What I will do is share some of the basics so the people trying to find a way around can get some idea how it is done. If you are here to be spoon-feeded then this is not for you.

Before we start, make sure you have the following:

  1. Fiddler – It is available totally free here. It is your choice: Either you download the .net 2 version or the .net 4 version. In terms of functionality, both work good.
  2. Programming language – You must be good at javascript as this is what being used for making youtube views script.
  3. A video – Just upload a dummy video of short length. Aim for 20-30 seconds as this will make things easy for you. Uploading a longer duration video means you will have to deal with a lot more code.

Now you will need to embed your video on a website. You can also embed it in a blogspot blog easily. The reason of embedding the video is that making a script for embedded views is more easy as compared to watch page. Watch page views is a whole different story to be honest.

Once embedded, fire up the fiddler and load the site/blog where you embedded the test video. Let the video finish from start to the end – Now this is where all the fun begins so hold tight, grab your coffee and get ready!

You will see a lot of requests in the fiddler… Now the main idea is to grab those requests, generate functions for the variables such as plid, ei, cpn etc. and turn the whole thing in the form of a script.

Look at this example script here: http://pastebin.com/b6eiC4WU .

The above given script is just an example. It is outdated and don’t really work but will give you a fair idea on how all the stuff works. The script given above is based on very old requests and these days, you will need to do a lot more to get views being counted.

First, make a solid function for generating the plid. Just putting random numbers will not get the job done to be honest.

2nd most important thing is generating the EI function. This will get real tough and probably will take a long time to crack how it works. [hint] To be honest, you don’t really have to generate these things. Just look at the url parameters of google search query [/hint].

Now the way your script should sent the requests should be like this:

get_video_info?eurl=

/ptracking?pltype=contentugc

/api/stats/playback

/api/stats/watchtime

etc.

Also, after the recent updates, it is important to send stream requests too! Last year, it was enough to just send the playback and watchtime requests. Now you got to send ptracking and stream requests too!

To help you guys out, I am going to give some amazing functions for generating some of the variables:

Here is the CPN function:

function Qv() {
 var Ov;
 if (void 0 == Ov && (Ov = !1, window.crypto && window.crypto.getRandomValues))
 try {
 var a = new Uint8Array(1);
 window.crypto.getRandomValues(a);
 Ov = !0
 } catch (b) {
 }
 return !!Ov
}
;
function Rv() {
 var a = Array(16), b = new Uint8Array(16);
 window.crypto.getRandomValues(b);
 for (var c = 0; c < a.length; c++)
 a[c] = b[c];
 return a
}
function Sv() {
 for (var a = Array(16), b = 0; 16 > b; b++) {
 for (var c = F(), d = 0; d < c % 23; d++)
 a[b] = Math.random();
 a[b] = Math.floor(256 * Math.random())
 }
 return a
}
function Tv() {
 for (var a = Qv() ? Rv() : Sv(), b = [], c = 0; c < a.length; c++)
 b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".charAt(a[c] & 63));
 return b.join("")
}
var cpn = Tv();

Remember, this exact function was ripped from the YouTube html5 player source code so it functions exactly the same way, youtube does.

If you want to try out mobile youtube views, then use this plid function:

[mobile plid is different then the PC!]

<script type="text/javascript">
function Ni(a, b) {
 return a.toString(36) + Math.floor(Math.random() * b).toString(36)
}
var C = Date.now || function() {
 return +new Date
};
var plid = Ni(C(), 1E13);
document.write(plid);
</script>

Now go and get your hands dirty… As that’s the only way to crack the youtube views system. This post was not only meant for those, who want to get some help. I am in no way going to spoonfeed anyone and also, just don’t ask for my scripts. Such things are not the type that should be givenaway. You got to work for that!!!

 

One thought on “Cracking the YouTube Views Counting Algorithm”

  1. Hello Umer,

    i want to increase auto count of youtube views. can you please help for this. i am new to use youtube api. so please guide me from basic step.

    Thanks
    Amit

Leave a Reply

Your email address will not be published. Required fields are marked *