Jihoon

modified recommend_clothes.py

......@@ -2,6 +2,7 @@ from bs4 import BeautifulSoup
from urllib.request import urlopen
import openpyxl
import datetime
import sys
# coding = utf-8
......@@ -14,9 +15,9 @@ code = []
for cell in sheet['E']:
code.append(cell.value)
sys.stdin.reconfigure(encoding='utf-8')
sys.stdout.reconfigure(encoding='utf-8')
#nodejs 연동용
#sys.stdin.reconfigure(encoding='utf-8')
#sys.stdout.reconfigure(encoding='utf-8')
area = input()
print(area)
col = code.index(area)
......@@ -62,12 +63,8 @@ cold_danger=0 #추울 경우 위험도 숫자가 커질수록 증가
for i in range(0, len(hours)):
temper = soup.find(hours[i])
sens_temper.append(int(temper.text))
if i < 2:
print("0"+str(int(hours[i][1:])+3)+"시:", temper.text+"°C")
elif i == 7:
print("익일 03시:", temper.text+"°C")
else:
print(str(int(hours[i][1:])+3)+"시:", temper.text+"°C")
print(min(sens_temper), "\n", max(sens_temper), "\n", sum(sens_temper)//8)
if max(sens_temper) <= 8:
if min(sens_temper) >= -3 and min(sens_temper) <=2:
......