https://4y4m3.hatenablog.com/entry/20180703/1530625951
- see "theoplayer.d.js:formatted" in "Sources" tab (Chrome Developer Mode)
- check the very last fragment of the code
var n = t.data; # L6627
switch (n.zgt) { # L6628
...
}
- set a breakpoint to L6628
- play your video
- the breakpoint (3.) is activated
- eval the following line in Console (Chrome Developer Mode)
Array.from(t.data.iyt,function(byte){return "0x"+('0' + (byte & 0xFF).toString(16)).slice(-2);}).join(' ')
- download the printed hex string as a file "license.dat" (using http://tomeko.net/online_tools/hex_to_file.php?lang=en)
- find the playlist.m3u8 in "Network" tab and download it
- open "playlist.m3u8" with your editor and replace the key URI of AES-128 with "license.dat"
- replace all appearances of "/tspg/" with "https://vod-abematv.akamaized.net/tspg/" in "playlist.m3u8"
- download the video with the following command
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -allowed_extensions ALL -i playlist.m3u8 -c copy output.ts