From b69d658233a28ab05ccfd7bdd83ca772db8e04f3 Mon Sep 17 00:00:00 2001 From: Yuuki Date: Sat, 4 Jan 2025 15:05:41 +0900 Subject: [PATCH] Fixed an error caused in start/end times (needs to be string instead of integer...) --- run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run.py b/run.py index b22ce76..2c0a2b1 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.OSAKA1.value, CITY.NARA.value] + c_areas = [CITY.OSAKA2.value, CITY.NARA.value] c_adult = 'true' for area in c_areas: # GR @@ -93,8 +93,8 @@ for x in range(0, 7): channel = chid[0:chid.rfind('_')] title = fix(epg_data['title']) comment = fix(epg_data['commentary']) - start = datetime.fromtimestamp(datetime.strptime(epg_data['programStart'], '%Y%m%d%H%M%S').timestamp() - 32400).strftime('%Y%m%d%H%M%S') - end = datetime.fromtimestamp(datetime.strptime(epg_data['programEnd'], '%Y%m%d%H%M%S').timestamp() - 32400).strftime('%Y%m%d%H%M%S') + start = datetime.fromtimestamp(datetime.strptime(str(epg_data['programStart']), '%Y%m%d%H%M%S').timestamp() - 32400).strftime('%Y%m%d%H%M%S') + end = datetime.fromtimestamp(datetime.strptime(str(epg_data['programEnd']), '%Y%m%d%H%M%S').timestamp() - 32400).strftime('%Y%m%d%H%M%S') gen = genre(epg_data['sortGenre']) attr = epg_data['attr'] icon = 'https://tvguide.myjcom.jp{}'.format(epg_data['imgPath']) if int(epg_data['hasImage']) == 1 and epg_data['imgPath'] else None