Fixed an error caused in start/end times (needs to be string instead of integer...)
This commit is contained in:
parent
be8e2ee8fa
commit
b69d658233
1 changed files with 3 additions and 3 deletions
6
run.py
6
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
|
||||
|
|
Loading…
Add table
Reference in a new issue