19日に更新してた

アフィリエイトはないよ

radiko の県別放送局リストと放送局のエリアリスト

radiko の番組表って取れないのかなと思って検索してみたら、

ststarfield.blog.fc2.com

こちらのサイトに記載されていました。

県単位の放送局リスト、県別番組表、放送局別番組表が取れるみたいですが、放送局の放送範囲がわからないので書いてみました。

import urllib
import xml.etree.ElementTree as ET
from collections import defaultdict

area_dic = defaultdict(list)

for num in range(1,48):
    req = urllib.request.Request(f'http://radiko.jp/v3/station/list/JP{num}.xml')

    with urllib.request.urlopen(req) as response:
        XmlData = response.read()
    root = ET.fromstring(XmlData)

    area_name=root.attrib['area_name'].split()[0]
    for i in range(len(root)):
        area_dic[area_name].append(root[i][0].text)
        
#prefecture = [k for k in area_dic.keys()]

station = sorted(list(set(sum([v for v in area_dic.values()],[]))))

station_dic = defaultdict(list)

for sta in station:
    for k,l in area_dic.items():
        if sta in l:
            station_dic[sta].append(k)
            
for k,v in station_dic.items():
    print(k,v)

で以下のような感じです。

802 ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
ABC ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
ABS ['AKITA']
AFB ['AOMORI']
AFM ['AKITA']
AIR-G ['HOKKAIDO']
ALPHA-STATION ['KYOTO', 'OSAKA']
BAYFM78 ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
BSN ['NIIGATA']
BSS ['TOTTORI', 'SHIMANE']
CBC ['GIFU', 'AICHI', 'MIE']
CCL ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
CRK ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
CROSSFM ['FUKUOKA']
CRT ['TOCHIGI']
DATEFM ['MIYAGI']
E-RADIO ['SHIGA']
FBC ['FUKUI']
FM-FUJI ['YAMANASHI']
FM-OKAYAMA ['OKAYAMA']
FM-SANIN ['TOTTORI', 'SHIMANE']
FM807 ['TOKUSHIMA']
FMAICHI ['GIFU', 'AICHI', 'MIE']
FMF ['FUKUSHIMA']
FMFUKUI ['FUKUI']
FMFUKUOKA ['FUKUOKA']
FMGIFU ['GIFU']
FMGUNMA ['GUNMA']
FMI ['IWATE']
FMJ ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
FMK ['KUMAMOTO']
FMKAGAWA ['KAGAWA']
FMMIE ['MIE']
FMN ['NAGANO']
FMNAGASAKI ['NAGASAKI']
FMNIIGATA ['NIIGATA']
FMO ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
FMS ['SAGA']
FMT ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
FMTOYAMA ['TOYAMA']
FMY ['YAMAGUCHI']
FM_OITA ['OITA']
FM_OKINAWA ['OKINAWA']
GBS ['GIFU', 'AICHI', 'MIE']
HBC ['HOKKAIDO']
HELLOFIVE ['ISHIKAWA']
HFM ['HIROSHIMA']
HI-SIX ['KOUCHI']
HOUSOU-DAIGAKU ['HOKKAIDO', 'AOMORI', 'IWATE', 'MIYAGI', 'AKITA', 'YAMAGATA', 'FUKUSHIMA', 'IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA', 'NIIGATA', 'TOYAMA', 'ISHIKAWA', 'FUKUI', 'YAMANASHI', 'NAGANO', 'GIFU', 'SHIZUOKA', 'AICHI', 'MIE', 'SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA', 'TOTTORI', 'SHIMANE', 'OKAYAMA', 'HIROSHIMA', 'YAMAGUCHI', 'TOKUSHIMA', 'KAGAWA', 'EHIME', 'KOUCHI', 'FUKUOKA', 'SAGA', 'NAGASAKI', 'KUMAMOTO', 'OITA', 'MIYAZAKI', 'KAGOSHIMA', 'OKINAWA']
IBC ['IWATE']
IBS ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
INT ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
JOAK ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA', 'NIIGATA', 'YAMANASHI', 'NAGANO']
JOAK-FM ['HOKKAIDO', 'AOMORI', 'IWATE', 'MIYAGI', 'AKITA', 'YAMAGATA', 'FUKUSHIMA', 'IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA', 'NIIGATA', 'TOYAMA', 'ISHIKAWA', 'FUKUI', 'YAMANASHI', 'NAGANO', 'GIFU', 'SHIZUOKA', 'AICHI', 'MIE', 'SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA', 'TOTTORI', 'SHIMANE', 'OKAYAMA', 'HIROSHIMA', 'YAMAGUCHI', 'TOKUSHIMA', 'KAGAWA', 'EHIME', 'KOUCHI', 'FUKUOKA', 'SAGA', 'NAGASAKI', 'KUMAMOTO', 'OITA', 'MIYAZAKI', 'KAGOSHIMA', 'OKINAWA']
JOBK ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
JOCK ['TOYAMA', 'ISHIKAWA', 'FUKUI', 'GIFU', 'SHIZUOKA', 'AICHI', 'MIE']
JOEU-FM ['EHIME']
JOFK ['TOTTORI', 'SHIMANE', 'OKAYAMA', 'HIROSHIMA', 'YAMAGUCHI']
JOHK ['AOMORI', 'IWATE', 'MIYAGI', 'AKITA', 'YAMAGATA', 'FUKUSHIMA']
JOIK ['HOKKAIDO']
JOLK ['FUKUOKA', 'SAGA', 'NAGASAKI', 'KUMAMOTO', 'OITA', 'MIYAZAKI', 'KAGOSHIMA', 'OKINAWA']
JORF ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
JOYFM ['MIYAZAKI']
JOZK ['TOKUSHIMA', 'KAGAWA', 'EHIME', 'KOUCHI']
JRT ['TOKUSHIMA']
K-MIX ['SHIZUOKA']
KBC ['FUKUOKA', 'SAGA']
KBS ['SHIGA', 'KYOTO', 'OSAKA']
KISSFMKOBE ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
KNB ['TOYAMA']
KRY ['YAMAGUCHI']
LFR ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
LOVEFM ['FUKUOKA']
MBC ['KAGOSHIMA']
MBS ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
MRO ['ISHIKAWA']
MRT ['MIYAZAKI']
MYUFM ['KAGOSHIMA']
NACK5 ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
NBC ['SAGA', 'NAGASAKI']
NORTHWAVE ['HOKKAIDO']
OBC ['SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA']
OBS ['OITA']
QRR ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
RAB ['AOMORI']
RADIOBERRY ['TOCHIGI']
RBC ['OKINAWA']
RCC ['HIROSHIMA']
RFC ['FUKUSHIMA']
RFM ['YAMAGATA']
RKB ['FUKUOKA', 'SAGA']
RKC ['KOUCHI']
RKK ['KUMAMOTO']
RN1 ['HOKKAIDO', 'AOMORI', 'IWATE', 'MIYAGI', 'AKITA', 'YAMAGATA', 'FUKUSHIMA', 'IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA', 'NIIGATA', 'TOYAMA', 'ISHIKAWA', 'FUKUI', 'YAMANASHI', 'NAGANO', 'GIFU', 'SHIZUOKA', 'AICHI', 'MIE', 'SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA', 'TOTTORI', 'SHIMANE', 'OKAYAMA', 'HIROSHIMA', 'YAMAGUCHI', 'TOKUSHIMA', 'KAGAWA', 'EHIME', 'KOUCHI', 'FUKUOKA', 'SAGA', 'NAGASAKI', 'KUMAMOTO', 'OITA', 'MIYAZAKI', 'KAGOSHIMA', 'OKINAWA']
RN2 ['HOKKAIDO', 'AOMORI', 'IWATE', 'MIYAGI', 'AKITA', 'YAMAGATA', 'FUKUSHIMA', 'IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA', 'NIIGATA', 'TOYAMA', 'ISHIKAWA', 'FUKUI', 'YAMANASHI', 'NAGANO', 'GIFU', 'SHIZUOKA', 'AICHI', 'MIE', 'SHIGA', 'KYOTO', 'OSAKA', 'HYOGO', 'NARA', 'WAKAYAMA', 'TOTTORI', 'SHIMANE', 'OKAYAMA', 'HIROSHIMA', 'YAMAGUCHI', 'TOKUSHIMA', 'KAGAWA', 'EHIME', 'KOUCHI', 'FUKUOKA', 'SAGA', 'NAGASAKI', 'KUMAMOTO', 'OITA', 'MIYAZAKI', 'KAGOSHIMA', 'OKINAWA']
RNB ['EHIME']
RNC ['KAGAWA']
ROK ['OKINAWA']
RSK ['OKAYAMA']
SBC ['NAGANO']
SBS ['SHIZUOKA']
STV ['HOKKAIDO']
TBC ['MIYAGI']
TBS ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
TOKAIRADIO ['GIFU', 'AICHI', 'MIE']
WBS ['WAKAYAMA']
YBC ['YAMAGATA']
YBS ['YAMANASHI']
YFM ['IBARAKI', 'TOCHIGI', 'GUNMA', 'SAITAMA', 'CHIBA', 'TOKYO', 'KANAGAWA']
ZIP-FM ['GIFU', 'AICHI', 'MIE']

結構、その県でしか聞けない放送局が多いと思った。