From 8b29e68200478cfa702a53cad257a50fec5b82d0 Mon Sep 17 00:00:00 2001 From: Yuuki Date: Fri, 3 Jan 2025 21:40:29 +0900 Subject: [PATCH] Added some cities and their region IDs. --- constants.py | 35 +++++++++++++++++++++++++---------- run.py | 2 +- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/constants.py b/constants.py index 2544aed..a37dda3 100644 --- a/constants.py +++ b/constants.py @@ -1,17 +1,32 @@ from enum import Enum class CITY(Enum): - # TODO: Add all these cities: https://c.myjcom.jp/shared/common/js/region/data/cityMaster.js?_=1735632747105 - # TODO: Change these to cities' names - KYUSHU1 = 35 - KYUSHU2 = 36 - KYUSHU3 = 54 - MIYAGI1 = 52 - OSAKA1 = 40 - OSAKA2 = 46 - TOKYO1 = 19 - TOKYO2 = 100 + TOKYO1 = 12 + TOKYO2 = 221 TOKYO3 = 222 + OSAKA1 = 28 + OSAKA2 = 40 + OSAKA3 = 42 + OSAKA4 = 44 + OSAKA5 = 30 + KYOTO = 46 + HYOGO = 106 + WAKAYAMA = 25 + YAMAGUCHI = 39 + FUKUOKA = 37 + KUMAMOTO = 227 + HOKKAIDO = 1 + MIYAGI = 52 + GUNMA = 13 + IBARAKI = 2 + CHIBA1 = 3 + CHIBA2 = 217 + CHIBA3 = 219 + CHIBA4 = 300 + KANAGAWA1 = 101 + KANAGAWA2 = 201 + SAITAMA1 = 3 + SAITAMA2 = 214 class XMLTV: diff --git a/run.py b/run.py index 65bd394..61c8b7d 100644 --- a/run.py +++ b/run.py @@ -43,7 +43,7 @@ def request_url() -> str: if not file_exists('data/channels.xml'): - c_area = CITY.OSAKA1.value + c_area = CITY.OSAKA2.value c_adult = 'true' for c_type in [2, 3, 5, 120]: # GR / BS / BS4K / CS