diff --git a/data/weather.py b/data/weather.py index fe2a11f..ba890b0 100644 --- a/data/weather.py +++ b/data/weather.py @@ -37,9 +37,9 @@ def get_precipitation_summary(): try: data = response.json() total_rainfall = 0.0 - lines = [f'

[시간대별 강수량]

'] - lines.append(f'') - lines.append(f'') + lines = [f'

[시간대별 강수량]

'] + lines.append(f'
시간강수량
') + lines.append(f'') for item in data['response']['body']['items']['item']: if item['category'] == 'PCP' and item['fcstDate'] == TODAY: @@ -47,11 +47,11 @@ def get_precipitation_summary(): if 900 < int(time) < 2300: mm = parse_precip(item['fcstValue']) time_str = f"{time[:2]}:{time[2:]}" # '11:00' - lines.append(f"") + lines.append(f'') total_rainfall += mm - lines.append("
시간강수량
{time_str}{mm}mm
{time_str}{mm}mm
") + lines.append("") lines.append(f"

영업시간 중 총 예상 강수량: {total_rainfall:.1f}mm

") return ''.join(lines)