diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git "a/.idea/2017162065_\354\235\230\353\243\214IT\355\225\231\352\263\274_\352\271\200\354\206\241\354\235\200_crawler_weather.iml" "b/.idea/2017162065_\354\235\230\353\243\214IT\355\225\231\352\263\274_\352\271\200\354\206\241\354\235\200_crawler_weather.iml" new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ "b/.idea/2017162065_\354\235\230\353\243\214IT\355\225\231\352\263\274_\352\271\200\354\206\241\354\235\200_crawler_weather.iml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d1e22ec --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..cb5ff62 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..4056854 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1607005629993 + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/__pycache__/today_weather.cpython-38.pyc b/__pycache__/today_weather.cpython-38.pyc new file mode 100644 index 0000000..0c58899 Binary files /dev/null and b/__pycache__/today_weather.cpython-38.pyc differ diff --git a/crawler.py b/crawler.py index e2803ef..1aeb4d2 100644 --- a/crawler.py +++ b/crawler.py @@ -145,7 +145,7 @@ def crawl(): html = res.text #svg tag를 위한 xml 파서 - soup = BeautifulSoup(html,'lxml') + soup = BeautifulSoup(html, 'html.parser') today_weather = parse_today_weather(soup) diff --git a/today_weather.py b/today_weather.py index 70e9f28..be8f050 100644 --- a/today_weather.py +++ b/today_weather.py @@ -5,7 +5,6 @@ def __init__(self,today_chart_value_list,today_chart_level_list): self.fine_dust_level = today_chart_level_list[0] self.ultrafine_dust_level = today_chart_level_list[1] self.ultraviolet_ray_level = today_chart_level_list[2] - self.sunrise_time = today_chart_level_list[3] self.fine_dust_value = today_chart_value_list[0] self.ultrafine_dust_value = today_chart_value_list[1] @@ -16,7 +15,6 @@ def __str__(self): return f'미세먼지\t{self.fine_dust_level}\t{self.fine_dust_value}\n' \ f'초미세먼지\t{self.ultrafine_dust_level}\t{self.ultrafine_dust_value}\n' \ f'자외선\t\t{self.ultraviolet_ray_level}\t{self.ultraviolet_ray_value}\n' \ - f'일출시간\t{self.sunrise_time}\n' \ class TodaySummary: