Showing
1 changed file
with
6 additions
and
9 deletions
... | @@ -2,6 +2,7 @@ from bs4 import BeautifulSoup | ... | @@ -2,6 +2,7 @@ from bs4 import BeautifulSoup |
2 | from urllib.request import urlopen | 2 | from urllib.request import urlopen |
3 | import openpyxl | 3 | import openpyxl |
4 | import datetime | 4 | import datetime |
5 | +import sys | ||
5 | 6 | ||
6 | # coding = utf-8 | 7 | # coding = utf-8 |
7 | 8 | ||
... | @@ -14,9 +15,9 @@ code = [] | ... | @@ -14,9 +15,9 @@ code = [] |
14 | for cell in sheet['E']: | 15 | for cell in sheet['E']: |
15 | code.append(cell.value) | 16 | code.append(cell.value) |
16 | 17 | ||
17 | - | 18 | +#nodejs 연동용 |
18 | -sys.stdin.reconfigure(encoding='utf-8') | 19 | +#sys.stdin.reconfigure(encoding='utf-8') |
19 | -sys.stdout.reconfigure(encoding='utf-8') | 20 | +#sys.stdout.reconfigure(encoding='utf-8') |
20 | area = input() | 21 | area = input() |
21 | print(area) | 22 | print(area) |
22 | col = code.index(area) | 23 | col = code.index(area) |
... | @@ -62,12 +63,8 @@ cold_danger=0 #추울 경우 위험도 숫자가 커질수록 증가 | ... | @@ -62,12 +63,8 @@ cold_danger=0 #추울 경우 위험도 숫자가 커질수록 증가 |
62 | for i in range(0, len(hours)): | 63 | for i in range(0, len(hours)): |
63 | temper = soup.find(hours[i]) | 64 | temper = soup.find(hours[i]) |
64 | sens_temper.append(int(temper.text)) | 65 | sens_temper.append(int(temper.text)) |
65 | - if i < 2: | 66 | + |
66 | - print("0"+str(int(hours[i][1:])+3)+"시:", temper.text+"°C") | 67 | +print(min(sens_temper), "\n", max(sens_temper), "\n", sum(sens_temper)//8) |
67 | - elif i == 7: | ||
68 | - print("익일 03시:", temper.text+"°C") | ||
69 | - else: | ||
70 | - print(str(int(hours[i][1:])+3)+"시:", temper.text+"°C") | ||
71 | 68 | ||
72 | if max(sens_temper) <= 8: | 69 | if max(sens_temper) <= 8: |
73 | if min(sens_temper) >= -3 and min(sens_temper) <=2: | 70 | if min(sens_temper) >= -3 and min(sens_temper) <=2: | ... | ... |
-
Please register or login to post a comment