sh/ネタ/AFN配信URL_v1
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* 最終形 [#b9650620]
** ワンライナー [#s680516a]
curl -sSL https://www.afnpacific.net/afn-360/ | grep -woE...
** 出力例 [#hbba5b8d]
#pre{{{
http://19793.live.streamtheworld.com/AFNP_DGU.mp3
http://14613.live.streamtheworld.com/AFNP_DGUAAC.aac
http://19213.live.streamtheworld.com/AFNP_IWA.mp3
http://14943.live.streamtheworld.com/AFNP_IWAAAC.aac
http://23603.live.streamtheworld.com/AFNP_KSN.mp3
http://19213.live.streamtheworld.com/AFNP_KSNAAC.aac
http://18393.live.streamtheworld.com/AFNP_MSW.mp3
http://19213.live.streamtheworld.com/AFNP_MSWAAC.aac
http://17853.live.streamtheworld.com/AFNP_OKN.mp3
http://21233.live.streamtheworld.com/AFNP_OKNAAC.aac
http://19793.live.streamtheworld.com/AFNP_OSN.mp3
http://14613.live.streamtheworld.com/AFNP_OSNAAC.aac
http://20853.live.streamtheworld.com/AFNP_SBO.mp3
http://19213.live.streamtheworld.com/AFNP_SBOAAC.aac
http://18393.live.streamtheworld.com/AFNP_TKO.mp3
http://22343.live.streamtheworld.com/AFNP_TKOAAC.aac
http://19793.live.streamtheworld.com/AFN_CTYP.mp3
http://17963.live.streamtheworld.com/AFN_CTYPAAC.aac
http://16813.live.streamtheworld.com/AFN_FAN.mp3
http://24503.live.streamtheworld.com/AFN_FANAAC.aac
http://18393.live.streamtheworld.com/AFN_FREP.mp3
http://18393.live.streamtheworld.com/AFN_FREPAAC.aac
http://14103.live.streamtheworld.com/AFN_GRV.mp3
http://13743.live.streamtheworld.com/AFN_GRVAAC.aac
http://16693.live.streamtheworld.com/AFN_HOTP.mp3
http://15373.live.streamtheworld.com/AFN_HOTPAAC.aac
http://20423.live.streamtheworld.com/AFN_JOEP.mp3
http://22723.live.streamtheworld.com/AFN_JOEPAAC.aac
http://18683.live.streamtheworld.com/AFN_LGYP.mp3
http://18683.live.streamtheworld.com/AFN_LGYPAAC.aac
http://18393.live.streamtheworld.com/AFN_PTK.mp3
http://17343.live.streamtheworld.com/AFN_PTKAAC.aac
http://16603.live.streamtheworld.com/AFN_VCE.mp3
http://14983.live.streamtheworld.com/AFN_VCEAAC.aac
}}}
** 利用例 [#se03cd57]
AFN東京(aacで配信)を再生する
ffplay http://22343.live.streamtheworld.com/AFNP_TKOAAC...
* 解説 [#ncce8bc4]
** [[AFN 360 Internet Radio>https://www.afnpacific.net/af...
#prism(bash){{{
curl -sSL https://www.afnpacific.net/afn-360/ | grep -woE...
}}}
** ステーションID毎に配信サーバ情報(xml)を取得 [#lee160...
#prism(bash){{{
while read -r afnID; do
curl -sSL "https://playerservices.streamtheworld.com/ap...
(xmlパース処理が続く)
...
done |
}}}
** 配信サーバ情報(xml)に含まれるサーバのうち、最後に記...
#prism(bash){{{
while read ...
xmllint --xpath "//*[local-name()='mountpoints']" - |
xmllint --xpath '//server[last()]/ip/text() | //mount/t...
done |
}}}
** 2行を1行に束ね、エンコード形式に合わせてURLを組み立て...
#prism(bash){{{
paste - - | awk '{printf "http://%s/%s.%s\n", $1, $2, /AA...
}}}
* 高速化 [#qbc5e299]
- curlでのxml取得処理を並列化(バックグラウンド化)するた...
-- 出力順序が乱れるので、URL末尾でソートしておく
大体 30秒 -> 5秒程度に短縮できる
#prism(bash){{{
curl -sSL https://www.afnpacific.net/afn-360/ |
grep -woE 'AFNP?_[A-Z]+' |
while read -r afnID; do
(
curl -sSL "https://playerservices.streamtheworld.com/...
xmllint --xpath "//*[local-name()='mountpoints']" - ...
xmllint --xpath '//server[last()]/ip/text() //mount/t...
&);
done ...
paste - - ...
awk '{printf "http://%s/%s.%s\n", $1, $2, /AAC$/ ? "aac" ...
sort -t/ -k4,4
}}}
* 参考 [#r0e1a904]
[[Linuxで「AFN」を聞くスクリプト – キクチラヂヲ堂>h...
[[AFN 360の配信URL一覧の取得: ∵なっから∴今日のラヂヲ>http...
終了行:
* 最終形 [#b9650620]
** ワンライナー [#s680516a]
curl -sSL https://www.afnpacific.net/afn-360/ | grep -woE...
** 出力例 [#hbba5b8d]
#pre{{{
http://19793.live.streamtheworld.com/AFNP_DGU.mp3
http://14613.live.streamtheworld.com/AFNP_DGUAAC.aac
http://19213.live.streamtheworld.com/AFNP_IWA.mp3
http://14943.live.streamtheworld.com/AFNP_IWAAAC.aac
http://23603.live.streamtheworld.com/AFNP_KSN.mp3
http://19213.live.streamtheworld.com/AFNP_KSNAAC.aac
http://18393.live.streamtheworld.com/AFNP_MSW.mp3
http://19213.live.streamtheworld.com/AFNP_MSWAAC.aac
http://17853.live.streamtheworld.com/AFNP_OKN.mp3
http://21233.live.streamtheworld.com/AFNP_OKNAAC.aac
http://19793.live.streamtheworld.com/AFNP_OSN.mp3
http://14613.live.streamtheworld.com/AFNP_OSNAAC.aac
http://20853.live.streamtheworld.com/AFNP_SBO.mp3
http://19213.live.streamtheworld.com/AFNP_SBOAAC.aac
http://18393.live.streamtheworld.com/AFNP_TKO.mp3
http://22343.live.streamtheworld.com/AFNP_TKOAAC.aac
http://19793.live.streamtheworld.com/AFN_CTYP.mp3
http://17963.live.streamtheworld.com/AFN_CTYPAAC.aac
http://16813.live.streamtheworld.com/AFN_FAN.mp3
http://24503.live.streamtheworld.com/AFN_FANAAC.aac
http://18393.live.streamtheworld.com/AFN_FREP.mp3
http://18393.live.streamtheworld.com/AFN_FREPAAC.aac
http://14103.live.streamtheworld.com/AFN_GRV.mp3
http://13743.live.streamtheworld.com/AFN_GRVAAC.aac
http://16693.live.streamtheworld.com/AFN_HOTP.mp3
http://15373.live.streamtheworld.com/AFN_HOTPAAC.aac
http://20423.live.streamtheworld.com/AFN_JOEP.mp3
http://22723.live.streamtheworld.com/AFN_JOEPAAC.aac
http://18683.live.streamtheworld.com/AFN_LGYP.mp3
http://18683.live.streamtheworld.com/AFN_LGYPAAC.aac
http://18393.live.streamtheworld.com/AFN_PTK.mp3
http://17343.live.streamtheworld.com/AFN_PTKAAC.aac
http://16603.live.streamtheworld.com/AFN_VCE.mp3
http://14983.live.streamtheworld.com/AFN_VCEAAC.aac
}}}
** 利用例 [#se03cd57]
AFN東京(aacで配信)を再生する
ffplay http://22343.live.streamtheworld.com/AFNP_TKOAAC...
* 解説 [#ncce8bc4]
** [[AFN 360 Internet Radio>https://www.afnpacific.net/af...
#prism(bash){{{
curl -sSL https://www.afnpacific.net/afn-360/ | grep -woE...
}}}
** ステーションID毎に配信サーバ情報(xml)を取得 [#lee160...
#prism(bash){{{
while read -r afnID; do
curl -sSL "https://playerservices.streamtheworld.com/ap...
(xmlパース処理が続く)
...
done |
}}}
** 配信サーバ情報(xml)に含まれるサーバのうち、最後に記...
#prism(bash){{{
while read ...
xmllint --xpath "//*[local-name()='mountpoints']" - |
xmllint --xpath '//server[last()]/ip/text() | //mount/t...
done |
}}}
** 2行を1行に束ね、エンコード形式に合わせてURLを組み立て...
#prism(bash){{{
paste - - | awk '{printf "http://%s/%s.%s\n", $1, $2, /AA...
}}}
* 高速化 [#qbc5e299]
- curlでのxml取得処理を並列化(バックグラウンド化)するた...
-- 出力順序が乱れるので、URL末尾でソートしておく
大体 30秒 -> 5秒程度に短縮できる
#prism(bash){{{
curl -sSL https://www.afnpacific.net/afn-360/ |
grep -woE 'AFNP?_[A-Z]+' |
while read -r afnID; do
(
curl -sSL "https://playerservices.streamtheworld.com/...
xmllint --xpath "//*[local-name()='mountpoints']" - ...
xmllint --xpath '//server[last()]/ip/text() //mount/t...
&);
done ...
paste - - ...
awk '{printf "http://%s/%s.%s\n", $1, $2, /AAC$/ ? "aac" ...
sort -t/ -k4,4
}}}
* 参考 [#r0e1a904]
[[Linuxで「AFN」を聞くスクリプト – キクチラヂヲ堂>h...
[[AFN 360の配信URL一覧の取得: ∵なっから∴今日のラヂヲ>http...
ページ名: