Fix PyCharm's formatting...

This commit is contained in:
Yuuki 2025-01-02 16:05:43 +09:00
parent 53b57eabef
commit 21af0635fc

7
run.py
View file

@ -33,11 +33,8 @@ if not file_exists('data/channels.xml'):
c_adult = 'true'
for c_type in [2, 3, 5, 120]: # GR / BS / BS4K / CS
req_channels = Request(
'https://tvguide.myjcom.jp/api/mypage/getEpgChannelList/?channelType={}&area={}&channelGenre=&course=&chart=&is_adult={}'.format(
c_type, c_area, c_adult))
req_channels.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') # This is required, otherwise we get a 403: Forbidden error.
req_channels = Request('https://tvguide.myjcom.jp/api/mypage/getEpgChannelList/?channelType={}&area={}&channelGenre=&course=&chart=&is_adult={}'.format(c_type, c_area, c_adult))
req_channels.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') # This is required, otherwise we get a 403: Forbidden error.
channel_data = urlopen(req_channels).read()
channel_data = json.loads(channel_data)