Start Writing about it. that's how I stopped it. This is the format I followed. (Write the corresponding detail in every row and for each tick - write the entry )
1) Tick mark (whenever you watch youtube)
2) Time (write the time when you started watching and when finished)
3) State (what were you thinking/doing just before you were watching)
4) Action after (what you did after watching)
5) where (where you were watching)
6) Total (approximate total time watched today)
7) This weeks total: How many hours in this week- write every week)
For example
1) Tick : Tick1, tick2, tick3, tick4
2) Time: 8am, 12:30pm, 6:30pm, 11pm
3) State: for news, lunch time-pass, came from college timepass, while sleeping
4) Action After, ready for college, classes, nothing dinner, slept
5) Where: bed, canteen, couch, bed
6) total: 5+ hours
7) This week's total: 38 hours
I wrote this for almost a month and found out that most of the time I was spending on you tube is during breakfast and another is before sleep on bed. So I cut down these two things first.
Note: If you can quantify a problem, you can solve the problem..