Toggle navigation
Toggle navigation
This project
Loading...
Sign in
고원빈
/
weather
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Jihoon
2019-12-07 22:25:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
90bc9e58be88c223f10ee6b23e40fb18d796f3ad
90bc9e58
1 parent
c4441342
modified recommend_clothes.py
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
recommend_clothes.py
recommend_clothes.py
View file @
90bc9e5
...
...
@@ -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
:
...
...
Please
register
or
login
to post a comment