Created
May 27, 2020 02:38
-
-
Save mtfurlan/80dc5b5956b5f69a20485e990b3069e9 to your computer and use it in GitHub Desktop.
parse google takeout youtube watch history to list of channels with number of videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tidy ./Takeout/YouTube\ and\ YouTube\ Music/history/watch-history.html 2>/dev/null | perl -ne '$_ = $_ . <> if /youtube\.com\/channel[^<]*(?!<\/a><br>)$/m; if( /youtube.com\/channel\/[a-zA-Z0-9]*">([^<]*)/) {$data = $1; $data =~ s/\n/ /g; print "$data\n";} ' | sort | uniq -c | sort -bnr | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment