API を確認すると、 YouTube Data API v3 Videos に次の記述があります。つまり、 activeLiveChatId があるのは配信中のみです。
liveStreamingDetails.activeLiveChatId
string
(省略) This field is filled only if the video is a currently live broadcast that has live chat. Once the broadcast transitions to complete this field will be removed and the live chat closed down. (省略)
{
"error": {
"code": 403,
"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.",
"errors": [{
"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.",
"domain": "youtube.caption",
"reason": "forbidden",
"location": "id",
"locationType": "parameter"
}]}}
[pid 11360] stat("/home/linuxbrew/.linuxbrew/bin/date", 0x7fffccf3db80) = -1 ENOENT (No such file or directory)
[pid 11360] stat("/usr/local/sbin/date", 0x7fffccf3db80) = -1 ENOENT (No such file or directory)
[pid 11360] stat("/usr/local/bin/date", 0x7fffccf3db80) = -1 ENOENT (No such file or directory)
[pid 11360] stat("/usr/sbin/date", 0x7fffccf3db80) = -1 ENOENT (No such file or directory)
[pid 11360] stat("/usr/bin/date", {st_mode=S_IFREG|0755, st_size=108920, ...}) = 0
2-6. 標準入力をシークしなおし、 date を実行する
ここがポイントである。 読みすぎた標準入力のシーク位置を巻き戻している。 次の read でちょうど yarn gen 以降が読み込める位置だ。
clone でまた子プロセスを生成し、 bash は子プロセス終了を待つ。子プロセスは execve によって date に置換され実行されているが、詳細は省く。
同一ドメインに複数の A レコードを設定する。なお、 IP アドレスは RFC5737 で規定されている仕様書やドキュメント向けの IPv4 アドレスであり、接続はできない。
$ dig roundrobin.nyamikan.net A
; <<>> DiG 9.16.1-Ubuntu <<>> roundrobin.nyamikan.net A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49795
;; flags: qr rd ad; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;roundrobin.nyamikan.net. IN A
;; ANSWER SECTION:
roundrobin.nyamikan.net. 0 IN A 203.0.113.1
roundrobin.nyamikan.net. 0 IN A 203.0.113.3
roundrobin.nyamikan.net. 0 IN A 203.0.113.4
roundrobin.nyamikan.net. 0 IN A 203.0.113.2