白宫YouTube不喜欢操纵

2021-01-28 22:26:23

我看过YouTube的屏幕截图,修改了对白宫视频的厌恶。我决定自己做一个彻底的分析。我编写了一个脚本,用于每隔80秒检查一次视频状态,持续24小时-白宫YouTube频道上的所有视频。

收集的数据在此处和此处存档。格式为以空格分隔的“ CSV”,如下所示:

https://www.youtube.com/watch?v=2bpSkdYUtNU 1611771197 01/27 / 2021,13:13:17 1227 437 2963https://www.youtube.com/watch?v = 2bpSkdYUtNU 1611771285 01/27/2021 ,13:14:45 1463 441 2999https://www.youtube.com/watch?v = 2bpSkdYUtNU 1611771372 01/27 / 2021,13:16:12 1763 449 3030https://www.youtube.com/watch?v = 2bpSkdYUtNU 1611771459 01/27 / 2021,13:17:39 2476 455 3060https://www.youtube.com/watch?v = 2bpSkdYUtNU 1611771546 01/27 / 2021,13:19:06 2640 459 3098https:// www .youtube.com / watch?v = 2bpSkdYUtNU 1611771720 01/27 / 2021,13:22:00 3588 470 3183https://www.youtube.com/watch?v = Fxo3OHKjfxs 1611699362 01/26 / 2021,17:16: 02 918 405 4942https://www.youtube.com/watch?v = Fxo3OHKjfxs 1611699448 01/26 / 2021,17:17:28 1202 412 4976https://www.youtube.com/watch?v = Fxo3OHKjfxs 1611699534 01 / 26 / 2021,17:18:54 1375 415 5026https://www.youtube.com/watch?v = juqHZYKzyx0 1611766646 01/27 / 2021,11:57:26 255 375 1771https://www.youtube.com/观看吗?v = juqHZYKzyx0 1611766733 01/27 / 2021,11:58:53 455 380 1823https://www.youtube.com/watch?v = juq HZYKzyx0 1611766819 01/27 / 2021,12:00:19 455 383 1852https://www.youtube.com/watch?v = juqHZYKzyx0 1611766906 01/27 / 2021,12:01:46 819 387 1886https:// www。 youtube.com/watch?v=juqHZYKzyx0 1611766992 01/27 / 2021,12:03:12 1148 393 1932https://www.youtube.com/watch?v = juqHZYKzyx0 1611767079 01/27 / 2021,12:04:39 1462 397 1971https://www.youtube.com/watch?v = juqHZYKzyx0 1611767166 01/27 / 2021,12:06:06 1830 398 2019https://www.youtube.com/watch?v = ucvgAZG_IT4 1611770591 01/27 / 2021,13:03:11 1587 83 2040https://www.youtube.com/watch?v = ucvgAZG_IT4 1611770764 01/27 / 2021,13:06:04 3014 95 2114

在某些情况下,“喜欢+不喜欢”大于观看次数。尽管这似乎是不可能的,但是Youtube更新视图的速度较慢,因此它们当时无法反映真实的视图。例如:

https://www.youtube.com/watch?v=jw1_00uI02U 1611720090 01/26 / 2021,23:01:30 44404 924 8099https://www.youtube.com/watch?v = jw1_00uI02U 1611720176 01/26/2021 ,23:02:56 44404 924 8118https://www.youtube.com/watch?v = jw1_00uI02U 1611720260 01/26 / 2021,23:04:20 44404 925 8132https://www.youtube.com/watch?v = jw1_00uI02U 1611720345 01/26 / 2021,23:05:45 44404 925 8151https://www.youtube.com/watch?v = jw1_00uI02U 1611720429 01/26 / 2021,23:07:09 44404 925 8168https:// www .youtube.com / watch?v = jw1_00uI02U 1611720514 01/26 / 2021,23:08:34 44556 925 8184https://www.youtube.com/watch?v = jw1_00uI02U 1611720599 01/26 / 2021,23:09: 59 44556 925 8199https://www.youtube.com/watch?v = jw1_00uI02U 1611720683 01/26 / 2021,23:11:23 44556 928 8219https://www.youtube.com/watch?v = jw1_00uI02U 1611720768 01 / 26 / 2021,23:12:48 44556 928 8237

因此,当观看次数保持不变时,喜欢和不喜欢的内容有可能会累积。最终,视图跳起来更好地反映了现实。

图表的时区为UTC(伦敦)。您是否注意到06点(美国东部时间凌晨1点)急剧下降?到那时,大多数劳动人民都入睡了。巧合?我觉得不是。

#Zoe Phin,2021/01 / 26require(){sudo apt-get install curl gnuplot; } stats(){list = $(curl -s' https://www.youtube.com/c/WhiteHouse/videos' | grep -o' watch?v = [^&# 34;] *')for $ list中的i;做link =" https://www.youtube.com/$i" date = $(date +"%s%x,%R:%S" | tr -d' \ n')curl -s $ link | tr -d',' | tr'}' ' \ n' >新grep -m 1 -o' [0-9,] *视图'新> .views grep -m 1 -o' [0-9,] *喜欢'新> .likes grep -m 1 -o' [0-9,] *不喜欢'新> .dislikes粘贴.views .likes .dislikes | awk -vL = $ link -vD =" $ date" ' NF == 6 {printf"%s%s%9s%9s%9s \ n",L,D,$ 1,$ 3,$ 5}'完成} collect(){而为true;进行统计;睡眠75完成| tee -a data.csv} dislikes(){list = $(cut -c1-44 data.csv | sort -u)for vid in $ list;回显$ vid grep ^ $ vid data.csv | awk' {DiffD = $ 6-D if(DiffD< 0){printf"%s%+ 7d \ n&#34 ;, $ 3,DiffD DLost + = DiffD} L = $ 5; D = $ 6} END {printf"%-19s%7d \ n&#34 ;," Total&#34 ;, DLost}'回声完成| awk' {打印} $ 1 =="总计" {GT + = $ 2} END {printf"%-17s%9d \ n&#34 ;," Grant Total&#34 ;, GT}'} plot(){list = $(cut- c1-44 data.csv | sort -u)令n = 0为$ list中的vid;不要让n ++ awk -vV = $ vid' $ 1 == V {print $ 2" " $ 4" " $ 5" " $ 6}' data.csv> plot.csv echo"设置项png大小740,740设置键左上方设置网格xtics ytics设置标题' $ vid'设置timefmt'%s'设置xdata时间设置xtics格式'%Hh'绘制' plot.csv' u 1:2 t' Views ##; w线lc rgb' black' lw 2,\'' u 1:3 t喜欢w线lc rgb'绿色' lw 2,\'' 1:4不喜欢w行lc rgb' red' lw 2" | gnuplot> example $ {n} .png完成}