syntax error 해결하기

조회수 747회
# -*- coding: utf-8 -*-
from urllib.request import urlopen, Request
import urllib
import bs4

location = '장기동'
enc_location = urllib.parse.quote(location + '+날씨')

url = 'https://search.naver.com/search.naver?ie=utf8&query='+ enc_location

req = Request(url)
page = urlopen(req)
html = page.read()
soup = bs4.BeautifulSoup(html,'html5lib')
print('현재 ' + location + ' 미세먼지는 ' + soup.find('dd', class='lv1').find('span', class='num').text + '입니다.')

File "", line 15 print('현재 ' + location + ' 미세먼지는 ' + soup.find('dd', class="lv1").find('span', class="num").text + '입니다.') ^ SyntaxError: invalid syntax

왜 syntax가 뜨는지 도저히 모르겠습니다

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)