diff --git a/constants.py b/constants.py index de12e7b..bd5b2db 100644 --- a/constants.py +++ b/constants.py @@ -9,6 +9,7 @@ class CITY(Enum): OSAKA3 = 42 OSAKA4 = 44 OSAKA5 = 30 + NARA = 10044 KYOTO = 46 HYOGO = 106 WAKAYAMA = 25 diff --git a/run.py b/run.py index 2f087b8..b22ce76 100644 --- a/run.py +++ b/run.py @@ -44,7 +44,7 @@ def request_url() -> str: # TODO: Find an easier way to do this. if not file_exists('data/channels.xml'): - c_areas = [CITY.OSAKA2.value, CITY.KUMAMOTO.value, CITY.HOKKAIDO.value] + c_areas = [CITY.OSAKA1.value, CITY.NARA.value] c_adult = 'true' for area in c_areas: # GR @@ -81,6 +81,7 @@ if not file_exists('data/channels.xml'): else: guide.channels = open('data/channels.xml', mode='r', encoding='UTF-8').read().splitlines() + for x in range(0, 7): req = Request(request_url()) req.add_header('user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36')