-
chapter-3 시카고 샌드위치 맛집 분석 & 네이버 영화 평점 변화,날짜 변화 평점 확인하기파이썬으로 데이터 주무르기 2021. 10. 23. 14:27
3장 시카고 샌드위치 맛집 분석¶
2장까지 우리가 다룬 데이터는 엑셀이든 텍스트든 파일의 형태였습니다. 그리고 우리는 파이썬과 몇몇 모듈의 기초에 집중하면서 뭔가 성과를 얻기 위해 노력했습니다. 이제 3장부터는 데이터를 인터넷에서 직접 얻는 과정을 이야기하려 합니다. 이를 거창하게 웹 스크래핑(Web Scraping)이라고 하지 않더라도 단지 원하는 정보 한줄을 얻는 과정이라도 기초를 알고 가야 합니다. 1,2장과 달리 이번장은 인터넷에서 웹페이지의 내용을 가져오는 Beautiful Soup라는 모듈의 기초부터 익히고, 이번장의 목표인 시카고 샌드위치 맛집 리스트를 정리하려고 합니다. 물론 그 과정에서도 익히고 배워야 할 것이 있습니다.
In [1]:from bs4 import BeautifulSoup
BeautifulSoup에서 bs4를import합니다.
In [2]:page = open("data/03. test_first.html",'r').read() soup = BeautifulSoup(page, 'html.parser') print(soup.prettify())
<!DOCTYPE html> <html> <head> <title> Very Simple HTML Code by PinkWink </title> </head> <body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link"> PinkWink </a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link"> Python </a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body> </html>
지금 파일로 다운받은 html을 읽는 것이기 때문에 open 명령으로 읽기 옵션('r')을 주고 읽으면 됩니다. 읽은 html 페이지의 내용을 전체 다 보고 싶으면. prettify()라는 옵션을 사용하면 들여쓰기가 되어 보기 좋게 나타납니다. 지금 위 코드에서 예제로 사용되는 전체 html코드를 soup라는 변수에 저장했는데. 그 soup라는 변수에서 한 단계 아래에서 포함된 태그들을 알고 싶으면 children이라는 속성을 사용하면 됩니다.
In [3]:list(soup.children)
Out[3]:['html', '\n', <html> <head> <title>Very Simple HTML Code by PinkWink</title> </head> <body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body> </html>]
In [4]:html = list(soup.children)[2] html
Out[4]:<html> <head> <title>Very Simple HTML Code by PinkWink</title> </head> <body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body> </html>
이때 soup는 문서 전체를 저장한 변수이기 때문에 그 안에서 html태그에 접속하고 싶다면, 위와 같이 접근할 수 있습니다.
그러면 위와 같은 결과를 얻게 됩니다. 다시 html의 children을 조사해보면In [5]:list(html.children)
Out[5]:['\n', <head> <title>Very Simple HTML Code by PinkWink</title> </head>, '\n', <body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body>, '\n']
이렇게 나타납니다. 우리가 본문으로 흔히 보게 되는 부분이 body태그의 내용입니다. 코드[5] 상태에서 한 번 더 html의 children 중 3번을 조사해보면 body 태그가 나타납니다.
In [6]:body = list(html.children)[3] body
Out[6]:<body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body>
이렇게 children과 parent를 이용해서 태그를 조사할 수 있고 그냥 한 번에 나타낼 수도 있습니다.
In [7]:soup.body
Out[7]:<body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body>
이렇게 바로 찾을 수도 있습니다.
In [8]:list(body.children)
Out[8]:['\n', <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div>, '\n', <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p>, '\n', <p class="outer-text"> <b> All I need is Love. </b> </p>, '\n']
또한 body 태그 안에 children의 리스트를 확인할 수 있습니다. 리스트 자료형에 대해서는 뒤에서 다시 다루겠습니다. 지금은 그냥 배열 정도로 생각하고 넘어가겠습니다. 위 코드에서 접근한 대로 단계별로 접근하고 다시 그 구조를 코드 속에 담아주는 것은 체계적으로 생각하고 접근할 수 있는 장점이 있지만, 복잡하고 큰 크기의 페이지를 접근하는 것에는 쉽지 않습니다. 만약 접근해야 할 태그를 알고 있다면 find나 find_all 명령을 많이 사용하게 됩니다.
In [9]:soup.find_all('p')
Out[9]:[<p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p>, <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p>, <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p>, <p class="outer-text"> <b> All I need is Love. </b> </p>]
위와 같은 모든 p 태그를 찾는 것입니다. 물론 하나만 찾을 때는 find 명령을 사용할 수 있습니다.
In [10]:soup.find('p')
Out[10]:<p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p>
이렇게 사용하면 제일 첫 번째 p 태그를 찾아줍니다.
In [11]:soup.find_all('p', class_='outer-text')
Out[11]:[<p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p>, <p class="outer-text"> <b> All I need is Love. </b> </p>]
이렇게 p 태그의 class가 outer-text인 것을 찾는 것도 가능합니다.
In [12]:soup.find_all(class_='outer-text')
Out[12]:[<p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p>, <p class="outer-text"> <b> All I need is Love. </b> </p>]
혹은 그냥 class 이름으로만 outer-text를 찾을 수도 있습니다.
In [13]:soup.find_all(id='first')
Out[13]:[<p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p>]
또 id가 first인 태그들을 찾을 수도 있습니다.
In [14]:soup.find('p')
Out[14]:<p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p>
그러나 find 명령은 제일 처음 나타난 태그만 찾아주기 때문에 그 다음 태그만 찾고 싶을 때는 다른 방법을 사용해야 합니다.
In [15]:soup.head
Out[15]:<head> <title>Very Simple HTML Code by PinkWink</title> </head>
soup의 head에 있는 내용입니다. 여기서 next_sibling이라는 명령을 사용할 수 있습니다.
In [16]:soup.head.next_sibling
Out[16]:'\n'
soup의 head 다음에 줄바꿈 문자가 있습니다.
In [17]:soup.head.next_sibling.next_sibling
Out[17]:<body> <div> <p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p> <p class="inner-text second-item"> Happy Data Science. <a href="https://www.python.org" id="py-link">Python</a> </p> </div> <p class="outer-text first-item" id="second"> <b> Data Science is funny. </b> </p> <p class="outer-text"> <b> All I need is Love. </b> </p> </body>
다시 한 번 더 이렇게 head와 같은 위치에 있던 body 태그로 접근할 수 있습니다.
In [18]:body.p
Out[18]:<p class="inner-text first-item" id="first"> Happy PinkWink. <a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a> </p>
또한 제일 처음 나타나는 p 태그에 대해, 위와 같이 next_sibling을 두번 걸면 그 다음 p 태그로 이동할 수 있다는 것을 알 수 있습니다.
In [19]:for each_tag in soup.find_all('p'): print(each_tag.get_text())
Happy PinkWink. PinkWink Happy Data Science. Python Data Science is funny. All I need is Love.
또 get_text() 명령으로 태그 안에 있는 텍스트만 가지고 올 수 있습니다.
In [20]:body.get_text()
Out[20]:'\n\n\n Happy PinkWink.\n PinkWink\n\n\n Happy Data Science.\n Python\n\n\n\n\n Data Science is funny.\n \n\n\n\n All I need is Love.\n \n\n'
body 전체에서 get_text()를 하면 태그가 있던 자리는 줄바꿈(\n)이 표시되고 전체 텍스트를 보여줍니다.
In [21]:links = soup.find_all('a') links
Out[21]:[<a href="http://www.pinkwink.kr" id="pw-link">PinkWink</a>, <a href="https://www.python.org" id="py-link">Python</a>]
클릭 가능한 링크를 의미하는 a 태그를 찾았습니다.
In [22]:for each in links: href = each['href'] text = each.string print(text + '->' + href)
PinkWink->http://www.pinkwink.kr Python->https://www.python.org
3-2 크롬 개발자 도구를 이용해서 원하는 태그 찾기¶
웹 페이지의 태그를 beautiful soup의 결과만 보면서 확인할 수는 없습니다. 원하는 곳의 태그가 무엇인지 확인하는 방법 중 간편한 방법이 웹 브라우저인 크롬의 개발자 도구를 사용하는 것입니다. https://finance.naver.com/marketindex/로 접속합니다. 거기서 미국 USB 1,179.60원 이라는 글자에서 환율을 가져오려고 합니다.
In [23]:from urllib.request import urlopen
먼저 url로 접근하는 경우 urllib에서 urlopen이라는 함수를 import해둡니다.
In [24]:url = "https://finance.naver.com/marketindex/" page = urlopen(url) soup = BeautifulSoup(page, "html.parser") print(soup.prettify())
<script language="javascript" src="/template/head_js.naver?referer=info.finance.naver.com&menu=marketindex&submenu=market"> </script> <script src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/info/jindo.min.ns.1.5.3.euckr.js" type="text/javascript"> </script> <script src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindo.1.5.3.element-text-patch.js" type="text/javascript"> </script> <div id="container" style="padding-bottom:0px;"> <div class="market_include"> <div class="market_data"> <div class="market1"> <div class="title"> <h2 class="h_market1"> <span> 환전 고시 환율 </span> </h2> </div> <!-- data --> <div class="data"> <ul class="data_lst" id="exchangeList"> <li class="on"> <a class="head usd" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_USDKRW" onclick="clickcr(this, 'fr1.usdt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 미국 USD </span> </h3> <div class="head_info point_dn"> <span class="value"> 1,176.00 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 1.50 </span> <span class="blind"> 하락 </span> </div> </a> <a class="graph_img" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_USDKRW" onclick="clickcr(this, 'fr1.usdc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_USDKRW.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 20:02 </span> <span class="source"> 하나은행 기준 </span> <span class="count"> 고시회차 <span class="num"> 293 </span> 회 </span> </div> </li> <li class=""> <a class="head jpy" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_JPYKRW" onclick="clickcr(this, 'fr1.jpyt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 일본 JPY(100엔) </span> </h3> <div class="head_info point_up"> <span class="value"> 1,033.26 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 0.50 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_JPYKRW" onclick="clickcr(this, 'fr1.jpyc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_JPYKRW.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 20:02 </span> <span class="source"> 하나은행 기준 </span> <span class="count"> 고시회차 <span class="num"> 293 </span> 회 </span> </div> </li> <li class=""> <a class="head eur" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_EURKRW" onclick="clickcr(this, 'fr1.eurt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 유럽연합 EUR </span> </h3> <div class="head_info point_dn"> <span class="value"> 1,368.57 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 2.10 </span> <span class="blind"> 하락 </span> </div> </a> <a class="graph_img" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_EURKRW" onclick="clickcr(this, 'fr1.eurc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_EURKRW.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 20:02 </span> <span class="source"> 하나은행 기준 </span> <span class="count"> 고시회차 <span class="num"> 293 </span> 회 </span> </div> </li> <li class=""> <a class="head cny" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_CNYKRW" onclick="clickcr(this, 'fr1.cnyt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 중국 CNY </span> </h3> <div class="head_info point_up"> <span class="value"> 184.22 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 0.12 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/exchangeDetail.naver?marketindexCd=FX_CNYKRW" onclick="clickcr(this, 'fr1.cnyc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_CNYKRW.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 20:02 </span> <span class="source"> 하나은행 기준 </span> <span class="count"> 고시회차 <span class="num"> 293 </span> 회 </span> </div> </li> </ul> </div> <!-- //data --> </div> <div class="market2"> <div class="title"> <h2 class="h_market2"> <span> 국제 시장 환율 </span> </h2> </div> <!-- data --> <div class="data"> <ul class="data_lst" id="worldExchangeList"> <li class="on"> <a class="head jpy_usd" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_USDJPY" onclick="clickcr(this, 'fr2.jpyut', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 달러/일본 엔 </span> </h3> <div class="head_info point_dn"> <span class="value"> 113.5800 </span> <span class="txt_jpy"> <span class="blind"> 엔 </span> </span> <span class="change"> 0.2700 </span> <span class="blind"> 하락 </span> </div> </a> <a class="graph_img" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_USDJPY" onclick="clickcr(this, 'fr2.jpyuc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_USDJPY.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> 모닝스타 기준 </span> </div> </li> <li class=""> <a class="head usd_eur" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_EURUSD" onclick="clickcr(this, 'fr2.eurdt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 유로/달러 </span> </h3> <div class="head_info head_info"> <span class="value"> 1.1646 </span> <span class="txt_usd"> <span class="blind"> 달러 </span> </span> <span class="change"> 0.0000 </span> <span class="blind"> 보합 </span> </div> </a> <a class="graph_img" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_EURUSD" onclick="clickcr(this, 'fr2.eurdc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_EURUSD.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> 모닝스타 기준 </span> </div> </li> <li class=""> <a class="head usd_gbp" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_GBPUSD" onclick="clickcr(this, 'fr2.gbpdt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 영국 파운드/달러 </span> </h3> <div class="head_info point_dn"> <span class="value"> 1.3771 </span> <span class="txt_usd"> <span class="blind"> 달러 </span> </span> <span class="change"> 0.0049 </span> <span class="blind"> 하락 </span> </div> </a> <a class="graph_img" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_GBPUSD" onclick="clickcr(this, 'fr2.gbpdc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_GBPUSD.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> 모닝스타 기준 </span> </div> </li> <li class=""> <a class="head usd_idx" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_USDX" onclick="clickcr(this, 'fr2.indt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 달러인덱스 </span> </h3> <div class="head_info point_dn"> <span class="value"> 93.6200 </span> <span class="change"> 0.1300 </span> <span class="blind"> 하락 </span> </div> </a> <a class="graph_img" href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_USDX" onclick="clickcr(this, 'fr2.indc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/FX_USDX.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> ICE 기준 </span> </div> </li> </ul> </div> <!-- //data --> </div> <div class="market3"> <div class="title"> <h2 class="h_market3"> <span> 유가·금시세 </span> </h2> </div> <!-- data --> <div class="data"> <ul class="data_lst" id="oilGoldList"> <li class="on"> <a class="head wti" href="/marketindex/worldOilDetail.naver?marketindexCd=OIL_CL&fdtc=2" onclick="clickcr(this, 'fr3.wtit', '', '', event);"> <h3 class="h_lst"> <span class="blind"> WTI </span> </h3> <div class="head_info point_up"> <span class="value"> 83.76 </span> <span class="txt_usd"> <span class="blind"> 달러 </span> </span> <span class="change"> 1.26 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/worldOilDetail.naver?marketindexCd=OIL_CL&fdtc=2" onclick="clickcr(this, 'fr3.wtic', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/OIL_CL.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> NYMEX(뉴욕상업거래소) 기준 </span> </div> </li> <li class=""> <a class="head gasoline" href="/marketindex/oilDetail.naver?marketindexCd=OIL_GSL" onclick="clickcr(this, 'fr3.oilt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 휘발유 </span> </h3> <div class="head_info point_up"> <span class="value"> 1750.25 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 1.55 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/oilDetail.naver?marketindexCd=OIL_GSL" onclick="clickcr(this, 'fr3.oilc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/OIL_GSL.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.23 </span> <span class="source"> 한국석유공사 Opinet 기준 </span> </div> </li> <li class=""> <a class="head gold_inter" href="/marketindex/worldGoldDetail.naver?marketindexCd=CMDT_GC&fdtc=2" onclick="clickcr(this, 'fr3.agoldt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 국제 금 </span> </h3> <div class="head_info point_up"> <span class="value"> 1795.7 </span> <span class="txt_usd"> <span class="blind"> 달러 </span> </span> <span class="change"> 14.40 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/worldGoldDetail.naver?marketindexCd=CMDT_GC&fdtc=2" onclick="clickcr(this, 'fr3.agoldc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/CMDT_GC.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 </span> <span class="source"> COMEX(뉴욕상품거래소) 기준 </span> </div> </li> <li class=""> <a class="head gold_domestic" href="/marketindex/goldDetail.naver" onclick="clickcr(this, 'fr3.kgoldt', '', '', event);"> <h3 class="h_lst"> <span class="blind"> 국내 금 </span> </h3> <div class="head_info point_up"> <span class="value"> 67668.72 </span> <span class="txt_krw"> <span class="blind"> 원 </span> </span> <span class="change"> 48.78 </span> <span class="blind"> 상승 </span> </div> </a> <a class="graph_img" href="/marketindex/goldDetail.naver" onclick="clickcr(this, 'fr3.kgoldc', '', '', event);"> <img alt="" height="153" src="https://ssl.pstatic.net/imgfinance/chart/marketindex/CMDT_GD.png" width="295"/> </a> <div class="graph_info"> <span class="time"> 2021.10.22 18:00 </span> <span class="source"> 신한은행 기준 </span> ( <span class="num"> 174 </span> 회차) </div> </li> </ul> </div> <!-- //data --> </div> </div> </div> <div class="marketindex_content" id="content"> <div class="section_news"> <h3 class="h_news2"> <span> 주요 뉴스 </span> </h3> <div class="list_area"> <ul> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=277&articleId=0004987644&category=" onclick="clickcr(this, 'mhn.list', '277_0004987644', '0', event);"> [위크리뷰]유가 상승에 '사상 최고' 생산 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.23 08:05 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=277&articleId=0004987636&category=" onclick="clickcr(this, 'mhn.list', '277_0004987636', '1', event);"> 국제 유가, 고공행진 지속될까 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.23 07:45 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=018&articleId=0005067252&category=" onclick="clickcr(this, 'mhn.list', '018_0005067252', '2', event);"> [국제유가]수요 느는데 공급은 부족…WTI </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.23 07:06 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=421&articleId=0005675347&category=" onclick="clickcr(this, 'mhn.list', '421_0005675347', '3', event);"> 유가·원자재가 뜀박질에 물가 비상…서둘러 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.23 07:02 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=001&articleId=0012741629&category=" onclick="clickcr(this, 'mhn.list', '001_0012741629', '4', event);"> [뉴욕유가] 수요 지속·채굴장비수 감소에 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.23 04:00 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=001&articleId=0012741606&category=" onclick="clickcr(this, 'mhn.list', '001_0012741606', '5', event);"> 치솟는 기름값에…프랑스, 저소득층에 13만 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.22 23:38 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=014&articleId=0004727566&category=" onclick="clickcr(this, 'mhn.list', '014_0004727566', '6', event);"> 기재부, 10월 국고채 30년물 8000억 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.22 17:49 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=001&articleId=0012741257&category=" onclick="clickcr(this, 'mhn.list', '001_0012741257', '7', event);"> 국고채 금리 일제히 상승…3년물 연 1.8 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.22 17:20 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=001&articleId=0012741224&category=" onclick="clickcr(this, 'mhn.list', '001_0012741224', '8', event);"> 이달 국고채 8천억원 '모집 방식 비경쟁 </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.22 17:00 </span> </li> <li> <p> <a href="/marketindex/news/newsRead.naver?officeId=018&articleId=0005066775&category=" onclick="clickcr(this, 'mhn.list', '018_0005066775', '9', event);"> [외환마감]달러화 반락+위안화 강세…환율, </a> <img alt="NEW" height="8" src="https://ssl.pstatic.net/static/nfinance/ico_new.gif" width="8"/> </p> <span> 10.22 16:08 </span> </li> </ul> </div> <a class="btn_more" href="/marketindex/news/newsList.naver" onclick="clickcr(this, 'mhn.more', '', '', event);"> <img alt="더보기" height="18" src="https://ssl.pstatic.net/static/nfinance/btn_more.gif" width="34"/> </a> </div> <div class="tab_default1" id="tab_section"> <ul> <li class="on"> <a href="./?tabSel=exchange#tab_section" onclick="clickcr(this, 'mtb.exnoti', '', '', event);"> <span class="tab1"> 환전고시 환율 </span> </a> </li> <li class=""> <a href="./?tabSel=worldExchange#tab_section" onclick="clickcr(this, 'mtb.interex', '', '', event);"> <span class="tab2"> 국제시장 환율 </span> </a> </li> <li class=""> <a href="./?tabSel=gold#tab_section" onclick="clickcr(this, 'mtb.oilgold', '', '', event);"> <span class="tab3"> 유가 금시세 </span> </a> </li> <li class=""> <a href="./?tabSel=materials#tab_section" onclick="clickcr(this, 'mtb.material', '', '', event);"> <span class="tab4"> 원자재 </span> </a> </li> </ul> <h2 class="blind"> 환전고시 환율 </h2> </div> <div class="section_calculator"> <h3 class="h_calculator"> <span> 환율계산기 (매매기준율 기준) </span> </h3> <div class="calculator"> <div class="inner"> <div class="input"> <div class="selectbox-noscript" id="sInput"> <select class="selectbox-source" id="select_from"> <option label="1" value="1"> 대한민국 원 KRW </option> <option class="selectbox-default" label="1" selected="selected" value="1176.0"> 미국 달러 USD </option> <option label="1" value="1176.0"> 미국 달러 USD </option> <option label="1" value="1368.57"> 유럽연합 유로 EUR </option> <option label="100" value="10.3326"> 일본 엔 JPY </option> <option label="1" value="184.22"> 중국 위안 CNY </option> <option label="1" value="151.26"> 홍콩 달러 HKD </option> <option label="1" value="42.21"> 대만 달러 TWD </option> <option label="1" value="1620.76"> 영국 파운드 GBP </option> <option label="1" value="3054.55"> 오만 리알 OMR </option> <option label="1" value="953.93"> 캐나다 달러 CAD </option> <option label="1" value="1283.0"> 스위스 프랑 CHF </option> <option label="1" value="137.26"> 스웨덴 크로나 SEK </option> <option label="1" value="882.59"> 호주 달러 AUD </option> <option label="1" value="842.9"> 뉴질랜드 달러 NZD </option> <option label="1" value="53.33"> 체코 코루나 CZK </option> <option label="1" value="1.44"> 칠레 페소 CLP </option> <option label="1" value="122.3"> 터키 리라 TRY </option> <option label="1" value="0.41"> 몽골 투그릭 MNT </option> <option label="1" value="366.69"> 이스라엘 세켈 ILS </option> <option label="1" value="183.94"> 덴마크 크로네 DKK </option> <option label="1" value="141.02"> 노르웨이 크로네 NOK </option> <option label="1" value="313.53"> 사우디아라비아 리얄 SAR </option> <option label="1" value="3900.89"> 쿠웨이트 디나르 KWD </option> <option label="1" value="3119.28"> 바레인 디나르 BHD </option> <option label="1" value="320.16"> 아랍에미리트 디르함 AED </option> <option label="1" value="1658.67"> 요르단 디나르 JOD </option> <option label="1" value="74.9"> 이집트 파운드 EGP </option> <option label="1" value="35.3"> 태국 바트 THB </option> <option label="1" value="872.6"> 싱가포르 달러 SGD </option> <option label="1" value="283.37"> 말레이시아 링깃 MYR </option> <option label="100" value="0.08349999999999999"> 인도네시아 루피아 IDR </option> <option label="1" value="322.99"> 카타르 리얄 QAR </option> <option label="1" value="2.77"> 카자흐스탄 텡게 KZT </option> <option label="1" value="872.6"> 브루나이 달러 BND </option> <option label="1" value="15.71"> 인도 루피 INR </option> <option label="1" value="6.74"> 파키스탄 루피 PKR </option> <option label="1" value="13.73"> 방글라데시 타카 BDT </option> <option label="1" value="23.15"> 필리핀 페소 PHP </option> <option label="1" value="58.08"> 멕시코 페소 MXN </option> <option label="1" value="207.81"> 브라질 레알 BRL </option> <option label="100" value="0.051699999999999996"> 베트남 동 VND </option> <option label="1" value="80.35"> 남아프리카 공화국 랜드 ZAR </option> <option label="1" value="16.75"> 러시아 루블 RUB </option> <option label="1" value="3.77"> 헝가리 포린트 HUF </option> <option label="1" value="297.45"> 폴란드 즈워티 PLN </option> </select> <div class="selectbox-box" onclick="clickcr(this, 'exl*c.clist1', '', '', event);"> <div class="selectbox-label"> </div> </div> <div class="selectbox-layer ly_calculator"> <div class="selectbox-list"> </div> </div> </div> <div class="input_area" id="input_from"> <input id="input_from_money" maxlength="10" onclick="clickcr(this, 'exl*c.unit1', '', '', event);" onfocus="changeActiveInput('from', 'to'); return false;" onkeyup="calcExchange('from', 'to', 'on', event);" type="text" value="1"/> <img alt="" height="13" id="img_from_monetary" src="https://ssl.pstatic.net/static/nfinance/img_money_USD.gif" width="26"/> </div> </div> <div class="same"> <img alt="" height="15" src="https://ssl.pstatic.net/static/nfinance/ico_same.gif" width="28"/> </div> <div class="view"> <div class="selectbox-noscript" id="sView"> <select class="selectbox-source" id="select_to"> <option class="selectbox-default" label="1" value="1"> 대한민국 원 KRW </option> <option label="1" value="1"> 대한민국 원 KRW </option> <option label="1" value="1176.0"> 미국 달러 USD </option> <option label="1" value="1368.57"> 유럽연합 유로 EUR </option> <option label="100" value="10.3326"> 일본 엔 JPY </option> <option label="1" value="184.22"> 중국 위안 CNY </option> <option label="1" value="151.26"> 홍콩 달러 HKD </option> <option label="1" value="42.21"> 대만 달러 TWD </option> <option label="1" value="1620.76"> 영국 파운드 GBP </option> <option label="1" value="3054.55"> 오만 리알 OMR </option> <option label="1" value="953.93"> 캐나다 달러 CAD </option> <option label="1" value="1283.0"> 스위스 프랑 CHF </option> <option label="1" value="137.26"> 스웨덴 크로나 SEK </option> <option label="1" value="882.59"> 호주 달러 AUD </option> <option label="1" value="842.9"> 뉴질랜드 달러 NZD </option> <option label="1" value="53.33"> 체코 코루나 CZK </option> <option label="1" value="1.44"> 칠레 페소 CLP </option> <option label="1" value="122.3"> 터키 리라 TRY </option> <option label="1" value="0.41"> 몽골 투그릭 MNT </option> <option label="1" value="366.69"> 이스라엘 세켈 ILS </option> <option label="1" value="183.94"> 덴마크 크로네 DKK </option> <option label="1" value="141.02"> 노르웨이 크로네 NOK </option> <option label="1" value="313.53"> 사우디아라비아 리얄 SAR </option> <option label="1" value="3900.89"> 쿠웨이트 디나르 KWD </option> <option label="1" value="3119.28"> 바레인 디나르 BHD </option> <option label="1" value="320.16"> 아랍에미리트 디르함 AED </option> <option label="1" value="1658.67"> 요르단 디나르 JOD </option> <option label="1" value="74.9"> 이집트 파운드 EGP </option> <option label="1" value="35.3"> 태국 바트 THB </option> <option label="1" value="872.6"> 싱가포르 달러 SGD </option> <option label="1" value="283.37"> 말레이시아 링깃 MYR </option> <option label="100" value="0.08349999999999999"> 인도네시아 루피아 IDR </option> <option label="1" value="322.99"> 카타르 리얄 QAR </option> <option label="1" value="2.77"> 카자흐스탄 텡게 KZT </option> <option label="1" value="872.6"> 브루나이 달러 BND </option> <option label="1" value="15.71"> 인도 루피 INR </option> <option label="1" value="6.74"> 파키스탄 루피 PKR </option> <option label="1" value="13.73"> 방글라데시 타카 BDT </option> <option label="1" value="23.15"> 필리핀 페소 PHP </option> <option label="1" value="58.08"> 멕시코 페소 MXN </option> <option label="1" value="207.81"> 브라질 레알 BRL </option> <option label="100" value="0.051699999999999996"> 베트남 동 VND </option> <option label="1" value="80.35"> 남아프리카 공화국 랜드 ZAR </option> <option label="1" value="16.75"> 러시아 루블 RUB </option> <option label="1" value="3.77"> 헝가리 포린트 HUF </option> <option label="1" value="297.45"> 폴란드 즈워티 PLN </option> </select> <div class="selectbox-box" onclick="clickcr(this, 'exl*c.clist2', '', '', event);"> <div class="selectbox-label"> </div> </div> <div class="selectbox-layer ly_calculator"> <div class="selectbox-list"> </div> </div> </div> <div class="input_area" id="input_to"> <input id="input_to_money" maxlength="10" onclick="clickcr(this, 'exl*c.unit2', '', '', event);" onfocus="changeActiveInput('to', 'from'); return false;" onkeyup="calcExchange('to', 'from', 'on', event);" type="text"/> <img alt="" height="13" id="img_to_monetary" src="https://ssl.pstatic.net/static/nfinance/img_money_KRW.gif" width="26"/> </div> </div> </div> </div> </div> <div class="section_exchange"> <div id="section_ex1"> <h3 class="blind" id="exchange1"> 환전 고시 환율 </h3> <div class="exchange_info"> <span class="date"> 2021.10.22 20:02 </span> <span class="standard"> 하나은행 기준 </span> <span class="round"> 고시회차 <em> 293 </em> 회 </span> </div> <iframe frameborder="0" height="1378px" id="frame_ex1" marginheight="0" marginwidth="0" scrolling="no" src="/marketindex/exchangeList.naver" title="환전 고시 환율" width="100%"> </iframe> </div> <ul class="tbl_info"> <li> 통화명과 심볼은 앞에 위치한 통화에 1이 생략된 형태로, 달러/일본 엔(심볼: USDJPY)인 경우 1 USD(달러)가 JPY(일본 엔)으로 얼마인가를 의미합니다. </li> </ul> </div> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.Component.1.0.3.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.UIComponent.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.HTMLComponent.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.Timer.1.0.3.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.LayerManager.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.LayerPosition.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.RolloverArea.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.RolloverClick.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.SelectBox.1.0.1.js" type="text/javascript"> </script> <script charset="euckr" language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.TextRange.1.0.1.js" type="text/javascript"> </script> <script charset="euckr" language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.WatchInput.1.0.1.js" type="text/javascript"> </script> <script charset="euckr" language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.Formatter.1.1.0.js" type="text/javascript"> </script> <script charset="euckr" language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindoComponent/jindo.NumberFormatter.1.0.1.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/exchange.js" type="text/javascript"> </script> <script type="text/javascript"> // exchangeDetail.jsp에도 동일 스크립트 있음 - 로딩시 디자인이 0.5초간 디자인이 안뜬다는 이슈로 include하지 않고 같은 스크립트를 두벌로 관리함 //환율 계산 function calcExchange(str1, str2, cssOn, event) { var oEvent = event || window.event; var sKeyCode = (undefined === oEvent) ? undefined : jindo.$Event(oEvent).key().keyCode; if (sKeyCode != 13 && sKeyCode != 27 && sKeyCode != 37 && sKeyCode != 38 && sKeyCode != 110 && sKeyCode != 229) { if (str1 == '' && str2 == '') { if (jindo.$('input_to').className == 'input_area') { str1 = 'from'; str2 = 'to'; } else { str1 = 'to'; str2 = 'from'; } } var regExp = new RegExp("[^0-9\.\,]"); var sInputValue = jindo.$('input_' + str1 + '_money').value; if(regExp.test(sInputValue)){ alert('숫자, 소수점(.)만 입력하실 수 있습니다.'); jindo.$('input_' + str1 + '_money').value = revertInputText(sInputValue); return false; } // 사용자가 입력한 콤마(,) 제거 if (sInputValue.substr(sInputValue.length - 1, 1) == ',') { jindo.$('input_' + str1 + '_money').value = revertInputText(sInputValue); return false; } // 맨 앞에 있는 숫자 0 없애기 if (sInputValue == '0' || sInputValue == '.' || sInputValue == ',') { jindo.$('input_' + str1 + '_money').value = revertInputText(sInputValue); return false; } // 소수점 2개가 없도록 var match = sInputValue.match(/\./g); if (match != null && match.length >= 2) { jindo.$('input_' + str1 + '_money').value = revertInputText(sInputValue); return false; } // 소수점을 입력한 경우, 일단 대기 var pointPosIndex = sInputValue.indexOf('.'); if (pointPosIndex != -1 && pointPosIndex == sInputValue.length - 1) { return false; } // 소수점 2자리 유지 if (pointPosIndex != -1 && sInputValue.substring(pointPosIndex + 1, sInputValue.length).length > 2) { jindo.$('input_' + str1 + '_money').value = revertInputText(sInputValue); return false; } var e_select_from = jindo.$('select_'+str1); var e_select_to = jindo.$('select_'+str2); var input_from_money = jindo.$('input_'+str1+'_money').value ; var input_from = e_select_from.options[e_select_from.selectedIndex].value ; var input_to = e_select_to.options[e_select_to.selectedIndex].value ; var unit_from = e_select_from.options[e_select_from.selectedIndex].text ; var unit_to = e_select_to.options[e_select_to.selectedIndex].text ; input_from_money = input_from_money.replace(/ |,|\t/g, "") ; input_from = input_from.replace(/ |,|\t/g, "") ; input_to = input_to.replace(/ |,|\t/g, "") ; unit_from = unit_from.substr(unit_from.length-3, 3); unit_to = unit_to.substr(unit_to.length-3, 3); var str1_result = input_from_money * 1 ; var str1_str = str1_result.toFixed(0) ; var str1_len = str1_str.length ; var str1_result_str = new String("") ; if(str1_str > str1_result) str1_str = new String(str1_str-1) ; if (str1_len >= 3) { for (i = str1_len - 3; i > 0; i-=3) str1_result_str = "," + str1_str.substr(i, 3) + str1_result_str ; str1_result_str = str1_str.substr(0, 3+i) + str1_result_str ; for (var i=0; i<input_from_money.length; i++) { if (input_from_money.substr(i,1) != '0') { input_from_money = input_from_money.substring(i,input_from_money.length) ; break; } } if (str1_str != input_from_money) { str1_result_str += str1_result.toFixed(input_from_money.split(".")[1].length).substr(str1_len, input_from_money.split(".")[1].length + 1) ; } } else str1_result_str = input_from_money ; var str2_result = input_from_money * input_from / input_to ; var str2_str = str2_result.toFixed(0) ; var str2_len = str2_str.length ; var str2_result_str = new String("") ; if (str2_str > str2_result) str2_str = new String(str2_str-1) ; if (str2_len >= 3) { for (i = str2_len - 3; i > 0; i-=3) str2_result_str = "," + str2_str.substr(i, 3) + str2_result_str ; str2_result_str = str2_str.substr(0, 3+i) + str2_result_str ; str2_result_str += str2_result.toFixed(2).substr(str2_len, 3) ; } else str2_result_str = str2_result.toFixed(2) ; jindo.$('input_'+str1+'_money').value = str1_result_str; jindo.$('input_'+str2+'_money').value = str2_result_str; jindo.$('img_'+str1+'_monetary').src = "https://ssl.pstatic.net/static/nfinance/img_money_"+unit_from+".gif"; jindo.$('img_'+str2+'_monetary').src = "https://ssl.pstatic.net/static/nfinance/img_money_"+unit_to+".gif"; jindo.$Element(jindo.$('input_'+str1)).addClass("on"); jindo.$Element(jindo.$('input_'+str2)).removeClass("on"); if (cssOn == "off"){ jindo.$Element(jindo.$('input_'+str1)).removeClass("on"); } } } function revertInputText(sOrgText) { var sResult = sOrgText; if (sOrgText != '') { sResult = sOrgText.substr(0, sOrgText.length - 1); } return sResult; } jindo.$Fn(function(){ chartMouseOverEvent('exchangeList'); }).attach(document, "domready"); </script> </div> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/jindo_ellipse.js"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/util.js"> </script> <script type="text/javascript"> function ellipseTopNewsTitle() { jindo.EllipseText.factory(jindo.$$(".news_list ul li"), {nAssistWidth: 10}); } var basicDates; function initDate() { basicDates = jindo.$H(); basicDates.add('', ''); basicDates.add('', ''); basicDates.add('', ''); basicDates.add('', ''); basicDates.add('', ''); basicDates.add('', ''); } var basicDescriptions; function initDescription() { basicDescriptions = jindo.$H(); basicDescriptions.add('CMDT_CDY','<em></em> 기준<span>단위:</span>'); basicDescriptions.add('CMDT_PDY','<em></em> 기준<span>단위:</span>'); basicDescriptions.add('CMDT_NG','<em></em> 기준<span>단위:</span>'); basicDescriptions.add('CMDT_S','<em></em> 기준<span>단위:</span>'); basicDescriptions.add('CMDT_C','<em></em> 기준<span>단위:</span>'); basicDescriptions.add('CMDT_SB','<em></em> 기준<span>단위:</span>'); } function setEvent(num, imgChartUrl){ var parentElemnt = jindo.$$('.tbl_market')[num]; var elementList = jindo.$$('tr',parentElemnt); jindo.$Fn(function(e){ var elementListSize = elementList.length; for(var i = 0 ; i < elementListSize ; i ++) { var selectedElement = jindo.$Element(elementList[i]); var selectedClassName = selectedElement.className(); if (selectedClassName != "") { selectedElement.removeClass(selectedClassName); selectedElement.addClass(selectedClassName.replace("on","")); } } var ele = jindo.$Element(jindo.$Event(e).currentElement); var linkUrl = jindo.$$.getSingle('a' , ele.$value()).href; var marketindexCd = linkUrl.split('=')[1]; var className = ele.className(); ele.removeClass(className); ele.addClass(className+" on"); var graphElement = jindo.$Element(jindo.$$('.thum')[num]); graphElement.html('<a href=\"'+linkUrl+'\"><img src=\"https://ssl.pstatic.net/imgfinance/chart/marketindex/' + marketindexCd + '.png\" width=\"295\" height=\"153\" alt=""></a>'); if (basicDates.hasKey(marketindexCd)) { jindo.$Element("basicDate").text(basicDates.$(marketindexCd)); } if (basicDescriptions.hasKey(marketindexCd)) { jindo.$Element("basicDescription").html(basicDescriptions.$(marketindexCd)); } }).attach(elementList, "mouseover"); } jindo.$Fn(function(){ initDate(); initDescription(); chartMouseOverEvent('exchangeList'); chartMouseOverEvent('worldExchangeList'); chartMouseOverEvent('oilGoldList'); jindo.$$('title')[0].innerHTML = "시장지표 : 네이버 금융"; }).attach(document, "domready"); </script> <div class="aside" id="marketindex_aside"> <div class="section_aside"> <h3 class="h_interest"> <span> 국내시장금리 </span> </h3> <table class="tbl_exchange market" summary="국제시장 환율 리스트"> <caption> 국내시장금리 </caption> <colgroup> <col width="94"/> <col width="50"/> <col width="75"/> </colgroup> <thead> <tr> <th> 구분 </th> <th> 금리 </th> <th> 등락율 </th> </tr> </thead> <tbody> <tr class="same"> <th class="th_inter4"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_CD91" onclick="clickcr(this, 'rid.local', 'IRR_CD91', '1', event);"> <span> CD금리(91일) </span> </a> </th> <td> 1.09 </td> <td> <img alt="보합" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_same2.gif" width="7"/> 0.00 </td> </tr> <tr class="up"> <th class="th_inter1"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_CALL" onclick="clickcr(this, 'met.8', 'IRR_CALL', '2', event);"> <span> 콜 금리 </span> </a> </th> <td> 0.76 </td> <td> <img alt="상승" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_up.gif" width="7"/> 0.03 </td> </tr> <tr class="up"> <th class="th_inter2"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_GOVT03Y" onclick="clickcr(this, 'met.8', 'IRR_GOVT03Y', '3', event);"> <span> 국고채 (3년) </span> </a> </th> <td> 1.88 </td> <td> <img alt="상승" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_up.gif" width="7"/> 0.05 </td> </tr> <tr class="up"> <th class="th_inter3"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_CORP03Y" onclick="clickcr(this, 'met.8', 'IRR_CORP03Y', '4', event);"> <span> 회사채 (3년) </span> </a> </th> <td> 2.36 </td> <td> <img alt="상승" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_up.gif" width="7"/> 0.05 </td> </tr> <tr class="same"> <th class="th_inter5"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_COFIXBAL" onclick="clickcr(this, 'met.8', 'IRR_COFIXBAL', '5', event);"> <span> COFIX 잔액 </span> </a> </th> <td> 1.02 </td> <td> <img alt="보합" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_same2.gif" width="7"/> 0.00 </td> </tr> <tr class="up"> <th class="th_inter6"> <a href="/marketindex/interestDetail.naver?marketindexCd=IRR_COFIXNEW" onclick="clickcr(this, 'met.8', 'IRR_COFIXNEW', '6', event);"> <span> COFIX 신규취급액 </span> </a> </th> <td> 0.95 </td> <td> <img alt="상승" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_up.gif" width="7"/> 0.03 </td> </tr> </tbody> </table> <table class="tbl_exchange tbl_exchange_v1 market" style="margin-top:10px;" summary="달러 인덱스"> <caption> 달러 인덱스 </caption> <colgroup> <col width="88"/> <col width="46"/> <col width="66"/> </colgroup> <thead> <tr> <th> 구분 </th> <th> 금리 </th> <th> 등락율 </th> </tr> </thead> <tbody> <tr class="other_t1 down"> <th class="th_inter7"> <a href="/marketindex/worldExchangeDetail.naver?marketindexCd=FX_USDX&fdtc=4" onclick="clickcr(this, 'rid.dollar', 'FX_USDX', '', event);"> <span> 달러 인덱스 </span> </a> </th> <td> 93.6200 </td> <td> <img alt="하락" height="6" src="https://ssl.pstatic.net/static/nfinance/ico_down.gif" width="7"/> 0.1300 </td> </tr> </tbody> </table> </div> <div class="section_aside"> <div class="tab_search search3"> <a href="#" onclick="clickcr(this, 'rch.1', '', '', event); return false;"> <span> 최근조회 </span> </a> <a href="#" onclick="clickcr(this, 'rch.3', '', '', event); return false;"> <span> MY STOCK </span> </a> </div> <h3 class="blind"> 최근조회 </h3> <table class="tbl_search" summary="최근조회 리스트"> <caption> 최근조회 </caption> <colgroup> <col/> <col width="55"/> <col width="87"/> </colgroup> <thead> <tr> <th> 업체명 </th> <th> 거래량 </th> <th> 전일비 </th> </tr> </thead> <tbody> </tbody> </table> <div class="more_info"> <span> <a href="#" onclick="clickcr(this, 'rch.5', '', '', event); return false;"> <img alt="이전" height="15" src="https://ssl.pstatic.net/static/nfinance/btn_prev2.gif" width="17"/> </a> <a href="#" onclick="clickcr(this, 'rch.6', '', '', event); return false;"> <img alt="다음" height="15" src="https://ssl.pstatic.net/static/nfinance/btn_next2.gif" width="17"/> </a> </span> <a class="btn_more _mystock_more_info" href="#" onclick="javascript:openMyitemNew('https://finance.naver.com'); clickcr(this, 'rch.7', '', '', event);"> <img alt="더보기" height="10" src="https://ssl.pstatic.net/static/nfinance/btn_more5.gif" width="33"/> </a> </div> </div> <div class="section_aside"> <h3 class="h_report"> <span> 경제분석 리포트 </span> </h3> <ul class="list_report"> <li> <a href="/research/economy_read.naver?nid=7446" onclick="clickcr(this, 'rer.list', '', '', event);"> 3분기 성적표가 도착할 예정입니다... </a> </li> <li> <a href="/research/economy_read.naver?nid=7445" onclick="clickcr(this, 'rer.list', '', '', event);"> 국내외 경제이슈 </a> </li> <li> <a href="/research/economy_read.naver?nid=7444" onclick="clickcr(this, 'rer.list', '', '', event);"> Focus on Week: 뉴스심... </a> </li> <li> <a href="/research/economy_read.naver?nid=7443" onclick="clickcr(this, 'rer.list', '', '', event);"> 국고채 금리 스프레드 점검, 중단... </a> </li> <li> <a href="/research/economy_read.naver?nid=7442" onclick="clickcr(this, 'rer.list', '', '', event);"> 중국 9월 경제지표 Review </a> </li> </ul> <a class="btn_more" href="/research/economy_list.naver" onclick="clickcr(this, 'rer.more', '', '', event);"> <img alt="경제분석 리포트 더보기" height="18" src="https://ssl.pstatic.net/static/nfinance/btn_more.gif" width="34"/> </a> </div> </div> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/info/myStock.js" type="text/javascript"> </script> <script language="javascript" src="https://ssl.pstatic.net/imgstock/static.pc/20211021173707/js/util.js" type="text/javascript"> </script> <script language="javascript"> function toggleTabSearch(e){ var currentElement = jindo.$Element(jindo.$Event(e).currentElement); var parentElement = currentElement.parent(); var id = currentElement.className(); var order = parentElement.indexOf(currentElement) + 3; parentElement.className("tab_search search"+ order); // 페이징을 위해서 order값에 따라 최근조회인지 mystock인지 type을 저장 if (order == 3) { currentType = "recent"; } else { currentType = "mystock"; } } jindo.$Fn(function(){ if ('true' == 'true') { getStockRightMenuData('000000', 'recent', 1, 'https://finance.naver.com', 'https://ssl.pstatic.net/static/nfinance'); var tabSearchArea = jindo.$$.getSingle('.tab_search'); var moreInfoArea = jindo.$Element(jindo.$$.getSingle('.tbl_search')).next().$value(); jindo.$Fn(function(e) {toggleTabSearch(e); getStockRightMenuData('000000', 'recent', 1, 'https://finance.naver.com', 'https://ssl.pstatic.net/static/nfinance'); }).attach(jindo.$$.getSingle('a' ,tabSearchArea), 'click'); jindo.$Fn(function(e) {toggleTabSearch(e); getStockRightMenuData('000000', 'mystock', 1, 'https://finance.naver.com', 'https://ssl.pstatic.net/static/nfinance'); }).attach(jindo.$$('a' ,tabSearchArea)[1], 'click'); jindo.$Fn(function(e) {updatePageForPaging (currentType, 'up', 'https://finance.naver.com', 'https://ssl.pstatic.net/static/nfinance'); }).attach(jindo.$$.getSingle('a', moreInfoArea), 'click'); jindo.$Fn(function(e) {updatePageForPaging (currentType, 'down', 'https://finance.naver.com', 'https://ssl.pstatic.net/static/nfinance'); }).attach(jindo.$$('a', moreInfoArea)[1], 'click'); } }).attach(document,"domready"); function openMyitemNew(stockHost) { var selectedElement = jindo.$Element(jindo.$$.getSingle(".tab_search")); if (selectedElement != null) { if (selectedElement.hasClass("search1")) { document.location.href = stockHost + '/mystock/recentSearchItemList.naver'; } else { document.location.href = stockHost + '/mystock/itemList.naver'; } } } </script> </div> <div id="footer"> <ul> <li class="first"> <a href="https://www.naver.com/rules/service.html" onclick="clickcr(this, 'fot.service', '', '', event);" target="_blank"> 이용약관 </a> </li> <li> <a href="/rules.naver" onclick="clickcr(this, 'fot.policy', '', '', event);" target="_blank"> 금융게시판 운영원칙 </a> </li> <li> <a href="https://www.naver.com/rules/privacy.html" onclick="clickcr(this, 'fot.privacy', '', '', event);" target="_blank"> <strong> 개인정보처리방침 </strong> </a> </li> <li> <a href="https://www.naver.com/rules/disclaimer.html" onclick="clickcr(this, 'fot.limit', '', '', event);" target="_blank"> 책임의 한계와 법적고지 </a> </li> <li> <a href="https://help.naver.com/support/alias/contents2/finance/finance_1.naver" onclick="clickcr(this, 'fot.help', '', '', event);" target="_blank"> 금융 고객센터 </a> </li> </ul> <p class="desc"> 네이버(주)가 제공하는 금융 정보는 각 콘텐츠 제공업체로부터 받는 투자 참고사항이며, 오류가 발생하거나 지연될 수 있습니다. <br/> 네이버(주)와 콘텐츠 제공업체는 제공된 정보에 의한 투자 결과에 법적인 책임을 지지 않습니다. 게시된 정보는 무단으로 배포할 수 없습니다. </p> <address> <a class="logo" href="https://www.navercorp.com/" onclick="clickcr(this, 'fot.nhn', '', '', event);" target="_blank"> <img alt="NAVER" height="11" src="https://ssl.pstatic.net/static/nfinance/2019/02/22/ci_naver.png" width="58"/> </a> <em> Copyright © </em> <a href="https://www.navercorp.com/" onclick="clickcr(this, 'fot.nhn', '', '', event);" target="_blank"> NAVER Corp. </a> <span> All Rights Reserved. </span> </address> </div> <script type="text/javascript"> function isVisible(obj) { if (obj == document) return true if (!obj) return false if (!obj.parentNode) return false if (obj.style) { if (obj.style.display == 'none') return false if (obj.style.visibility == 'hidden') return false } if (window.getComputedStyle) { var style = window.getComputedStyle(obj, "") if (style.display == 'none') return false if (style.visibility == 'hidden') return false } var style = obj.currentStyle if (style) { if (style['display'] == 'none') return false if (style['visibility'] == 'hidden') return false } return isVisible(obj.parentNode) } function isChildOf(myobj, containerObj) { while(myobj != undefined) { if (myobj == document.body) { break; } if (myobj == containerObj) { return true; } myobj = myobj.parentElement; } return false; } function gnbLayerClose(e){ var target = e.target ? e.target : e.srcElement; if (isVisible(document.getElementById('gnb_service_lyr')) || isVisible(document.getElementById('gnb_notice_lyr')) ||isVisible(document.getElementById('gnb_my_lyr')) ) { if (!isChildOf(target, document.getElementById('gnb'))) { gnbAllLayerClose(); } } } var isIE = (navigator.userAgent.toLowerCase().indexOf("msie")!=-1 && window.document.all) ? true:false; if (isIE) { document.attachEvent('onmousedown', gnbLayerClose); } else { window.addEventListener('mousedown', gnbLayerClose); } </script>
그리고 해당 페이지를 읽어옵니다. prettify()로 print를 해도 사실 확인하기는 쉽지 않습니다.어차피 우리는 접근해야할 태그를 알아 두었으니 아래와 같이 접근하면 됩니다.
In [25]:soup.find_all('span','value')[0].string
Out[25]:'1,176.00'
혹시 몰라서 find_all로 찾고 리스트로 결과가 반환되니까 첫 번째를 선택하도록 했습니다.
3-3 실전: 시카고 샌드위치 맛집 소개 사이트에 접근하기¶
이제 시카고의 베스트 샌드위치 가게를 소개하고 있는 시카고 매거진 홈페이지에 접속해서 샌드위치 가게 정보를 얻어올 생각입니다.
일단, 접속 주소는 http://goo.gl/wAtvls입니다. 원래 긴 주소인데 구글의 URL Shortener를 사용했습니다.
In [26]:import requests from bs4 import BeautifulSoup from urllib.request import urlopen headers = {'User-Agent': 'Mozilla/5.0'} url = 'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/' html = requests.get(url, headers = headers).text soup = BeautifulSoup(html, "html.parser") soup
Out[26]:<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <link href="https://gmpg.org/xfn/11" rel="profile"/> <title>The 50 Best Sandwiches in Chicago – Chicago Magazine</title> <style type="text/css"> .heateorSssInstagramBackground{background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)} div.heateor_sss_horizontal_sharing i.heateorSssInstagramBackground{background:#000!important;}div.heateor_sss_standard_follow_icons_container i.heateorSssInstagramBackground{background:#000;} .heateor_sss_horizontal_sharing .heateorSssSharing,.heateor_sss_standard_follow_icons_container .heateorSssSharing{ background-color: #000; color: #fff; border-width: 0px; border-style: solid; border-color: transparent; } .heateor_sss_horizontal_sharing .heateorSssTCBackground{ color:#666; } .heateor_sss_horizontal_sharing .heateorSssSharing:hover,.heateor_sss_standard_follow_icons_container .heateorSssSharing:hover{ border-color: transparent; } .heateor_sss_vertical_sharing .heateorSssSharing,.heateor_sss_floating_follow_icons_container .heateorSssSharing{ color: #fff; border-width: 0px; border-style: solid; border-color: transparent; } .heateor_sss_vertical_sharing .heateorSssTCBackground{ color:#666; } .heateor_sss_vertical_sharing .heateorSssSharing:hover,.heateor_sss_floating_follow_icons_container .heateorSssSharing:hover{ border-color: transparent; } @media screen and (max-width:783px) {.heateor_sss_vertical_sharing{display:none!important}}@media screen and (max-width:783px) {.heateor_sss_floating_follow_icons_container{display:none!important}}</style><meta content="max-image-preview:large" name="robots"/> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <script data-cfasync="false" data-pagespeed-no-defer="" type="text/javascript">//<![CDATA[ var gtm4wp_datalayer_name = "dataLayer"; var dataLayer = dataLayer || []; //]]> </script> <!-- End Google Tag Manager for WordPress by gtm4wp.com --><link href="//use.fontawesome.com" rel="dns-prefetch"> <link href="//s.w.org" rel="dns-prefetch"/> <link href="https://www.chicagomag.com/feed/" rel="alternate" title="Chicago Magazine » Feed" type="application/rss+xml"/> <link href="https://www.chicagomag.com/comments/feed/" rel="alternate" title="Chicago Magazine » Comments Feed" type="application/rss+xml"/> <link href="https://www.chicagomag.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1" id="wp-block-library-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/wordpress-popular-posts/assets/css/wpp.css?ver=5.2.4" id="wordpress-popular-posts-css-css" media="all" rel="stylesheet"/> <link href="//use.fontawesome.com/releases/v5.13.0/css/all.css?ver=5.8.1" id="font-awesome-free-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/unsemantic-grid.min.css?ver=3.0.2" id="generate-style-grid-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/style.min.css?ver=3.0.2" id="generate-style-css" media="all" rel="stylesheet"/> <style id="generate-style-inline-css"> body{background-color:#efefef;color:#3a3a3a;}a{color:#1e73be;}a:hover, a:focus, a:active{color:#000000;}body .grid-container{max-width:1100px;}.wp-block-group__inner-container{max-width:1100px;margin-left:auto;margin-right:auto;}body, button, input, select, textarea{font-family:-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}body{line-height:1.5;}.entry-content > [class*="wp-block-"]:not(:last-child){margin-bottom:1.5em;}.main-title{font-size:45px;}.main-navigation .main-nav ul ul li a{font-size:14px;}.sidebar .widget, .footer-widgets .widget{font-size:17px;}h1{font-weight:300;font-size:40px;}h2{font-weight:300;font-size:30px;}h3{font-size:20px;}h4{font-size:inherit;}h5{font-size:inherit;}@media (max-width:768px){.main-title{font-size:30px;}h1{font-size:30px;}h2{font-size:25px;}}.top-bar{background-color:#636363;color:#ffffff;}.top-bar a{color:#ffffff;}.top-bar a:hover{color:#303030;}.site-header{background-color:#ffffff;color:#3a3a3a;}.site-header a{color:#3a3a3a;}.main-title a,.main-title a:hover{color:#222222;}.site-description{color:#757575;}.main-navigation,.main-navigation ul ul{background-color:#222222;}.main-navigation .main-nav ul li a,.menu-toggle, .main-navigation .menu-bar-items{color:#ffffff;}.main-navigation .main-nav ul li:hover > a,.main-navigation .main-nav ul li:focus > a, .main-navigation .main-nav ul li.sfHover > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{color:#ffffff;background-color:#3f3f3f;}button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus{color:#ffffff;}.main-navigation .main-nav ul li[class*="current-menu-"] > a{color:#ffffff;background-color:#3f3f3f;}.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a{color:#ffffff;background-color:#3f3f3f;}.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{color:#ffffff;background-color:#3f3f3f;}.main-navigation ul ul{background-color:#3f3f3f;}.main-navigation .main-nav ul ul li a{color:#ffffff;}.main-navigation .main-nav ul ul li:hover > a,.main-navigation .main-nav ul ul li:focus > a,.main-navigation .main-nav ul ul li.sfHover > a{color:#ffffff;background-color:#4f4f4f;}.main-navigation .main-nav ul ul li[class*="current-menu-"] > a{color:#ffffff;background-color:#4f4f4f;}.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a{color:#ffffff;background-color:#4f4f4f;}.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header{background-color:#ffffff;}.entry-meta{color:#595959;}.entry-meta a{color:#595959;}.entry-meta a:hover{color:#1e73be;}.sidebar .widget{background-color:#ffffff;}.sidebar .widget .widget-title{color:#000000;}.footer-widgets{background-color:#ffffff;}.footer-widgets .widget-title{color:#000000;}.site-info{color:#ffffff;background-color:#222222;}.site-info a{color:#ffffff;}.site-info a:hover{color:#606060;}.footer-bar .widget_nav_menu .current-menu-item a{color:#606060;}input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select{color:#666666;background-color:#fafafa;border-color:#cccccc;}input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus{color:#666666;background-color:#ffffff;border-color:#bfbfbf;}button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background){color:#ffffff;background-color:#666666;}button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover{color:#ffffff;background-color:#3f3f3f;}a.generate-back-to-top{background-color:rgba( 0,0,0,0.4 );color:#ffffff;}a.generate-back-to-top:hover,a.generate-back-to-top:focus{background-color:rgba( 0,0,0,0.6 );color:#ffffff;}@media (max-width:768px){.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{background:none;color:#ffffff;}}.inside-top-bar{padding:10px;}.inside-header{padding:40px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-40px;width:calc(100% + 80px);max-width:calc(100% + 80px);}.rtl .menu-item-has-children .dropdown-menu-toggle{padding-left:20px;}.rtl .main-navigation .main-nav ul li.menu-item-has-children > a{padding-right:20px;}.site-info{padding:20px;}@media (max-width:768px){.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header, .wp-block-group__inner-container{padding:30px;}.site-info{padding-right:10px;padding-left:10px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-30px;width:calc(100% + 60px);max-width:calc(100% + 60px);}}.one-container .sidebar .widget{padding:0px;}@media (max-width:768px){.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder){display:block;}.main-navigation ul,.gen-sidebar-nav{display:none;}[class*="nav-float-"] .site-header .inside-header > *{float:none;clear:both;}} </style> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/mobile.min.css?ver=3.0.2" id="generate-mobile-style-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/components/font-icons.min.css?ver=3.0.2" id="generate-font-icons-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/Chicago%20Magazine/style.css?ver=1632777141" id="generate-child-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/css/sassy-social-share-public.css?ver=3.3.20" id="heateor_sss_frontend_css-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/admin/css/sassy-social-share-svg.css?ver=3.3.20" id="heateor_sss_sharing_default_svg-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/styles/ytprefs.min.css?ver=13.4.2" id="__EPYT__style-css" media="all" rel="stylesheet"/> <style id="__EPYT__style-inline-css"> .epyt-gallery-thumb { width: 33.333%; } @media (min-width:0px) and (max-width: 767px) { .epyt-gallery-rowbreak { display: none; } .epyt-gallery-allthumbs[class*="epyt-cols"] .epyt-gallery-thumb { width: 100% !important; } } </style> <link href="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/lity.min.css?ver=13.4.2" id="__disptype__-css" media="all" rel="stylesheet"/> <script id="wpp-json" type="application/json"> {"sampling_active":0,"sampling_rate":100,"ajax_url":"https:\/\/www.chicagomag.com\/wp-json\/wordpress-popular-posts\/v1\/popular-posts","ID":11772,"token":"d5bd8096d7","lang":0,"debug":0} </script> <script id="wpp-js-js" src="https://www.chicagomag.com/wp-content/plugins/wordpress-popular-posts/assets/js/wpp.min.js?ver=5.2.4"></script> <script id="jquery-core-js" src="https://www.chicagomag.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0"></script> <script id="jquery-migrate-js" src="https://www.chicagomag.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2"></script> <script id="__dispload__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/lity.min.js?ver=13.4.2"></script> <script id="__ytprefs__-js-extra"> var _EPYT_ = {"ajaxurl":"https:\/\/www.chicagomag.com\/wp-admin\/admin-ajax.php","security":"23c5dc1d8e","gallery_scrolloffset":"20","eppathtoscripts":"https:\/\/www.chicagomag.com\/wp-content\/plugins\/youtube-embed-plus-pro\/scripts\/","eppath":"https:\/\/www.chicagomag.com\/wp-content\/plugins\/youtube-embed-plus-pro\/","epresponsiveselector":"[\"iframe.__youtube_prefs_widget__\"]","epdovol":"1","version":"13.4.2","evselector":"iframe.__youtube_prefs__[src], iframe[src*=\"youtube.com\/embed\/\"], iframe[src*=\"youtube-nocookie.com\/embed\/\"]","ajax_compat":"","ytapi_load":"light","pause_others":"","stopMobileBuffer":"1","vi_active":"","vi_js_posttypes":[]}; </script> <script id="__ytprefs__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/ytprefs.min.js?ver=13.4.2"></script> <link href="https://www.chicagomag.com/wp-json/" rel="https://api.w.org/"/><link href="https://www.chicagomag.com/wp-json/wp/v2/posts/11772" rel="alternate" type="application/json"/><link href="https://www.chicagomag.com/xmlrpc.php?rsd" rel="EditURI" title="RSD" type="application/rsd+xml"/> <link href="https://www.chicagomag.com/wp-includes/wlwmanifest.xml" rel="wlwmanifest" type="application/wlwmanifest+xml"/> <link href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-chicago/" rel="canonical"/> <link href="https://www.chicagomag.com/?p=11772" rel="shortlink"/> <link href="https://www.chicagomag.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-chicago%2F" rel="alternate" type="application/json+oembed"/> <link href="https://www.chicagomag.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-chicago%2F&format=xml" rel="alternate" type="text/xml+oembed"/> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <script data-cfasync="false" data-pagespeed-no-defer="" type="text/javascript">//<![CDATA[ var dataLayer_content = {"pagePostType":"post","pagePostType2":"single-post","pageCategory":["chicago-magazine"],"pageAttributes":["best-of-chicago","dining-drinking","print-specific-tags-cover-story"],"pagePostAuthor":"Chicago Magazine","pagePostTerms":{"category":["Chicago Magazine"],"post_tag":["Best of Chicago","Dining & Drinking","Print-Specific Tags - Cover Story"],"issue":["November 2012"],"adcat":["Dining & Drinking"]}}; dataLayer.push( dataLayer_content );//]]> </script> <script data-cfasync="false">//<![CDATA[ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.'+'js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P4M4MH7');//]]> </script> <!-- End Google Tag Manager --> <!-- End Google Tag Manager for WordPress by gtm4wp.com --><meta content="width=device-width, initial-scale=1" name="viewport"/><link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="icon" sizes="32x32"/> <link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="icon" sizes="192x192"/> <link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="apple-touch-icon"/> <meta content="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" name="msapplication-TileImage"> <!-- BEGIN Typekit Fonts for WordPress --> <link href="https://use.typekit.net/ukb3erh.css" rel="stylesheet"/> <!-- END Typekit Fonts for WordPress --> <!-- start seo fields --> <meta content="Our list of Chicago’s 50 best sandwiches, ranked in order of deliciousness" name="description"/> <meta content="sandwiches, dining" name="keywords"/> <meta content="en_US" property="og:locale"/> <meta content="article" property="og:type"/> <meta content="The 50 Best Sandwiches in Chicago" property="og:title"/> <meta content="Our list of Chicago’s 50 best sandwiches, ranked in order of deliciousness" property="og:description"/> <meta content="https://www.chicagomag.com/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/sandwich-old-oak.jpg" property="og:image"/> <link href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/" rel="canonical"> <meta content="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/" property="og:url"/> <meta content="Chicago Magazine" property="og:site_name"/> <!--<meta property="article:tag" content="" />--> <meta content="Chicago Magazine" property="article:section"/> <!-- <meta property="article:published_time" content="" /> <meta property="article:modified_time" content="" /> <meta property="og:updated_time" content="" /> --> <meta content="summary_large_image" name="twitter:card"/> <meta content="https://www.chicagomag.com/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/sandwich-old-oak.jpg" name="twitter:image"/> <meta content="Our list of Chicago’s 50 best sandwiches, ranked in order of deliciousness" name="twitter:description"/> <meta content="The 50 Best Sandwiches in Chicago" name="twitter:title"/> <!-- end seo fields --> <!-- GA Google Analytics @ https://m0n.co/ga --> <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-297666-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-297666-1'); </script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P4M4MH7');</script> <!-- End Google Tag Manager --> <!-- start chartbeat code --> <script type="text/javascript"> (function() { /** CONFIGURATION START **/ var _sf_async_config = window._sf_async_config = (window._sf_async_config || {}); _sf_async_config.uid = 25745; _sf_async_config.domain = 'chicagomag.com'; _sf_async_config.flickerControl = false; _sf_async_config.useCanonical = true; _sf_async_config.useCanonicalDomain = true; _sf_async_config.sections = 'Chicago Magazine'; _sf_async_config.authors = 'Chicago Magazine'; /** CONFIGURATION END **/ function loadChartbeat() { var e = document.createElement('script'); var n = document.getElementsByTagName('script')[0]; e.type = 'text/javascript'; e.async = true; e.src = '//static.chartbeat.com/js/chartbeat.js'; n.parentNode.insertBefore(e, n); } loadChartbeat(); })(); </script> <script async="" src="//static.chartbeat.com/js/chartbeat_mab.js"></script> <!-- end chartbeat code --> <!-- Start GPT Tag --> <script async="" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script> <script> window.googletag = window.googletag || {cmd: []}; googletag.cmd.push(function() { googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-1') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-2') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-3') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-4') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-5') .setTargeting('pos', ['5']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-6') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-7') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-8') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-9') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-10') .setTargeting('pos', ['5']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-11') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250],[300,600]], 'div-gpt-ad-2789321-12') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-13') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-14') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-15') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.pubads().setTargeting('adcat', ['dining-drinking']); googletag.enableServices(); }); </script> <!-- End GPT Tag --> <!-- below is header style for all pages besides home --> <style> /* logo / nav -------------------------------------------------------------- */ .site-header { width: 18% !important; display: table !important; float: left !important; height: 90px; } .inside-header { display: table-cell !important; vertical-align: bottom !important; padding: 0 !important; padding-left: 5vw !important; } .main-navigation { width: 82% !important; display: table !important; position: relative !important; float: left !important; clear: inherit !important; height: 90px; } .inside-navigation { display: table-cell !important; vertical-align: bottom !important; padding-right: 5vw !important; text-align: right !important; } .main-navigation ul { border: 0 !important; line-height: 1em !important; } .main-navigation .main-nav ul li a { padding-left: 15px !important; padding-right: 15px !important; line-height: 1em !important; } .main-navigation .main-nav ul li:last-of-type a { padding-right: 0 !important; } /* layout -------------------------------------------------------------- */ .separate-containers .site-main { margin-top: 0 !important; } .post-template-single-package-child.separate-containers .site-main { margin-top: 3.05555vw !important; } @media only screen and (max-width: 1024px) { .site-header { width: 100% !important; display: block !important; float: none !important; height: inherit !important; } .main-navigation ul { border: 0 !important; line-height: 1em !important; } .main-navigation .main-nav ul li a { padding-left: 10px !important; padding-right: 10px !important; line-height: 1em !important; } .inside-header { display: block !important; vertical-align: inherit !important; padding: 3.75vw 0 0 0 !important; } .site-logo { display: inline-block; } .nav-aligned-center .main-navigation { text-align: center; } .main-navigation { width: 100% !important; display: inline-block !important; position: relative !important; float: none !important; clear: inherit !important; height: inherit !important; } .inside-navigation { display: inline-block !important; vertical-align: inherit !important; padding-right: 0 !important; text-align: center !important; margin: 0 auto !important; margin-top: 3.75vw !important; } } @media only screen and (max-width: 768px) { .site-header { width: 100% !important; display: table !important; float: left !important; height: 90px; } .main-navigation, .inside-navigation { display: none !important; } } </style> <style></style></link></meta></link></meta></head> <body class="post-template-default single single-post postid-11772 single-format-standard wp-custom-logo wp-embed-responsive no-sidebar nav-below-header separate-containers fluid-header active-footer-widgets-3 nav-aligned-center header-aligned-center dropdown-hover" itemscope="" itemtype="https://schema.org/Blog"> <div class="grid-toggle-wrap"><a class="grid-toggle">.</a></div> <div class="grid-guide"> <div class="grid-guide-col"><span>1</span></div> <div class="grid-guide-col"><span>2</span></div> <div class="grid-guide-col"><span>3</span></div> <div class="grid-guide-col"><span>4</span></div> <div class="grid-guide-col"><span>5</span></div> <div class="grid-guide-col"><span>6</span></div> <div class="grid-guide-col"><span>7</span></div> <div class="grid-guide-col"><span>8</span></div> <div class="grid-guide-col"><span>9</span></div> <div class="grid-guide-col"><span>10</span></div> <div class="grid-guide-col"><span>11</span></div> <div class="grid-guide-col"><span>12</span></div> <div class="grid-guide-col"><span>13</span></div> <div class="grid-guide-col"><span>14</span></div> <div class="grid-guide-col"><span>15</span></div> <div class="grid-guide-col"><span>16</span></div> <div class="grid-guide-col"><span>17</span></div> <div class="grid-guide-col"><span>18</span></div> <div class="grid-guide-col"><span>19</span></div> <div class="grid-guide-col"><span>20</span></div> <div class="grid-guide-col"><span>21</span></div> <div class="grid-guide-col"><span>22</span></div> <div class="grid-guide-col"><span>23</span></div> <div class="grid-guide-col"><span>24</span></div> </div> <div class="ad-space ad-space-leader top-ad-space hide-on-mobile"> <!-- GPT AdSlot 1 for Ad unit 'trb.chicagomag/hp' ### Size: [[728,90]] --> <div id="div-gpt-ad-2789321-1"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-1'); }); </script> </div> <!-- End AdSlot 1 --> </div> <div class="ad-space ad-space-leader top-ad-space hide-on-desktop hide-on-tablet"> <!-- GPT AdSlot 6 for Ad unit 'trb.chicagomag/hp' ### Size: [[320,50]] --> <div id="div-gpt-ad-2789321-6"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-6'); }); </script> </div> <!-- End AdSlot 6 --> </div> <div id="nav2-open"> <a class="nav2-toggle"><i class="fa fa-bars"></i></a> </div> <div id="nav2-close"> <a class="nav2-toggle"><i class="fa fa-times"></i></a> </div> <div id="nav2-overlay"></div> <div id="nav2-overlay-top"></div> <div id="nav2-overlay-btm"></div> <div id="nav2-inner-overlay"> <div id="nav2-inner"> <div class="grid-container grid-parent"> <div class="grid-5 prefix-1 suffix-1 nav2-cover hide-on-mobile"> <img src="/wp-content/uploads/2020/12/logo-alt.jpg"/> <img src=""/> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC" target="_blank">Subscribe</a> <a href="/newsletters/">Newsletters</a> <a class="nav-social" href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a class="nav-social" href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a class="nav-social" href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a class="nav-social" href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <div class="grid-100 nav2-cover hide-on-desktop"> <img src="/wp-content/uploads/2020/12/logo-alt.jpg"/> <form action="https://www.chicagomag.com/" class="search-form" method="get"> <label> <span class="screen-reader-text">Search for:</span> <input class="search-field" name="s" placeholder="Search …" title="Search for:" type="search" value=""/> </label> <input class="search-submit" type="submit" value="Search"/></form> </div> <div class="grid-7 prefix-1 suffix-1 mobile-grid-100 mobile-prefix-0 mobile-suffix-0"> <div class="section-header"> <div class="section-divide"></div> <h2>Sections</h2> </div> <a href="https://www.chicagomag.com/news/">News & Politics</a> <a href="https://www.chicagomag.com/dining-drinking/">Dining & Drinking</a> <a href="https://www.chicagomag.com/city-life/">City Life</a> <a href="https://www.chicagomag.com/arts-culture/">Culture</a> <a href="https://www.chicagomag.com/real-estate/">Real Estate</a> <a href="https://www.chicagomag.com/style-shopping/">Style</a> <div class="section-header"> <div class="section-divide"></div> <h2>Featured</h2> </div> <a href="https://www.chicagomag.com/video/">Video</a> <a href="https://www.chicagomag.com/long-reads/">Long Reads</a> <a href="https://www.chicagomag.com/chicago-magazine/april-2020/best-new-restaurants/">Best New Restaurants</a> <a href="https://www.chicagomag.com/top-doctors/">Top Doctors</a> </div> <div class="grid-7 suffix-1 mobile-grid-100 mobile-suffix-1"> <div class="section-header"> <div class="section-divide"></div> <h2>Magazine</h2> </div> <a href="https://chicagomag.zinioapps.com/my-library/magazines">All Issues</a> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="https://cma.pcdfusion.com/pcd/CustomerSupport/Account/Login?ReturnUrl=%2fpcd%2fCustomerSupport%2fApp%2f3141">Manage Subscription</a> <a href="https://www.chicagomag.com/advertise/">Advertise</a> <div class="section-header"> <div class="section-divide"></div> <h2>More</h2> </div> <a href="https://www.chicagomag.com/events/">Events</a> <a href="https://www.chicagomag.com/about-the-magazine/">About Us</a> <a href="https://www.chicagomag.com/contact-us/">Contact Us</a> <a href="https://www.chicagomag.com/follow-us/">Follow Us</a> <a href="https://www.chicagomag.com/resource-guide/">Resource Guide</a> </div> <div class="mobile-grid-100 hide-on-desktop" style="margin-bottom: 10vw;"> <img src="/wp-content/archive/Chicago-Magazine/December-2020/CMAG1220.jpg" style="margin-top: 5vw;"/> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="/newsletters/">Newsletters</a> <a class="nav-social" href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a class="nav-social" href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a class="nav-social" href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a class="nav-social" href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> </div> </div> </div> <div id="top-right-nav"> <div id="search-overlay"> <div id="search-close"> <a class="search-close-btn"> <i class="fas fa-times"></i> </a> </div> <form action="https://www.chicagomag.com/" class="search-form" method="get"> <label> <span class="screen-reader-text">Search for:</span> <input class="search-field" name="s" placeholder="Search …" title="Search for:" type="search" value=""/> </label> <input class="search-submit" type="submit" value="Search"/></form> </div> <div class="top-right-nav-links"> <a class="search-open"><i class="fa fa-search"></i></a> <a href="/events/">Events</a> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> </div> </div> <div id="navbar"> <div id="nav2-open"> <a class="nav2-toggle"><i class="fa fa-bars"></i></a> </div> <a href="/"><img class="navbar-logo" src="/wp-content/uploads/2020/10/logo.png"/></a> </div> <a class="screen-reader-text skip-link" href="#content" title="Skip to content">Skip to content</a> <header class="site-header" id="masthead" itemscope="" itemtype="https://schema.org/WPHeader"> <div class="inside-header grid-container grid-parent"> <div class="site-logo"> <a href="https://www.chicagomag.com/" rel="home" title="Chicago Magazine"> <img alt="Chicago Magazine" class="header-image is-logo-image" src="https://www.chicagomag.com/wp-content/uploads/2020/10/logo.png" title="Chicago Magazine"> </img></a> </div> </div> </header> <nav class="main-navigation sub-menu-right" id="site-navigation" itemscope="" itemtype="https://schema.org/SiteNavigationElement"> <div class="inside-navigation grid-container grid-parent"> <button aria-controls="primary-menu" aria-expanded="false" class="menu-toggle"> <span class="mobile-menu">Menu</span> </button> <div class="main-nav" id="primary-menu"><ul class="menu sf-menu" id="menu-main"><li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32855" id="menu-item-32855"><a href="https://www.chicagomag.com/news/">News & Politics</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32856" id="menu-item-32856"><a href="https://www.chicagomag.com/dining-drinking/">Dining & Drinking</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-33687" id="menu-item-33687"><a href="https://www.chicagomag.com/city-life/">City Life</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32857" id="menu-item-32857"><a href="https://www.chicagomag.com/arts-culture/">Culture</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32858" id=#34;menu-item-32858"><a href="https://www.chicagomag.com/real-estate/">Real Estate</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32859" id="menu-item-32859"><a href="https://www.chicagomag.com/style-shopping/">Style</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-29785" id="menu-item-29785"><a href="https://www.chicagomag.com/top-doctors/">Top Docs</a></li> </ul></div> </div> </nav> <div class="hfeed site grid-container container grid-parent" id="page"> <div class="site-content" id="content"> <div id="page-title"></div> <!-- start external content --> <!-- end external content --> <div class="content-area grid-parent mobile-grid-100 grid-100 tablet-grid-100" id="primary"> <main class="site-main" id="main"> <style> .article-wrap { margin-top: 2.22222vw !important; } .single .article-img { text-align: left; } @media only screen and (max-width: 1024px) { .container.grid-container { width: 100%; } .article-wrap .grid-10:first-of-type { display: none; } .article-side { padding-left: 0 !important; } .article-img { max-width: 100%; } } @media only screen and (max-width: 480px) { .site-header { width: 100% !important; height: 70px; } .main-navigation { display: none !important; } .article-body p, .article-body li { font-size: 18px; } .drop-cap { width: 70px; height: 70px; font-size: 60px; line-height: 70px; } .drop-cap-secondary { font-size: 60px; height: 45px; } } </style> <article class="post-11772 post type-post status-publish format-standard hentry category-chicago-magazine tag-best-of-chicago tag-dining-drinking tag-print-specific-tags-cover-story issue-november-2012 adcat-dining-drinking" id="post-11772" itemscope="" itemtype="https://schema.org/CreativeWork"> <!-- start featured --> <!-- start super article featured image --> <!-- end super article featured image --> <!-- start head and deck --> <div class="grid-container grid-parent art-head-deck"> <div class="grid-12 prefix-5 tablet-grid-14 tablet-prefix-0 mobile-grid-100 mobile-prefix-0"> <div class="art-head h60">The 50 Best Sandwiches in Chicago</div> <div class="art-deck"><p>Our list of Chicago’s 50 best sandwiches, ranked in order of deliciousness</p> </div> <div class="art-byline-wrap"> </div> <div class="art-timestamp">October 9, 2012, 6:12 pm</div> <div class="heateor_sss_sharing_container heateor_sss_horizontal_sharing" heateor-sss-data-href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-chicago/" ss-offset="0"><ul class="heateor_sss_sharing_ul"><li class="heateorSssSharingRound"><i alt="Facebook" class="heateorSssSharing heateorSssFacebookBackground" onclick='heateorSssPopup("https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-chicago%2F")' style="width:24px;height:24px;border-radius:999px;" title="Facebook"><ss class="heateorSssSharingSvg heateorSssFacebookSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Twitter" class="heateorSssSharing heateorSssTwitterBackground" onclick='heateorSssPopup("http://twitter.com/intent/tweet?text=The%2050%20Best%20Sandwiches%20in%20Chicago&url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-chicago%2F")' style="width:24px;height:24px;border-radius:999px;" title="Twitter"><ss class="heateorSssSharingSvg heateorSssTwitterSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Email" class="heateorSssSharing heateorSssEmailBackground" onclick="window.open('mailto:?subject=' + decodeURIComponent('The%2050%20Best%20Sandwiches%20in%20Chicago' ).replace('&', '%26') + '&body=' + decodeURIComponent('https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-chicago%2F' ), '_blank')" style="width:24px;height:24px;border-radius:999px;" title="Email"><ss class="heateorSssSharingSvg heateorSssEmailSvg" style="display:block"></ss></i></li><li class="heateorSssSharingRound"><i alt="Copy Link" class="heateorSssSharing heateorSssCopyLinkBackground" style="width:24px;height:24px;border-radius:999px;" title="Copy Link"><ss class="heateorSssSharingSvg heateorSssCopyLinkSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Comment" class="heateorSssSharing heateorSssCommentBackground" style="width:24px;height:24px;border-radius:999px;" title="Comment"><a href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-chicago/#respond" rel="nofollow"><ss class="heateorSssSharingSvg heateorSssCommentSvg" style="display:block"></ss></a></i></li></ul><div class="heateorSssClear"></div></div> </div> </div> <!-- end head and deck --> <!-- start featured image below meta data --> <div class="grid-container grid-parent featured-img"> <div class="grid-12 prefix-5 tablet-grid-14 tablet-prefix-0 mobile-grid-100 mobile-prefix-0"> <div class="article-img"> <figure> <img src="/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-Chicago/sandwich-old-oak.jpg"/> <figcaption>BLT at Old Oak Tap, the No. 1 sandwich in Chicago. <span class="photo-credit">Photograph: Anna Knott; Food Stylist: Lisa Kuehl</span></figcaption> </figure> </div> </div> </div> <!-- end featured image below meta data --> <!-- end featured --> <!-- start article wrap --> <div class="grid-container grid-parent article-wrap"> <div class="grid-4 hide-on-tablet hide-on-mobile"> </div> <div class="grid-12 prefix-1 tablet-grid-14 tablet-prefix-0 suffix-1 mobile-grid-100 mobile-prefix-0 mobile-suffix-0"> <div class="article-body"> <p><span class="dropcap">F</span>or generations, sandwiches were the ultimate guilty pleasure of subcultures that had no patience for guilt: hungry bachelors, school kids, working stiffs, old men in delis. To fridge-foraging rubes like Dagwood, quality wasn’t half as important as quantity. The sandwich was one of the only snacks you were allowed to pile as high as you wanted with anything you desired and cram into your face with both hands—a meal so inelegant and blithely proud of its inelegance that it came in six-foot segments for parties. And we ate it. Standing up.</p> <section class="related-content pull-right"> <h3>Related Content</h3> <ul> <li><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in- Chicago-The-Best-Sliders-in-Town">The Best Sliders in Town</a></li> <li><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in- Chicago-Where-to-Get-Your-Fix-Around-the-Clock">Where to Get Your Fix Around the Clock</a></li> </ul> </section> <p>Now we’ve got French dips made with shaved prime rib, po’ boys with organic shrimp, and grilled cheese with fancy pimiento cheese. Hell, you can get a buttered ciabatta layered with local eggs, house-cured speck, and fontina for breakfast at Balsan if the idea of spending $19 for a ham and egg sandwich does not scandalize you. What in the name of John Montagu is going on here?</p> <p>The sandwich pendulum has always swung erratically from the treat of the nobility to the fuel of the proletariat. But what we’re witnessing now is the sharpest swerve yet toward the land of fine dining—a shift that overlaps, not coincidentally, with the great democratization of Chicago’s restaurants. Ground zero for the boom is Publican Quality Meats, where Paul Kahan regards sandwiches as serious dishes. So does Acadia’s Ryan McCaskey, who makes a mean lobster roll, and Rick Bayless, who offers up a vegetarian stunner at Xoco.</p> <p>To guide you through the bustling sandscape, we fanned out across the city and suburbs, hitting spots high and low in search of anything delicious between two slices of bread. For the purposes of this story, we defined “sandwich” in the strictest of terms: no wraps, dumplings, or open-faced pretenders. Hamburgers and hot dogs didn’t qualify. Italian beef sandwiches did, but not one made this list. (Face facts: Chicago’s spongy grease bomb is not among the better contributions to the genre.) We gave points to the well crafted, the fresh, and the robust, anchored by bread with enough distinct character to bolster the proceedings without overshadowing or interfering.</p> <p>The result: our list of Chicago’s 50 best sandwiches, ranked in order of deliciousness. Some are ingenious, such as Scofflaw’s layered masterpiece of braised brisket, pork belly, and pork loin. Others are blunt and glorious classics, done simply and done right. (Meatball sub from Bari, take a bow.)</p> <p>In our research, we learned that the sandwich is a wily chameleon, soaking up and synthesizing every trend, be it the resurgence of house-cured charcuterie or the sudden ubiquity of arugula. We learned to ask for extra napkins ahead of time. And we learned, above all, that quality and quantity can intersect in restaurants, and there’s no shame in that. Only joy.</p> <div class="sammy" style="position: relative;"> <div class="sammyRank">1</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/"><b>BLT</b><br/> Old Oak Tap<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">2</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Au-Cheval-Fried-Bologna/"><b>Fried Bologna</b><br/> Au Cheval<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">3</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Xoco-Woodland-Mushroom/"><b>Woodland Mushroom</b><br/> Xoco<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">4</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Als-Deli-Roast-Beef/"><b>Roast Beef</b><br/> Al’s Deli<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">5</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Publican-Quality-Meats-PB-L/"><b>PB&L</b><br/> Publican Quality Meats<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">6</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Hendrickx-Belgian-Bread-Crafter-Belgian-Chicken-Curry-Salad/"><b>Belgian Chicken Curry Salad</b><br/> Hendrickx Belgian Bread Crafter<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">7</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Acadia-Lobster-Roll/"><b>Lobster Roll</b><br/> Acadia<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">8</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Birchwood-Kitchen-Smoked-Salmon-Salad/"><b>Smoked Salmon Salad</b><br/> Birchwood Kitchen<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">9</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Cemitas-Puebla-Atomica-Cemitas/"><b>Atomica Cemitas</b><br/> Cemitas Puebla<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">10</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Nana-Grilled-Laughing-Bird-Shrimp-and-Fried-Oyster-Po-Boy/"><b>Grilled Laughing Bird Shrimp and Fried Po’ Boy</b><br/> Nana<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">11</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Lula-Cafe-Ham-and-Raclette-Panino/"><b>Ham and Raclette Panino</b><br/> Lula Cafe<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">12</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Ricobenes-Breaded-Steak/"><b>Breaded Steak</b><br/> Ricobene’s<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">13</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Frog-n-Snail-The-Hawkeye/"><b>The Hawkeye</b><br/> Frog n Snail<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">14</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Crosbys-Kitchen-Chicken-Dip/"><b>Chicken Dip</b><br/> Crosby’s Kitchen<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">15</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Longman-and-Eagle-Wild-Boar-Sloppy-Joe/"><b>Wild Boar Sloppy Joe</b><br/> Longman & Eagle<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">16</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Bari-Meatball-Sub/"><b>Meatball Sub</b><br/> Bari<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">17</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Mannys-Corned-Beef/"><b>Corned Beef</b><br/> Manny’s<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">18</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Eggys-Turkey-Club/"><b>Turkey Club</b><br/> Eggy’s<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">19</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Jerusalem-Falafel/"><b>Falafel</b><br/> Old Jerusalem<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">20</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Mindys-HotChocolate-Crab-Cake/"><b>Crab Cake</b><br/> Mindy’s HotChocolate<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">21</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Olgas-Delicatessen-Chicken-Schnitzel/"><b>Chicken Schnitzel</b><br/> Olga’s Delicatessen<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">22</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Dawali-Mediterranean-Kitchen-Shawarma/"><b>Shawarma</b><br/> Dawali Mediterranean Kitchen<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">23</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Big-Jones-Toasted-Pimiento-Cheese/"><b>Toasted Pimiento Cheese</b><br/> Big Jones<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">24</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-La-Pane-Vegetarian-Panino/"><b>Vegetarian Panino</b><br/> La Pane<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">25</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Pastoral-Cali-Chevre/"><b>Cali Chèvre</b><br/> Pastoral<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">26</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Maxs-Deli-Pastrami/"><b>Pastrami</b><br/> Max’s Deli<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">27</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Luckys-Sandwich-Co-The-Fredo/"><b>The Fredo</b><br/> Lucky’s Sandwich Co.<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">28</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-City-Provisions-Smoked-Ham/"><b>Smoked Ham</b><br/> City Provisions<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">29</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Papas-Cache-Sabroso-Jibarito/"><b>Jibarito</b><br/> Papa’s Cache Sabroso<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">30</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Bavettes-Bar-and-Boeuf-Shaved-Prime-Rib/"><b>Shaved Prime Rib</b><br/> Bavette’s Bar & Boeuf<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">31</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Hannahs-Bretzel-Serrano-Ham-and-Manchego-Cheese/"><b>Serrano Ham and Manchego Cheese</b><br/> Hannah’s Bretzel<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">32</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-La-Fournette-Tuna-Salad/"><b>Tuna Salad</b><br/> La Fournette<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">33</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Paramount-Room-Paramount-Reuben/"><b>Paramount Reuben</b><br/> Paramount Room<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">34</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Melt-Sandwich-Shoppe-The-Istanbul/"><b>The Istanbul</b><br/> Melt Sandwich Shoppe<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">35</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Floriole-Cafe-and-Bakery-BAD/"><b>B.A.D.</b><br/> Floriole Cafe & Bakery<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">36</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-First-Slice-Pie-Cafe-Duck-Confit-and-Mozzarella/"><b>Duck Confit and Mozzarella</b><br/> First Slice Pie Café<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">37</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Troquet-Croque-Monsieur/"><b>Croque Monsieur</b><br/> Troquet<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">38</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Grahamwich-Green-Garbanzo/"><b>Green Garbanzo</b><br/> Grahamwich<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">39</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Saigon-Sisters-The-Hen-House/"><b>The Hen House</b><br/> Saigon Sisters<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">40</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Rosalias-Deli-Tuscan-Chicken/"><b>Tuscan Chicken</b><br/> Rosalia’s Deli<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">41</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Z-and-H-MarketCafe-The-Marty/"><b>The Marty </b><br/> Z&H MarketCafe<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">42</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Market-House-on-the-Square-Whitefish/"><b>Whitefish</b><br/> Market House on the Square<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">43</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Elaines-Coffee-Call-Oat-Bread-Pecan-Butter-and-Fruit-Jam/"><b>Oat Bread, Pecan Butter, and Fruit Jam</b><br/> Elaine’s Coffee Call<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">44</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Marion-Street-Cheese-Market-Cauliflower-Melt/"><b>Cauliflower Melt</b><br/> Marion Street Cheese Market<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">45</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Cafecito-Cubano/"><b>Cubana</b><br/> Cafecito<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">46</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Chickpea-Kufta/"><b>Kufta</b><br/> Chickpea<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">47</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-The-Goddess-and-Grocer-Debbies-Egg-Salad/"><b>Debbie’s Egg Salad</b><br/> The Goddess and Grocer<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">48</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Zenwich-Beef-Curry/"><b>Beef Curry</b><br/> Zenwich<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative;"> <div class="sammyRank">49</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Toni-Patisserie-Le-Vegetarien/"><b>Le Végétarien</b><br/> Toni Patisserie<br/> <em>Read more</em> </a></div> </div> <div class="sammy" style="position: relative; border-bottom: 0"> <div class="sammyRank">50</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Phoebes-Bakery-The-Gatsby/"><b>The Gatsby</b><br/> Phoebe’s Bakery<br/> <em>Read more</em> </a></div> </div> <p><!-- /#sandwichFront --></p> <footer>Edited by Carly Boers, Penny Pollack, and Jeff Ruby; Contributors: Cassie Walker Burke, Elly Fishman, Peter Gianopulos, Noah Isackson, Maryanne Johnson, Esther Kang, Megan Lovejoy, Graham Meyer, Matt Schur, Lena Singer, Emmet Sullivan, Jennifer Tanaka, Joanne Trestrail</footer> </div> <div class="article-tags"> <p>Tags: <a href="https://www.chicagomag.com/tag/best-of-chicago/" rel="tag">Best of Chicago</a>, <a href="https://www.chicagomag.com/tag/dining-drinking/" rel="tag">Dining & Drinking</a>, <a href="https://www.chicagomag.com/tag/print-specific-tags-cover-story/" rel="tag">Print-Specific Tags - Cover Story</a></p> </div> </div> <div class="article-side grid-6 tablet-grid-9 mobile-grid-100 most-pop"> <div class="ad-space"> <!-- GPT AdSlot 12 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250],[300,600]] --> <div class="hide-on-mobile" id="div-gpt-ad-2789321-12"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-12'); }); </script> </div> <!-- End AdSlot 12 --> <!-- GPT AdSlot 15 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250] --> <div class="hide-on-desktop hide-on-tablet" id="div-gpt-ad-2789321-15"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-15'); }); </script> </div> <!-- End AdSlot 15 --> <!-- GPT AdSlot 11 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250]] --> <div id="div-gpt-ad-2789321-11"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-11'); }); </script> </div> <!-- End AdSlot 11 --> </div> </div> </div> <!-- end article wrap --> </article> <!-- start ad --> <div class="grid-container grid-parent ad-space ad-space-leader hide-on-mobile mb-0"> <!-- GPT AdSlot 5 for Ad unit 'trb.chicagomag/hp' ### Size: [[728,90]] --> <div id="div-gpt-ad-2789321-5"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-5'); }); </script> </div> <!-- End AdSlot 5 --> </div> <div class="grid-container grid-parent ad-space ad-space-leader hide-on-desktop hide-on-tablet"> <!-- GPT AdSlot 10 for Ad unit 'trb.chicagomag/hp' ### Size: [[320,50]] --> <div id="div-gpt-ad-2789321-10"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-10'); }); </script> </div> <!-- End AdSlot 10 --> </div> <!-- end ad --> </main><!-- #main --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <!-- start footer --> <div id="footer"> <div class="grid-container"> <div class="grid-5 suffix-1 mobile-grid-12 mobile-suffix-0 grid-parent-mobile left"> <div class="wrap"> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="https://cma.pcdfusion.com/pcd/CustomerSupport/Account/Login?ReturnUrl=%2fpcd%2fCustomerSupport%2fApp%2f3141">Manage Subscription</a> <a href="https://chicagomag.zinioapps.com/my-library/magazines">Issue Archive</a> <a href="http://www.tronc.com/privacy-policy/">Privacy Policy</a> <a href="http://www.tronc.com/central-terms-of-service/">Terms of Service</a> </div> </div> <div class="grid-10 prefix-1 suffix-1 mobile-grid-100 mobile-prefix-0 grid-parent-mobile middle hide-on-mobile"> <div class="wrap"> <h2>Follow Us</h2> <div class="footer-social"> <a href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <h2>Get Our Newsletters</h2> <p style="text-align: center;">Subscribe to one or more of our free e-mail newsletters to get instant updates on local news, events, and opportunities in Chicago.</p> <a href="/newsletters/"><button style="background:#d2232a; color:#fff; padding-left: 5px; padding-right: 5px; width: 30%; margin-left: 35%;">SUBSCRIBE</button></a> <!--<div class="footer-form" style="display:flex; margin-top:60px; margin-bottom: 10px;"> <table> <tr> <td><input type="text"></td> <td><button style="background:#d2232a; color:#fff; padding-left: 5px; padding-right: 5px;">Subscribe to All</button></td> </tr> </table> </div>--> </div> </div> <div class="grid-5 prefix-1 mobile-grid-12 mobile-prefix-0 mobile-suffix-0 grid-parent-mobile right"> <div class="wrap"> <a href="https://www.chicagomag.com/about-the-magazine/">About the Magazine</a> <a href="https://www.chicagomag.com/contact-us/">Contact Us</a> <a href="https://www.chicagomag.com/advertise/">Advertise</a> <a href="https://www.chicagomag.com/resource-guide/">Resource Guide</a> <a href="https://www.chicagomag.com/events/">Events</a> </div> </div> <div class="mobile-grid-100 mobile-prefix-0 mobile-suffix-1 grid-parent-mobile middle hide-on-desktop hide-on-tablet"> <div class="wrap"> <h2>Follow Us</h2> <div class="footer-social"> <a href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <h2>Get Our Newsletters</h2> <p>Subscribe to one or more of our free e-mail newsletters to get instant updates on local news, events, and opportunities in Chicago.</p> <div class="footer-form" style="display:flex; margin-top:60px;"> <input style="width:80%;" type="text"/> <button style="width:20%; background:#d2232a; color:#fff;">Sign Up</button> </div> <div class="copyright">©2020 Chicago magazine / A Chicago Tribune Media Group website</div> </div> </div> </div> </div> <!-- end footer --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> jQuery(document).ready(function($) { $(".grid-toggle").click(function(){ $(".grid-guide").toggle(); }); $(".nav2-toggle").click(function(){ $("#nav2-overlay").toggle(); $("#nav2-overlay-top").toggle(); $("#nav2-overlay-btm").toggle(); $("#nav2-inner-overlay").toggle(); $("#nav2-inner").toggle(); $("#nav2-open").toggle(); $("#nav2-close").toggle(); }); $(".search-open").click(function(){ $('#search-overlay').fadeIn().css('display', 'inline-block'); $('.search-field').focus(); //$('#search-close').fadeIn().css('display', 'block'); }); $(".search-close-btn").click(function(){ $("#search-overlay").fadeOut().toggle(); $("#search-close").fadeOut().toggle(); }); }); </script> <script> jQuery(document).ready(function($) { $(".toggle-rock").click(function(){ $('.indie-rock').fadeOut().css('display', 'none'); $('.new-music').fadeOut().css('display', 'none'); $('.rock').fadeIn().css('display', 'block'); }); $(".toggle-indie-rock").click(function(){ $('.rock').fadeOut().css('display', 'none'); $('.new-music').fadeOut().css('display', 'none'); $('.indie-rock').fadeIn().css('display', 'block'); }); $(".toggle-new-music").click(function(){ $('.indie-rock').fadeOut().css('display', 'none'); $('.rock').fadeOut().css('display', 'none'); $('.new-music').fadeIn().css('display', 'block'); }); $(".toggle-all-genre").click(function(){ $('.indie-rock').fadeIn().css('display', 'block'); $('.rock').fadeIn().css('display', 'block'); $('.new-music').fadeIn().css('display', 'block'); }); }); </script> <div class="site-footer"> <footer class="site-info" itemscope="" itemtype="https://schema.org/WPFooter"> <div class="inside-site-info grid-container grid-parent"> <div class="copyright-bar"> <span class="copyright">© 2021 Chicago Magazine</span> • Built with <a href="https://generatepress.com" itemprop="url">GeneratePress</a> </div> </div> </footer> </div><!-- .site-footer --> <!-- Google Tag Manager (noscript) --> <noscript><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-P4M4MH7" style="display:none;visibility:hidden" width="0"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function($) { if($('#load_more').length > 0){ //$('#load_more').click(function(){ var page=1, canBeLoaded = true, category = $('input[name="category"]').val(), ajaxurl="https://www.chicagomag.com/wp-admin/admin-ajax.php"; $(window).scroll(function(){ if( (canBeLoaded == true) && (($(document).scrollTop()) > ( $(document).height()-2000 )) ){ page=page+1; canBeLoaded = false; var data = { 'action': 'my_action', 'page': page, 'category':category }; $.post(ajaxurl, data, function(response) { $('#post_latest').append(response); canBeLoaded = true; if($.trim(response)==="<p>Sorry, no posts matched your criteria.</p>") { canBeLoaded = false; $('#load_more').hide(); } }); } }); } }); </script> <!--[if lte IE 11]> <script src='https://www.chicagomag.com/wp-content/themes/generatepress/assets/js/classList.min.js?ver=3.0.2' id='generate-classlist-js'></script> <![endif]--> <script id="generate-main-js-extra"> var generatepressMenu = {"toggleOpenedSubMenus":"1","openSubMenuLabel":"Open Sub-Menu","closeSubMenuLabel":"Close Sub-Menu"}; </script> <script id="generate-main-js" src="https://www.chicagomag.com/wp-content/themes/generatepress/assets/js/main.min.js?ver=3.0.2"></script> <script id="heateor_sss_sharing_js-js-before"> function heateorSssLoadEvent(e) {var t=window.onload;if (typeof window.onload!="function") {window.onload=e}else{window.onload=function() {t();e()}}}; var heateorSssSharingAjaxUrl = 'https://www.chicagomag.com/wp-admin/admin-ajax.php', heateorSssCloseIconPath = 'https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/../images/close.png', heateorSssPluginIconPath = 'https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/../images/logo.png', heateorSssHorizontalSharingCountEnable = 0, heateorSssVerticalSharingCountEnable = 0, heateorSssSharingOffset = -10; var heateorSssMobileStickySharingEnabled = 0;var heateorSssCopyLinkMessage = "Link copied.";var heateorSssUrlCountFetched = [], heateorSssSharesText = 'Shares', heateorSssShareText = 'Share';function heateorSssPopup(e) {window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")};var heateorSssWhatsappShareAPI = "web"; </script> <script id="heateor_sss_sharing_js-js" src="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/js/sassy-social-share-public.js?ver=3.3.20"></script> <script id="__ytprefsfitvids__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/fitvids.min.js?ver=13.4.2"></script> <script id="wp-embed-js" src="https://www.chicagomag.com/wp-includes/js/wp-embed.min.js?ver=5.8.1"></script> <script> // When the user scrolls down 20px from the top of the document, slide down the navbar window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 240 || document.documentElement.scrollTop > 240) { document.getElementById("navbar").style.top = "0"; } else { document.getElementById("navbar").style.top = "-45px"; } } </script> </body> </html>
위 코드를 입력하면 전체 html코드를 다 받게 됩니다. 그리고 url_base, url_sub로 분리하고 다시 url로 합친 이유는 단지 책에서 표현하려다 보니 한 페이지에 주소가 다 안 나와서 입니다.
In [27]:print(soup.find_all('div','sammy'))
[<div class="sammy" style="position: relative;"> <div class="sammyRank">1</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/"><b>BLT</b><br/> Old Oak Tap<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">2</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Au-Cheval-Fried-Bologna/"><b>Fried Bologna</b><br/> Au Cheval<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">3</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Xoco-Woodland-Mushroom/"><b>Woodland Mushroom</b><br/> Xoco<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">4</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Als-Deli-Roast-Beef/"><b>Roast Beef</b><br/> Al’s Deli<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">5</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Publican-Quality-Meats-PB-L/"><b>PB&L</b><br/> Publican Quality Meats<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">6</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Hendrickx-Belgian-Bread-Crafter-Belgian-Chicken-Curry-Salad/"><b>Belgian Chicken Curry Salad</b><br/> Hendrickx Belgian Bread Crafter<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">7</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Acadia-Lobster-Roll/"><b>Lobster Roll</b><br/> Acadia<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">8</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Birchwood-Kitchen-Smoked-Salmon-Salad/"><b>Smoked Salmon Salad</b><br/> Birchwood Kitchen<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">9</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Cemitas-Puebla-Atomica-Cemitas/"><b>Atomica Cemitas</b><br/> Cemitas Puebla<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">10</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Nana-Grilled-Laughing-Bird-Shrimp-and-Fried-Oyster-Po-Boy/"><b>Grilled Laughing Bird Shrimp and Fried Po’ Boy</b><br/> Nana<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">11</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Lula-Cafe-Ham-and-Raclette-Panino/"><b>Ham and Raclette Panino</b><br/> Lula Cafe<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">12</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Ricobenes-Breaded-Steak/"><b>Breaded Steak</b><br/> Ricobene’s<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">13</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Frog-n-Snail-The-Hawkeye/"><b>The Hawkeye</b><br/> Frog n Snail<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">14</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Crosbys-Kitchen-Chicken-Dip/"><b>Chicken Dip</b><br/> Crosby’s Kitchen<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">15</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Longman-and-Eagle-Wild-Boar-Sloppy-Joe/"><b>Wild Boar Sloppy Joe</b><br/> Longman & Eagle<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">16</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Bari-Meatball-Sub/"><b>Meatball Sub</b><br/> Bari<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">17</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Mannys-Corned-Beef/"><b>Corned Beef</b><br/> Manny’s<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">18</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Eggys-Turkey-Club/"><b>Turkey Club</b><br/> Eggy’s<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">19</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Jerusalem-Falafel/"><b>Falafel</b><br/> Old Jerusalem<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">20</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Mindys-HotChocolate-Crab-Cake/"><b>Crab Cake</b><br/> Mindy’s HotChocolate<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">21</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Olgas-Delicatessen-Chicken-Schnitzel/"><b>Chicken Schnitzel</b><br/> Olga’s Delicatessen<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">22</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Dawali-Mediterranean-Kitchen-Shawarma/"><b>Shawarma</b><br/> Dawali Mediterranean Kitchen<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">23</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Big-Jones-Toasted-Pimiento-Cheese/"><b>Toasted Pimiento Cheese</b><br/> Big Jones<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">24</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-La-Pane-Vegetarian-Panino/"><b>Vegetarian Panino</b><br/> La Pane<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">25</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Pastoral-Cali-Chevre/"><b>Cali Chèvre</b><br/> Pastoral<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">26</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Maxs-Deli-Pastrami/"><b>Pastrami</b><br/> Max’s Deli<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">27</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Luckys-Sandwich-Co-The-Fredo/"><b>The Fredo</b><br/> Lucky’s Sandwich Co.<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">28</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-City-Provisions-Smoked-Ham/"><b>Smoked Ham</b><br/> City Provisions<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">29</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Papas-Cache-Sabroso-Jibarito/"><b>Jibarito</b><br/> Papa’s Cache Sabroso<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">30</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Bavettes-Bar-and-Boeuf-Shaved-Prime-Rib/"><b>Shaved Prime Rib</b><br/> Bavette’s Bar & Boeuf<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">31</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Hannahs-Bretzel-Serrano-Ham-and-Manchego-Cheese/"><b>Serrano Ham and Manchego Cheese</b><br/> Hannah’s Bretzel<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">32</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-La-Fournette-Tuna-Salad/"><b>Tuna Salad</b><br/> La Fournette<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">33</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Paramount-Room-Paramount-Reuben/"><b>Paramount Reuben</b><br/> Paramount Room<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">34</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Melt-Sandwich-Shoppe-The-Istanbul/"><b>The Istanbul</b><br/> Melt Sandwich Shoppe<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">35</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Floriole-Cafe-and-Bakery-BAD/"><b>B.A.D.</b><br/> Floriole Cafe & Bakery<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">36</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-First-Slice-Pie-Cafe-Duck-Confit-and-Mozzarella/"><b>Duck Confit and Mozzarella</b><br/> First Slice Pie Café<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">37</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Troquet-Croque-Monsieur/"><b>Croque Monsieur</b><br/> Troquet<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">38</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Grahamwich-Green-Garbanzo/"><b>Green Garbanzo</b><br/> Grahamwich<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">39</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Saigon-Sisters-The-Hen-House/"><b>The Hen House</b><br/> Saigon Sisters<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">40</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Rosalias-Deli-Tuscan-Chicken/"><b>Tuscan Chicken</b><br/> Rosalia’s Deli<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">41</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Z-and-H-MarketCafe-The-Marty/"><b>The Marty </b><br/> Z&H MarketCafe<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">42</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Market-House-on-the-Square-Whitefish/"><b>Whitefish</b><br/> Market House on the Square<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">43</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Elaines-Coffee-Call-Oat-Bread-Pecan-Butter-and-Fruit-Jam/"><b>Oat Bread, Pecan Butter, and Fruit Jam</b><br/> Elaine’s Coffee Call<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">44</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Marion-Street-Cheese-Market-Cauliflower-Melt/"><b>Cauliflower Melt</b><br/> Marion Street Cheese Market<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">45</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Cafecito-Cubano/"><b>Cubana</b><br/> Cafecito<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">46</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Chickpea-Kufta/"><b>Kufta</b><br/> Chickpea<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">47</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-The-Goddess-and-Grocer-Debbies-Egg-Salad/"><b>Debbie’s Egg Salad</b><br/> The Goddess and Grocer<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">48</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Zenwich-Beef-Curry/"><b>Beef Curry</b><br/> Zenwich<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative;"> <div class="sammyRank">49</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Toni-Patisserie-Le-Vegetarien/"><b>Le Végétarien</b><br/> Toni Patisserie<br/> <em>Read more</em> </a></div> </div>, <div class="sammy" style="position: relative; border-bottom: 0"> <div class="sammyRank">50</div> <div class="sammyListing"><a href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Phoebes-Bakery-The-Gatsby/"><b>The Gatsby</b><br/> Phoebe’s Bakery<br/> <em>Read more</em> </a></div> </div>]
확인한 태그를 이용해서 find_all 명령을 이용해서 div의 Sammy 태그를 찾아 보았습니다. 내용을 유심히 보니 우리가 찾으려고 하던 내용이 맞는 것 같습니다. 더 확실히 하기 위해 len명령으로 길이를 확인해보면 50이라고 나타납니다.
In [28]:len(soup.find_all('div','sammy'))
Out[28]:50
애초 시카고 매거진의 기사 제목에 있지만 맛집 50개이므로 저 길이가 50이라면 일단 정확하게 찾은것 같습니다. 그중 첫 번째 것만 확인해보면 원하던 정보가 다 있는 걸로 보입니다.
In [29]:print(soup.find_all('div','sammy')[0])
<div class="sammy" style="position: relative;"> <div class="sammyRank">1</div> <div class="sammyListing"><a href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/"><b>BLT</b><br/> Old Oak Tap<br/> <em>Read more</em> </a></div> </div>
3-4 접근한 웹 페이지에서 원하는 데이터 추출하고 정리하기¶
그럼 이제 div의 sammy 태그에서 우리가 원하는 정보를 얻는 과정을 보겠습니다.
In [30]:tmp_one = soup.find_all('div','sammy')[0] type(tmp_one)
Out[30]:bs4.element.Tag
find_all로 찾은 결과는 bs4.element.Tag라고 하는 형태로 이런 경우 그 변수에 다시 태그로 찾는 (find, find_all)명령을 사용할 수 있습니다.
In [31]:tmp_one.find(class_='sammyRank')
Out[31]:<div class="sammyRank">1</div>
그래서 find 명령을 한 번 더 사용하고 sammyRank를 찾아보면 나타납니다. 여기서 text만 취하면 됩니다.
In [32]:tmp_one.find(class_='sammyRank').get_text()
Out[32]:'1'
get_text() 명령을 사용하면 됩니다. 그러면 랭킹은 얻을 수 있습니다.
In [33]:tmp_one.find(class_='sammyListing').get_text()
Out[33]:'BLT\nOld Oak Tap\nRead more '
이제 sammyListing을 얻으면 메뉴 이른과 가게 이름이 비록 같이 나오긴 했지만 억게 되었습니다.
In [34]:tmp_one.find('a')['href']
Out[34]:'/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/'
또 a 태그에서 href정보를 가지고 클릭했을 때 연결될 주소도 저장할 수 있습니다.
코드 [37]의 경우는 메뉴 이름과 가게 이름이 같이 있어서 분리해야 합니다. 저 구조에서 쉽게 접근해 볼 수 있는 것 중 하나가'정규식(Regular Express)'입니다. 정규식이라고 너무 어렵게 받아들일 필요는 없습니다. 이 책의 기본적인 기초는'필요한 건 의미만 파악되면 가져다 쓰지'입니다.In [35]:import re tmp_string = tmp_one.find(class_='sammyListing').get_text() re.split(('\n|\r\n'), tmp_string) print(re.split(('\n|\r\n'), tmp_string)[0]) print(re.split(('\n|\r\n'), tmp_string)[1])
BLT Old Oak Tap
먼저 당연히 정규식을 쓰기 위해 import re를 수행합니다. 그리고re에서 사용할 명령은 딱 하나 split입니다 . 말그대로 내가 지정한 특정 패턴이 일치하면 분리시킵니다. 저는 \n이거나, \r\n이면 분리시키고 싶습니다. 그래서 OR연산자(|-통상 키보드에서 엔터키 위에 있는 \ 기호와 함께 있는 문자)까지 사용해서 re.split(('\n|\r\n',tmp_string)이라고 명령했습니다. 그러면 그 결과가 두 개가 되는데 첫번째 것을 메뉴 이름으로, 두 번째 것을 가게 이름으로 하면 됩니다.
또 코드[38]의 결과가 다른 49개에 적용했을 때 항상 동일하지 않습니다. 그 결과가 어떤 경우는 상대 경로로, 또 어떤 경우는 절대경로로 나오기 때문입니다. 이럴 때 사용하는 것이 urllib에 있는 urljoin이라는 명령입니다. 이 명령을 이용하면 절대경로로 잡힌 url은 그래로 두고 상대경로로 잡힌 url은 절대 경로로 변경할 수 있습니다.In [36]:from urllib.parse import urljoin
In [37]:rank = [] main_menu = [] cafe_name = [] url_add = [] list_soup = soup.find_all('div', 'sammy') for item in list_soup: rank.append(item.find(class_='sammyRank').get_text()) tmp_string = item.find(class_='sammyListing').get_text() main_menu.append(re.split(('\n|\r\n'), tmp_string)[0]) cafe_name.append(re.split(('\n|\r\n'), tmp_string)[1]) url_add.append(urljoin(url, item.find('a')['href']))
위 코드는 먼저 랭크 순위(rank), 메인 메뉴 이름(main_menu), 카페이름(cafe_name), 각각의 접근 주소(url_add)를 저장할 빈 list를 두었습니다. 그리고 find_all('div','sammy')로 찾은 50개의 정보를 가지고 반복문(for)을 돌리면서 방금 했던 내용인 각각의 정보를 .append명령으로 빈 리스트에 하나씩 추가하도록 했습니다. 이코드가 다 수행되고 나면,
In [38]:rank[:5]
Out[38]:['1', '2', '3', '4', '5']
순위도 잘 저장되어있고,
In [39]:main_menu[:5]
Out[39]:['BLT', 'Fried Bologna', 'Woodland Mushroom', 'Roast Beef', 'PB&L']
메뉴 이름도,
In [40]:cafe_name[:5]
Out[40]:['Old Oak Tap', 'Au Cheval', 'Xoco', 'Al’s Deli', 'Publican Quality Meats']
카페 이름도 잘 받아왔습니다.
In [41]:url_add[:5]
Out[41]:['http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/', 'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Au-Cheval-Fried-Bologna/', 'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Xoco-Woodland-Mushroom/', 'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Als-Deli-Roast-Beef/', 'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Publican-Quality-Meats-PB-L/']
마지막으로 url도 잘 왔습니다.
In [42]:len(rank), len(main_menu), len(cafe_name), len(url_add)
Out[42]:(50, 50, 50, 50)
혹시나 하고 네 개의 변수의 길이를 조사해도 괜찮아 보입니다. 이제 이 데이터를 4개의 리스트에 저장할 수는 없으니 pandas를 이용하도록 하겠습니다
In [43]:import pandas as pd data = {'Rank':rank, 'Menu':main_menu, 'Cafe':cafe_name, 'URL':url_add} df = pd.DataFrame(data) df.head()
Out[43]:Rank Menu Cafe URL 0 1 BLT Old Oak Tap http://www.chicagomag.com/Chicago-Magazine/Nov... 1 2 Fried Bologna Au Cheval http://www.chicagomag.com/Chicago-Magazine/Nov... 2 3 Woodland Mushroom Xoco http://www.chicagomag.com/Chicago-Magazine/Nov... 3 4 Roast Beef Al’s Deli http://www.chicagomag.com/Chicago-Magazine/Nov... 4 5 PB&L Publican Quality Meats http://www.chicagomag.com/Chicago-Magazine/Nov... 이렇게 각 컬럼의 이름을 정의하고 해당 자료를 알려주면 됩니다.
잘 나타난 것 같습니다. pandas로 정리도 잘 됐습니다. 그런데 하나 아쉬운 것은 컬럼의 순서입니다. 그래서 그 순서도 보기 좋게 정리합니다.In [44]:df = pd.DataFrame(data, columns=['Rank','Cafe','Menu','URL']) df.head(5)
Out[44]:Rank Cafe Menu URL 0 1 Old Oak Tap BLT http://www.chicagomag.com/Chicago-Magazine/Nov... 1 2 Au Cheval Fried Bologna http://www.chicagomag.com/Chicago-Magazine/Nov... 2 3 Xoco Woodland Mushroom http://www.chicagomag.com/Chicago-Magazine/Nov... 3 4 Al’s Deli Roast Beef http://www.chicagomag.com/Chicago-Magazine/Nov... 4 5 Publican Quality Meats PB&L http://www.chicagomag.com/Chicago-Magazine/Nov... 이렇게 결과가 나타납니다. 이렇게 일차적으로 한 페이지에서 각 원하는 부분의 데이터를 읽어와서 다시 원하는 형태로 정리를 완료했습니다. 여기서 한 단계 더 나가도록 하겠습니다. 그 전에 혹시 모르니 먼저 저장합니다.
In [45]:df.to_csv('data/03. best_sandwiches_list_chicago.csv', sep=',', encoding='UTF-8')
3-4 다수의 웹 페이지에 자동으로 접근해서 원하는 정보 가져오기¶
3-3절까지 시카고 매거진에서 시카고의 베스트 샌드위치 가게 50개에 대한 정보를 가져오는 페이지를 만들었습니다. html페이지로는 하나여서 페이지 간 이동은 필요가 없었습니다. 그저 한 페이지의 내용을 잘 이해하고 가져오면 되는데, 세부 메뉴를 설명하는 곳을 클릭하면 각각의 또 다른 매거진 기사로 연결됩니다.
In [46]:df = pd.read_csv('data/03. best_sandwiches_list_chicago.csv', index_col=0) df.head()
Out[46]:Rank Cafe Menu URL 0 1 Old Oak Tap BLT http://www.chicagomag.com/Chicago-Magazine/Nov... 1 2 Au Cheval Fried Bologna http://www.chicagomag.com/Chicago-Magazine/Nov... 2 3 Xoco Woodland Mushroom http://www.chicagomag.com/Chicago-Magazine/Nov... 3 4 Al’s Deli Roast Beef http://www.chicagomag.com/Chicago-Magazine/Nov... 4 5 Publican Quality Meats PB&L http://www.chicagomag.com/Chicago-Magazine/Nov... 이전에 작업했던 것을 읽어옵니다. 위 표에서 URL 컬럼에 있는 내용을 50개 읽어서 각 페이지에서 가게 주소, 대표 샌드위치 가격, 가게 전화번호를 얻는 것입니다. 그러면 첫 번째 URL 정보를 확인하고 연습 삼아 진행한 다음 50개에 대해 반복문을 적용하겠습니다.
In [47]:df['URL'][0]
Out[47]:'http://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/'
첫 번째 URL이 있습니다. 시카고 매거진의 또 다른 페이지입니다. 이 주소를 Beautiful Soup로 읽습니다.
In [48]:headers = {'User-Agent': 'Mozilla/5.0'} url = (df['URL'][0]) html = requests.get(url, headers = headers).text soup_tmp = BeautifulSoup(html, "html.parser") soup_tmp
Out[48]:<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <link href="https://gmpg.org/xfn/11" rel="profile"/> <title>1. Old Oak Tap BLT – Chicago Magazine</title> <style type="text/css"> .heateorSssInstagramBackground{background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)} div.heateor_sss_horizontal_sharing i.heateorSssInstagramBackground{background:#000!important;}div.heateor_sss_standard_follow_icons_container i.heateorSssInstagramBackground{background:#000;} .heateor_sss_horizontal_sharing .heateorSssSharing,.heateor_sss_standard_follow_icons_container .heateorSssSharing{ background-color: #000; color: #fff; border-width: 0px; border-style: solid; border-color: transparent; } .heateor_sss_horizontal_sharing .heateorSssTCBackground{ color:#666; } .heateor_sss_horizontal_sharing .heateorSssSharing:hover,.heateor_sss_standard_follow_icons_container .heateorSssSharing:hover{ border-color: transparent; } .heateor_sss_vertical_sharing .heateorSssSharing,.heateor_sss_floating_follow_icons_container .heateorSssSharing{ color: #fff; border-width: 0px; border-style: solid; border-color: transparent; } .heateor_sss_vertical_sharing .heateorSssTCBackground{ color:#666; } .heateor_sss_vertical_sharing .heateorSssSharing:hover,.heateor_sss_floating_follow_icons_container .heateorSssSharing:hover{ border-color: transparent; } @media screen and (max-width:783px) {.heateor_sss_vertical_sharing{display:none!important}}@media screen and (max-width:783px) {.heateor_sss_floating_follow_icons_container{display:none!important}}</style><meta content="max-image-preview:large" name="robots"/> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <script data-cfasync="false" data-pagespeed-no-defer="" type="text/javascript">//<![CDATA[ var gtm4wp_datalayer_name = "dataLayer"; var dataLayer = dataLayer || []; //]]> </script> <!-- End Google Tag Manager for WordPress by gtm4wp.com --><link href="//use.fontawesome.com" rel="dns-prefetch"> <link href="//s.w.org" rel="dns-prefetch"/> <link href="https://www.chicagomag.com/feed/" rel="alternate" title="Chicago Magazine » Feed" type="application/rss+xml"/> <link href="https://www.chicagomag.com/comments/feed/" rel="alternate" title="Chicago Magazine » Comments Feed" type="application/rss+xml"/> <link href="https://www.chicagomag.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1" id="wp-block-library-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/wordpress-popular-posts/assets/css/wpp.css?ver=5.2.4" id="wordpress-popular-posts-css-css" media="all" rel="stylesheet"/> <link href="//use.fontawesome.com/releases/v5.13.0/css/all.css?ver=5.8.1" id="font-awesome-free-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/unsemantic-grid.min.css?ver=3.0.2" id="generate-style-grid-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/style.min.css?ver=3.0.2" id="generate-style-css" media="all" rel="stylesheet"/> <style id="generate-style-inline-css"> body{background-color:#efefef;color:#3a3a3a;}a{color:#1e73be;}a:hover, a:focus, a:active{color:#000000;}body .grid-container{max-width:1100px;}.wp-block-group__inner-container{max-width:1100px;margin-left:auto;margin-right:auto;}body, button, input, select, textarea{font-family:-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}body{line-height:1.5;}.entry-content > [class*="wp-block-"]:not(:last-child){margin-bottom:1.5em;}.main-title{font-size:45px;}.main-navigation .main-nav ul ul li a{font-size:14px;}.sidebar .widget, .footer-widgets .widget{font-size:17px;}h1{font-weight:300;font-size:40px;}h2{font-weight:300;font-size:30px;}h3{font-size:20px;}h4{font-size:inherit;}h5{font-size:inherit;}@media (max-width:768px){.main-title{font-size:30px;}h1{font-size:30px;}h2{font-size:25px;}}.top-bar{background-color:#636363;color:#ffffff;}.top-bar a{color:#ffffff;}.top-bar a:hover{color:#303030;}.site-header{background-color:#ffffff;color:#3a3a3a;}.site-header a{color:#3a3a3a;}.main-title a,.main-title a:hover{color:#222222;}.site-description{color:#757575;}.main-navigation,.main-navigation ul ul{background-color:#222222;}.main-navigation .main-nav ul li a,.menu-toggle, .main-navigation .menu-bar-items{color:#ffffff;}.main-navigation .main-nav ul li:hover > a,.main-navigation .main-nav ul li:focus > a, .main-navigation .main-nav ul li.sfHover > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{color:#ffffff;background-color:#3f3f3f;}button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus{color:#ffffff;}.main-navigation .main-nav ul li[class*="current-menu-"] > a{color:#ffffff;background-color:#3f3f3f;}.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a{color:#ffffff;background-color:#3f3f3f;}.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{color:#ffffff;background-color:#3f3f3f;}.main-navigation ul ul{background-color:#3f3f3f;}.main-navigation .main-nav ul ul li a{color:#ffffff;}.main-navigation .main-nav ul ul li:hover > a,.main-navigation .main-nav ul ul li:focus > a,.main-navigation .main-nav ul ul li.sfHover > a{color:#ffffff;background-color:#4f4f4f;}.main-navigation .main-nav ul ul li[class*="current-menu-"] > a{color:#ffffff;background-color:#4f4f4f;}.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a{color:#ffffff;background-color:#4f4f4f;}.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header{background-color:#ffffff;}.entry-meta{color:#595959;}.entry-meta a{color:#595959;}.entry-meta a:hover{color:#1e73be;}.sidebar .widget{background-color:#ffffff;}.sidebar .widget .widget-title{color:#000000;}.footer-widgets{background-color:#ffffff;}.footer-widgets .widget-title{color:#000000;}.site-info{color:#ffffff;background-color:#222222;}.site-info a{color:#ffffff;}.site-info a:hover{color:#606060;}.footer-bar .widget_nav_menu .current-menu-item a{color:#606060;}input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select{color:#666666;background-color:#fafafa;border-color:#cccccc;}input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus{color:#666666;background-color:#ffffff;border-color:#bfbfbf;}button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background){color:#ffffff;background-color:#666666;}button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover{color:#ffffff;background-color:#3f3f3f;}a.generate-back-to-top{background-color:rgba( 0,0,0,0.4 );color:#ffffff;}a.generate-back-to-top:hover,a.generate-back-to-top:focus{background-color:rgba( 0,0,0,0.6 );color:#ffffff;}@media (max-width:768px){.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{background:none;color:#ffffff;}}.inside-top-bar{padding:10px;}.inside-header{padding:40px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-40px;width:calc(100% + 80px);max-width:calc(100% + 80px);}.rtl .menu-item-has-children .dropdown-menu-toggle{padding-left:20px;}.rtl .main-navigation .main-nav ul li.menu-item-has-children > a{padding-right:20px;}.site-info{padding:20px;}@media (max-width:768px){.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header, .wp-block-group__inner-container{padding:30px;}.site-info{padding-right:10px;padding-left:10px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-30px;width:calc(100% + 60px);max-width:calc(100% + 60px);}}.one-container .sidebar .widget{padding:0px;}@media (max-width:768px){.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder){display:block;}.main-navigation ul,.gen-sidebar-nav{display:none;}[class*="nav-float-"] .site-header .inside-header > *{float:none;clear:both;}} </style> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/mobile.min.css?ver=3.0.2" id="generate-mobile-style-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/generatepress/assets/css/components/font-icons.min.css?ver=3.0.2" id="generate-font-icons-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/themes/Chicago%20Magazine/style.css?ver=1632777141" id="generate-child-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/css/sassy-social-share-public.css?ver=3.3.20" id="heateor_sss_frontend_css-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/admin/css/sassy-social-share-svg.css?ver=3.3.20" id="heateor_sss_sharing_default_svg-css" media="all" rel="stylesheet"/> <link href="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/styles/ytprefs.min.css?ver=13.4.2" id="__EPYT__style-css" media="all" rel="stylesheet"/> <style id="__EPYT__style-inline-css"> .epyt-gallery-thumb { width: 33.333%; } @media (min-width:0px) and (max-width: 767px) { .epyt-gallery-rowbreak { display: none; } .epyt-gallery-allthumbs[class*="epyt-cols"] .epyt-gallery-thumb { width: 100% !important; } } </style> <link href="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/lity.min.css?ver=13.4.2" id="__disptype__-css" media="all" rel="stylesheet"/> <script id="wpp-json" type="application/json"> {"sampling_active":0,"sampling_rate":100,"ajax_url":"https:\/\/www.chicagomag.com\/wp-json\/wordpress-popular-posts\/v1\/popular-posts","ID":11773,"token":"d5bd8096d7","lang":0,"debug":0} </script> <script id="wpp-js-js" src="https://www.chicagomag.com/wp-content/plugins/wordpress-popular-posts/assets/js/wpp.min.js?ver=5.2.4"></script> <script id="jquery-core-js" src="https://www.chicagomag.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0"></script> <script id="jquery-migrate-js" src="https://www.chicagomag.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2"></script> <script id="__dispload__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/lity.min.js?ver=13.4.2"></script> <script id="__ytprefs__-js-extra"> var _EPYT_ = {"ajaxurl":"https:\/\/www.chicagomag.com\/wp-admin\/admin-ajax.php","security":"23c5dc1d8e","gallery_scrolloffset":"20","eppathtoscripts":"https:\/\/www.chicagomag.com\/wp-content\/plugins\/youtube-embed-plus-pro\/scripts\/","eppath":"https:\/\/www.chicagomag.com\/wp-content\/plugins\/youtube-embed-plus-pro\/","epresponsiveselector":"[\"iframe.__youtube_prefs_widget__\"]","epdovol":"1","version":"13.4.2","evselector":"iframe.__youtube_prefs__[src], iframe[src*=\"youtube.com\/embed\/\"], iframe[src*=\"youtube-nocookie.com\/embed\/\"]","ajax_compat":"","ytapi_load":"light","pause_others":"","stopMobileBuffer":"1","vi_active":"","vi_js_posttypes":[]}; </script> <script id="__ytprefs__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/ytprefs.min.js?ver=13.4.2"></script> <link href="https://www.chicagomag.com/wp-json/" rel="https://api.w.org/"/><link href="https://www.chicagomag.com/wp-json/wp/v2/posts/11773" rel="alternate" type="application/json"/><link href="https://www.chicagomag.com/xmlrpc.php?rsd" rel="EditURI" title="RSD" type="application/rsd+xml"/> <link href="https://www.chicagomag.com/wp-includes/wlwmanifest.xml" rel="wlwmanifest" type="application/wlwmanifest+xml"/> <link href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-in-chicago-old-oak-tap-blt/" rel="canonical"/> <link href="https://www.chicagomag.com/?p=11773" rel="shortlink"/> <link href="https://www.chicagomag.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-in-chicago-old-oak-tap-blt%2F" rel="alternate" type="application/json+oembed"/> <link href="https://www.chicagomag.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-in-chicago-old-oak-tap-blt%2F&format=xml" rel="alternate" type="text/xml+oembed"/> <!-- Google Tag Manager for WordPress by gtm4wp.com --> <script data-cfasync="false" data-pagespeed-no-defer="" type="text/javascript">//<![CDATA[ var dataLayer_content = {"pagePostType":"post","pagePostType2":"single-post","pageCategory":["chicago-magazine"],"pagePostAuthor":"Chicago Magazine","pagePostTerms":{"category":["Chicago Magazine"],"issue":["November 2012"],"adcat":["Dining & Drinking"]}}; dataLayer.push( dataLayer_content );//]]> </script> <script data-cfasync="false">//<![CDATA[ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''#39;;j.async=true;j.src= '//www.googletagmanager.com/gtm.'+'js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P4M4MH7');//]]> </script> <!-- End Google Tag Manager --> <!-- End Google Tag Manager for WordPress by gtm4wp.com --><meta content="width=device-width, initial-scale=1" name="viewport"/><link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="icon" sizes="32x32"/> <link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="icon" sizes="192x192"/> <link href="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" rel="apple-touch-icon"/> <meta content="https://www.chicagomag.com/wp-content/uploads/2021/02/favicon.png" name="msapplication-TileImage"> <!-- BEGIN Typekit Fonts for WordPress --> <link href="https://use.typekit.net/ukb3erh.css" rel="stylesheet"/> <!-- END Typekit Fonts for WordPress --> <!-- start seo fields --> <meta content="" inspired.""="" name="description" truly=""/> <meta content="" name="keywords"/> <meta content="en_US" property="og:locale"/> <meta content="article" property="og:type"/> <meta content="1. Old Oak Tap BLT" property="og:title"/> <meta content="" inspired.""="" property="og:description" truly=""/> <meta content="https://www.chicagomag.com/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/01-Old-Oak-Trap-BLT-500.jpg" property="og:image"/> <link href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/" rel="canonical"> <meta content="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/" property="og:url"/> <meta content="Chicago Magazine" property="og:site_name"/> <!--<meta property="article:tag" content="" />--> <meta content="Chicago Magazine" property="article:section"/> <!-- <meta property="article:published_time" content="" /> <meta property="article:modified_time" content="" /> <meta property="og:updated_time" content="" /> --> <meta content="summary_large_image" name="twitter:card"/> <meta content="https://www.chicagomag.com/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/01-Old-Oak-Trap-BLT-500.jpg" name="twitter:image"/> <meta content="" inspired.""="" name="twitter:description" truly=""/> <meta content="1. Old Oak Tap BLT" name="twitter:title"/> <!-- end seo fields --> <!-- GA Google Analytics @ https://m0n.co/ga --> <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-297666-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-297666-1'); </script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P4M4MH7');</script> <!-- End Google Tag Manager --> <!-- start chartbeat code --> <script type="text/javascript"> (function() { /** CONFIGURATION START **/ var _sf_async_config = window._sf_async_config = (window._sf_async_config || {}); _sf_async_config.uid = 25745; _sf_async_config.domain = 'chicagomag.com'; _sf_async_config.flickerControl = false; _sf_async_config.useCanonical = true; _sf_async_config.useCanonicalDomain = true; _sf_async_config.sections = 'Chicago Magazine'; _sf_async_config.authors = 'Chicago Magazine'; /** CONFIGURATION END **/ function loadChartbeat() { var e = document.createElement('script'); var n = document.getElementsByTagName('script')[0]; e.type = 'text/javascript'; e.async = true; e.src = '//static.chartbeat.com/js/chartbeat.js'; n.parentNode.insertBefore(e, n); } loadChartbeat(); })(); </script> <script async="" src="//static.chartbeat.com/js/chartbeat_mab.js"></script> <!-- end chartbeat code --> <!-- Start GPT Tag --> <script async="" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script> <script> window.googletag = window.googletag || {cmd: []}; googletag.cmd.push(function() { googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-1') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-2') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-3') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-4') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[728,90]], 'div-gpt-ad-2789321-5') .setTargeting('pos', ['5']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-6') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-7') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-8') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-9') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[320,50]], 'div-gpt-ad-2789321-10') .setTargeting('pos', ['5']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-11') .setTargeting('pos', ['1']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250],[300,600]], 'div-gpt-ad-2789321-12') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-13') .setTargeting('pos', ['3']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-14') .setTargeting('pos', ['4']) .addService(googletag.pubads()); googletag.defineSlot('/4011/trb.chicagomag/hp', [[300,250]], 'div-gpt-ad-2789321-15') .setTargeting('pos', ['2']) .addService(googletag.pubads()); googletag.pubads().setTargeting('adcat', ['dining-drinking']); googletag.enableServices(); }); </script> <!-- End GPT Tag --> <!-- below is header style for all pages besides home --> <style> /* logo / nav -------------------------------------------------------------- */ .site-header { width: 18% !important; display: table !important; float: left !important; height: 90px; } .inside-header { display: table-cell !important; vertical-align: bottom !important; padding: 0 !important; padding-left: 5vw !important; } .main-navigation { width: 82% !important; display: table !important; position: relative !important; float: left !important; clear: inherit !important; height: 90px; } .inside-navigation { display: table-cell !important; vertical-align: bottom !important; padding-right: 5vw !important; text-align: right !important; } .main-navigation ul { border: 0 !important; line-height: 1em !important; } .main-navigation .main-nav ul li a { padding-left: 15px !important; padding-right: 15px !important; line-height: 1em !important; } .main-navigation .main-nav ul li:last-of-type a { padding-right: 0 !important; } /* layout -------------------------------------------------------------- */ .separate-containers .site-main { margin-top: 0 !important; } .post-template-single-package-child.separate-containers .site-main { margin-top: 3.05555vw !important; } @media only screen and (max-width: 1024px) { .site-header { width: 100% !important; display: block !important; float: none !important; height: inherit !important; } .main-navigation ul { border: 0 !important; line-height: 1em !important; } .main-navigation .main-nav ul li a { padding-left: 10px !important; padding-right: 10px !important; line-height: 1em !important; } .inside-header { display: block !important; vertical-align: inherit !important; padding: 3.75vw 0 0 0 !important; } .site-logo { display: inline-block; } .nav-aligned-center .main-navigation { text-align: center; } .main-navigation { width: 100% !important; display: inline-block !important; position: relative !important; float: none !important; clear: inherit !important; height: inherit !important; } .inside-navigation { display: inline-block !important; vertical-align: inherit !important; padding-right: 0 !important; text-align: center !important; margin: 0 auto !important; margin-top: 3.75vw !important; } } @media only screen and (max-width: 768px) { .site-header { width: 100% !important; display: table !important; float: left !important; height: 90px; } .main-navigation, .inside-navigation { display: none !important; } } </style> <style></style></link></meta></link></meta></head> <body class="post-template-default single single-post postid-11773 single-format-standard wp-custom-logo wp-embed-responsive no-sidebar nav-below-header separate-containers fluid-header active-footer-widgets-3 nav-aligned-center header-aligned-center dropdown-hover" itemscope="" itemtype="https://schema.org/Blog"> <div class="grid-toggle-wrap"><a class="grid-toggle">.</a></div> <div class="grid-guide"> <div class="grid-guide-col"><span>1</span></div> <div class="grid-guide-col"><span>2</span></div> <div class="grid-guide-col"><span>3</span></div> <div class="grid-guide-col"><span>4</span></div> <div class="grid-guide-col"><span>5</span></div> <div class="grid-guide-col"><span>6</span></div> <div class="grid-guide-col"><span>7</span></div> <div class="grid-guide-col"><span>8</span></div> <div class="grid-guide-col"><span>9</span></div> <div class="grid-guide-col"><span>10</span></div> <div class="grid-guide-col"><span>11</span></div> <div class="grid-guide-col"><span>12</span></div> <div class="grid-guide-col"><span>13</span></div> <div class="grid-guide-col"><span>14</span></div> <div class="grid-guide-col"><span>15</span></div> <div class="grid-guide-col"><span>16</span></div> <div class="grid-guide-col"><span>17</span></div> <div class="grid-guide-col"><span>18</span></div> <div class="grid-guide-col"><span>19</span></div> <div class="grid-guide-col"><span>20</span></div> <div class="grid-guide-col"><span>21</span></div> <div class="grid-guide-col"><span>22</span></div> <div class="grid-guide-col"><span>23</span></div> <div class="grid-guide-col"><span>24</span></div> </div> <div class="ad-space ad-space-leader top-ad-space hide-on-mobile"> <!-- GPT AdSlot 1 for Ad unit 'trb.chicagomag/hp' ### Size: [[728,90]] --> <div id="div-gpt-ad-2789321-1"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-1'); }); </script> </div> <!-- End AdSlot 1 --> </div> <div class="ad-space ad-space-leader top-ad-space hide-on-desktop hide-on-tablet"> <!-- GPT AdSlot 6 for Ad unit 'trb.chicagomag/hp' ### Size: [[320,50]] --> <div id="div-gpt-ad-2789321-6"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-6'); }); </script> </div> <!-- End AdSlot 6 --> </div> <div id="nav2-open"> <a class="nav2-toggle"><i class="fa fa-bars"></i></a> </div> <div id="nav2-close"> <a class="nav2-toggle"><i class="fa fa-times"></i></a> </div> <div id="nav2-overlay"></div> <div id="nav2-overlay-top"></div> <div id="nav2-overlay-btm"></div> <div id="nav2-inner-overlay"> <div id="nav2-inner"> <div class="grid-container grid-parent"> <div class="grid-5 prefix-1 suffix-1 nav2-cover hide-on-mobile"> <img src="/wp-content/uploads/2020/12/logo-alt.jpg"/> <img src=""/> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC" target="_blank">Subscribe</a> <a href="/newsletters/">Newsletters</a> <a class="nav-social" href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a class="nav-social" href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a class="nav-social" href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a class="nav-social" href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <div class="grid-100 nav2-cover hide-on-desktop"> <img src="/wp-content/uploads/2020/12/logo-alt.jpg"/> <form action="https://www.chicagomag.com/" class="search-form" method="get"> <label> <span class="screen-reader-text">Search for:</span> <input class="search-field" name="s" placeholder="Search …" title="Search for:" type="search" value=""/> </label> <input class="search-submit" type="submit" value="Search"/></form> </div> <div class="grid-7 prefix-1 suffix-1 mobile-grid-100 mobile-prefix-0 mobile-suffix-0"> <div class="section-header"> <div class="section-divide"></div> <h2>Sections</h2> </div> <a href="https://www.chicagomag.com/news/">News & Politics</a> <a href="https://www.chicagomag.com/dining-drinking/">Dining & Drinking</a> <a href="https://www.chicagomag.com/city-life/">City Life</a> <a href="https://www.chicagomag.com/arts-culture/">Culture</a> <a href="https://www.chicagomag.com/real-estate/">Real Estate</a> <a href="https://www.chicagomag.com/style-shopping/">Style</a> <div class="section-header"> <div class="section-divide"></div> <h2>Featured</h2> </div> <a href="https://www.chicagomag.com/video/">Video</a> <a href="https://www.chicagomag.com/long-reads/">Long Reads</a> <a href="https://www.chicagomag.com/chicago-magazine/april-2020/best-new-restaurants/">Best New Restaurants</a> <a href="https://www.chicagomag.com/top-doctors/">Top Doctors</a> </div> <div class="grid-7 suffix-1 mobile-grid-100 mobile-suffix-1"> <div class="section-header"> <div class="section-divide"></div> <h2>Magazine</h2> </div> <a href="https://chicagomag.zinioapps.com/my-library/magazines">All Issues</a> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="https://cma.pcdfusion.com/pcd/CustomerSupport/Account/Login?ReturnUrl=%2fpcd%2fCustomerSupport%2fApp%2f3141">Manage Subscription</a> <a href="https://www.chicagomag.com/advertise/">Advertise</a> <div class="section-header"> <div class="section-divide"></div> <h2>More</h2> </div> <a href="https://www.chicagomag.com/events/">Events</a> <a href="https://www.chicagomag.com/about-the-magazine/">About Us</a> <a href="https://www.chicagomag.com/contact-us/">Contact Us</a> <a href="https://www.chicagomag.com/follow-us/">Follow Us</a> <a href="https://www.chicagomag.com/resource-guide/">Resource Guide</a> </div> <div class="mobile-grid-100 hide-on-desktop" style="margin-bottom: 10vw;"> <img src="/wp-content/archive/Chicago-Magazine/December-2020/CMAG1220.jpg" style="margin-top: 5vw;"/> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="/newsletters/">Newsletters</a> <a class="nav-social" href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a class="nav-social" href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a class="nav-social" href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a class="nav-social" href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> </div> </div> </div> <div id="top-right-nav"> <div id="search-overlay"> <div id="search-close"> <a class="search-close-btn"> <i class="fas fa-times"></i> </a> </div> <form action="https://www.chicagomag.com/" class="search-form" method="get"> <label> <span class="screen-reader-text">Search for:</span> <input class="search-field" name="s" placeholder="Search …" title="Search for:" type="search" value=""/> </label> <input class="search-submit" type="submit" value="Search"/></form> </div> <div class="top-right-nav-links"> <a class="search-open"><i class="fa fa-search"></i></a> <a href="/events/">Events</a> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> </div> </div> <div id="navbar"> <div id="nav2-open"> <a class="nav2-toggle"><i class="fa fa-bars"></i></a> </div> <a href="/"><img class="navbar-logo" src="/wp-content/uploads/2020/10/logo.png"/></a> </div> <a class="screen-reader-text skip-link" href="#content" title="Skip to content">Skip to content</a> <header class="site-header" id="masthead" itemscope="" itemtype="https://schema.org/WPHeader"> <div class="inside-header grid-container grid-parent"> <div class="site-logo"> <a href="https://www.chicagomag.com/" rel="home" title="Chicago Magazine"> <img alt="Chicago Magazine" class="header-image is-logo-image" src="https://www.chicagomag.com/wp-content/uploads/2020/10/logo.png" title="Chicago Magazine"> </img></a> </div> </div> </header> <nav class="main-navigation sub-menu-right" id="site-navigation" itemscope="" itemtype="https://schema.org/SiteNavigationElement"> <div class="inside-navigation grid-container grid-parent"> <button aria-controls="primary-menu" aria-expanded="false" class="menu-toggle"> <span class="mobile-menu">Menu</span> </button> <div class="main-nav" id="primary-menu"><ul class="menu sf-menu" id="menu-main"><li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32855" id="menu-item-32855"><a href="https://www.chicagomag.com/news/">News & Politics</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32856" id="menu-item-32856"><a href="https://www.chicagomag.com/dining-drinking/">Dining & Drinking</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-33687" id="menu-item-33687"><a href="https://www.chicagomag.com/city-life/">City Life</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32857" id="menu-item-32857"><a href="https://www.chicagomag.com/arts-culture/">Culture</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32858" id="menu-item-32858"><a href="https://www.chicagomag.com/real-estate/">Real Estate</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-32859" id="menu-item-32859"><a href="https://www.chicagomag.com/style-shopping/">Style</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-29785" id="menu-item-29785"><a href="https://www.chicagomag.com/top-doctors/">Top Docs</a></li> </ul></div> </div> </nav> <div class="hfeed site grid-container container grid-parent" id="page"> <div class="site-content" id="content"> <div id="page-title"></div> <!-- start external content --> <!-- end external content --> <div class="content-area grid-parent mobile-grid-100 grid-100 tablet-grid-100" id="primary"> <main class="site-main" id="main"> <style> .article-wrap { margin-top: 2.22222vw !important; } .single .article-img { text-align: left; } @media only screen and (max-width: 1024px) { .container.grid-container { width: 100%; } .article-wrap .grid-10:first-of-type { display: none; } .article-side { padding-left: 0 !important; } .article-img { max-width: 100%; } } @media only screen and (max-width: 480px) { .site-header { width: 100% !important; height: 70px; } .main-navigation { display: none !important; } .article-body p, .article-body li { font-size: 18px; } .drop-cap { width: 70px; height: 70px; font-size: 60px; line-height: 70px; } .drop-cap-secondary { font-size: 60px; height: 45px; } } </style> <article class="post-11773 post type-post status-publish format-standard hentry category-chicago-magazine issue-november-2012 adcat-dining-drinking" id="post-11773" itemscope="" itemtype="https://schema.org/CreativeWork"> <!-- start featured --> <!-- start super article featured image --> <!-- end super article featured image --> <!-- start head and deck --> <div class="grid-container grid-parent art-head-deck"> <div class="grid-12 prefix-5 tablet-grid-14 tablet-prefix-0 mobile-grid-100 mobile-prefix-0"> <div class="art-head h60">1. Old Oak Tap BLT</div> <div class="art-deck"><p>“Truly inspired.”</p> </div> <div class="art-byline-wrap"> </div> <div class="art-timestamp">October 9, 2012, 6:13 pm</div> <div class="heateor_sss_sharing_container heateor_sss_horizontal_sharing" heateor-sss-data-href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-in-chicago-old-oak-tap-blt/" ss-offset="0"><ul class="heateor_sss_sharing_ul"><li class="heateorSssSharingRound"><i alt="Facebook" class="heateorSssSharing heateorSssFacebookBackground" onclick='heateorSssPopup("https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-in-chicago-old-oak-tap-blt%2F")' style="width:24px;height:24px;border-radius:999px;" title="Facebook"><ss class="heateorSssSharingSvg heateorSssFacebookSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Twitter" class="heateorSssSharing heateorSssTwitterBackground" onclick='heateorSssPopup("http://twitter.com/intent/tweet?text=1.%20Old%20Oak%20Tap%20BLT&url=https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-in-chicago-old-oak-tap-blt%2F")' style="width:24px;height:24px;border-radius:999px;" title="Twitter"><ss class="heateorSssSharingSvg heateorSssTwitterSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Email" class="heateorSssSharing heateorSssEmailBackground" onclick="window.open('mailto:?subject=' + decodeURIComponent('1.%20Old%20Oak%20Tap%20BLT' ).replace('&', '%26') + '&body=' + decodeURIComponent('https%3A%2F%2Fwww.chicagomag.com%2Fchicago-magazine%2Fnovember-2012%2Fbest-sandwiches-in-chicago-old-oak-tap-blt%2F' ), '_blank')" style="width:24px;height:24px;border-radius:999px;" title="Email"><ss class="heateorSssSharingSvg heateorSssEmailSvg" style="display:block"></ss></i></li><li class="heateorSssSharingRound"><i alt="Copy Link" class="heateorSssSharing heateorSssCopyLinkBackground" style="width:24px;height:24px;border-radius:999px;" title="Copy Link"><ss class="heateorSssSharingSvg heateorSssCopyLinkSvg" style="display:block;border-radius:999px;"></ss></i></li><li class="heateorSssSharingRound"><i alt="Comment" class="heateorSssSharing heateorSssCommentBackground" style="width:24px;height:24px;border-radius:999px;" title="Comment"><a href="https://www.chicagomag.com/chicago-magazine/november-2012/best-sandwiches-in-chicago-old-oak-tap-blt/#respond" rel="nofollow"><ss class="heateorSssSharingSvg heateorSssCommentSvg" style="display:block"></ss></a></i></li></ul><div class="heateorSssClear"></div></div> </div> </div> <!-- end head and deck --> <!-- start featured image below meta data --> <div class="grid-container grid-parent featured-img"> <div class="grid-12 prefix-5 tablet-grid-14 tablet-prefix-0 mobile-grid-100 mobile-prefix-0"> <div class="article-img"> <figure> <img src="/wp-content/archive/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Old-Oak-Tap-BLT/01-Old-Oak-Trap-BLT-500.jpg"/> <figcaption> <span class="photo-credit">Photo: Anna Knott; Food stylist: Lisa Kuehl</span></figcaption> </figure> </div> </div> </div> <!-- end featured image below meta data --> <!-- end featured --> <!-- start article wrap --> <div class="grid-container grid-parent article-wrap"> <div class="grid-4 hide-on-tablet hide-on-mobile"> </div> <div class="grid-12 prefix-1 tablet-grid-14 tablet-prefix-0 suffix-1 mobile-grid-100 mobile-prefix-0 mobile-suffix-0"> <div class="article-body"> <p> The B is applewood smoked—nice and snappy. The L is arugula—fresh and peppery. The T is a fried green slice—jacketed in cornmeal and greaseless. Slathered with pimiento cheese, the grilled ciabatta somehow stays crisp, providing three distinct layers of crunch. Truly inspired.</p> <p class="addy"> <em>$10. 2109 W. Chicago Ave., 773-772-0406, <a href="http://www.theoldoaktap.com/">theoldoaktap.com</a></em></p> <aside class="story-nav-aside"> <a class="story-nav" href="https://www.chicagomag.com/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Phoebes-Bakery-The-Gatsby/" id="story-nav-left"><br/> <span class="previous">Previous</span><br/> <span class="story-nav-head">50. The Gatsby</span><br/> Phoebe’s Bakery<br/> </a><br/> <a class="story-nav" href="/Chicago-Magazine/November-2012/Best-Sandwiches-in-Chicago-Au-Cheval-Fried-Bologna/" id="story-nav-right"><br/> <span class="next">Next</span><br/> <span class="story-nav-head">2. Fried Bologna</span><br/> Au Cheval<br/> </a><br/> </aside> </div> <div class="article-tags"> </div> </div> <div class="article-side grid-6 tablet-grid-9 mobile-grid-100 most-pop"> <div class="ad-space"> <!-- GPT AdSlot 12 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250],[300,600]] --> <div class="hide-on-mobile" id="div-gpt-ad-2789321-12"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-12'); }); </script> </div> <!-- End AdSlot 12 --> <!-- GPT AdSlot 15 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250] --> <div class="hide-on-desktop hide-on-tablet" id="div-gpt-ad-2789321-15"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-15'); }); </script> </div> <!-- End AdSlot 15 --> <!-- GPT AdSlot 11 for Ad unit 'trb.chicagomag/hp' ### Size: [[300,250]] --> <div id="div-gpt-ad-2789321-11"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-11'); }); </script> </div> <!-- End AdSlot 11 --> </div> </div> </div> <!-- end article wrap --> </article> <!-- start ad --> <div class="grid-container grid-parent ad-space ad-space-leader hide-on-mobile mb-0"> <!-- GPT AdSlot 5 for Ad unit 'trb.chicagomag/hp' ### Size: [[728,90]] --> <div id="div-gpt-ad-2789321-5"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-5'); }); </script> </div> <!-- End AdSlot 5 --> </div> <div class="grid-container grid-parent ad-space ad-space-leader hide-on-desktop hide-on-tablet"> <!-- GPT AdSlot 10 for Ad unit 'trb.chicagomag/hp' ### Size: [[320,50]] --> <div id="div-gpt-ad-2789321-10"> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-2789321-10'); }); </script> </div> <!-- End AdSlot 10 --> </div> <!-- end ad --> </main><!-- #main --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <!-- start footer --> <div id="footer"> <div class="grid-container"> <div class="grid-5 suffix-1 mobile-grid-12 mobile-suffix-0 grid-parent-mobile left"> <div class="wrap"> <a href="https://chicagomag.secure.darwin.cx/I1YAD7BC">Subscribe</a> <a href="https://cma.pcdfusion.com/pcd/CustomerSupport/Account/Login?ReturnUrl=%2fpcd%2fCustomerSupport%2fApp%2f3141">Manage Subscription</a> <a href="https://chicagomag.zinioapps.com/my-library/magazines">Issue Archive</a> <a href="http://www.tronc.com/privacy-policy/">Privacy Policy</a> <a href="http://www.tronc.com/central-terms-of-service/">Terms of Service</a> </div> </div> <div class="grid-10 prefix-1 suffix-1 mobile-grid-100 mobile-prefix-0 grid-parent-mobile middle hide-on-mobile"> <div class="wrap"> <h2>Follow Us</h2> <div class="footer-social"> <a href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <h2>Get Our Newsletters</h2> <p style="text-align: center;">Subscribe to one or more of our free e-mail newsletters to get instant updates on local news, events, and opportunities in Chicago.</p> <a href="/newsletters/"><button style="background:#d2232a; color:#fff; padding-left: 5px; padding-right: 5px; width: 30%; margin-left: 35%;">SUBSCRIBE</button></a> <!--<div class="footer-form" style="display:flex; margin-top:60px; margin-bottom: 10px;"> <table> <tr> <td><input type="text"></td> <td><button style="background:#d2232a; color:#fff; padding-left: 5px; padding-right: 5px;">Subscribe to All</button></td> </tr> </table> </div>--> </div> </div> <div class="grid-5 prefix-1 mobile-grid-12 mobile-prefix-0 mobile-suffix-0 grid-parent-mobile right"> <div class="wrap"> <a href="https://www.chicagomag.com/about-the-magazine/">About the Magazine</a> <a href="https://www.chicagomag.com/contact-us/">Contact Us</a> <a href="https://www.chicagomag.com/advertise/">Advertise</a> <a href="https://www.chicagomag.com/resource-guide/">Resource Guide</a> <a href="https://www.chicagomag.com/events/">Events</a> </div> </div> <div class="mobile-grid-100 mobile-prefix-0 mobile-suffix-1 grid-parent-mobile middle hide-on-desktop hide-on-tablet"> <div class="wrap"> <h2>Follow Us</h2> <div class="footer-social"> <a href="https://www.facebook.com/ChicagoMagazine" target="_blank"><i class="fab fa-facebook-f"></i></a> <a href="http://www.twitter.com/chicagomag/" target="_blank"><i class="fab fa-twitter"></i></a> <a href="http://instagram.com/chicagomag" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://www.youtube.com/channel/UCOkRC6Y4LUyvglGmyC52KPw" target="_blank"><i class="fab fa-youtube"></i></a> </div> <h2>Get Our Newsletters</h2> <p>Subscribe to one or more of our free e-mail newsletters to get instant updates on local news, events, and opportunities in Chicago.</p> <div class="footer-form" style="display:flex; margin-top:60px;"> <input style="width:80%;" type="text"/> <button style="width:20%; background:#d2232a; color:#fff;">Sign Up</button> </div> <div class="copyright">©2020 Chicago magazine / A Chicago Tribune Media Group website</div> </div> </div> </div> </div> <!-- end footer --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> jQuery(document).ready(function($) { $(".grid-toggle").click(function(){ $(".grid-guide").toggle(); }); $(".nav2-toggle").click(function(){ $("#nav2-overlay").toggle(); $("#nav2-overlay-top").toggle(); $("#nav2-overlay-btm").toggle(); $("#nav2-inner-overlay").toggle(); $("#nav2-inner").toggle(); $("#nav2-open").toggle(); $("#nav2-close").toggle(); }); $(".search-open").click(function(){ $('#search-overlay').fadeIn().css('display', 'inline-block'); $('.search-field').focus(); //$('#search-close').fadeIn().css('display', 'block'); }); $(".search-close-btn").click(function(){ $("#search-overlay").fadeOut().toggle(); $("#search-close").fadeOut().toggle(); }); }); </script> <script> jQuery(document).ready(function($) { $(".toggle-rock").click(function(){ $('.indie-rock').fadeOut().css('display', 'none'); $('.new-music').fadeOut().css('display', 'none'); $('.rock').fadeIn().css('display', 'block'); }); $(".toggle-indie-rock").click(function(){ $('.rock').fadeOut().css('display', 'none'); $('.new-music').fadeOut().css('display', 'none'); $('.indie-rock').fadeIn().css('display', 'block'); }); $(".toggle-new-music").click(function(){ $('.indie-rock').fadeOut().css('display', 'none'); $('.rock').fadeOut().css('display', 'none'); $('.new-music').fadeIn().css('display', 'block'); }); $(".toggle-all-genre").click(function(){ $('.indie-rock').fadeIn().css('display', 'block'); $('.rock').fadeIn().css('display', 'block'); $('.new-music').fadeIn().css('display', 'block'); }); }); </script> <div class="site-footer"> <footer class="site-info" itemscope="" itemtype="https://schema.org/WPFooter"> <div class="inside-site-info grid-container grid-parent"> <div class="copyright-bar"> <span class="copyright">© 2021 Chicago Magazine</span> • Built with <a href="https://generatepress.com" itemprop="url">GeneratePress</a> </div> </div> </footer> </div><!-- .site-footer --> <!-- Google Tag Manager (noscript) --> <noscript><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-P4M4MH7" style="display:none;visibility:hidden" width="0"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function($) { if($('#load_more').length > 0){ //$('#load_more').click(function(){ var page=1, canBeLoaded = true, category = $('input[name="category"]').val(), ajaxurl="https://www.chicagomag.com/wp-admin/admin-ajax.php"; $(window).scroll(function(){ if( (canBeLoaded == true) && (($(document).scrollTop()) > ( $(document).height()-2000 )) ){ page=page+1; canBeLoaded = false; var data = { 'action': 'my_action', 'page': page, 'category':category }; $.post(ajaxurl, data, function(response) { $('#post_latest').append(response); canBeLoaded = true; if($.trim(response)==="<p>Sorry, no posts matched your criteria.</p>") { canBeLoaded = false; $('#load_more').hide(); } }); } }); } }); </script> <!--[if lte IE 11]> <script src='https://www.chicagomag.com/wp-content/themes/generatepress/assets/js/classList.min.js?ver=3.0.2' id='generate-classlist-js'></script> <![endif]--> <script id="generate-main-js-extra"> var generatepressMenu = {"toggleOpenedSubMenus":"1","openSubMenuLabel":"Open Sub-Menu","closeSubMenuLabel":"Close Sub-Menu"}; </script> <script id="generate-main-js" src="https://www.chicagomag.com/wp-content/themes/generatepress/assets/js/main.min.js?ver=3.0.2"></script> <script id="heateor_sss_sharing_js-js-before"> function heateorSssLoadEvent(e) {var t=window.onload;if (typeof window.onload!="function") {window.onload=e}else{window.onload=function() {t();e()}}}; var heateorSssSharingAjaxUrl = 'https://www.chicagomag.com/wp-admin/admin-ajax.php', heateorSssCloseIconPath = 'https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/../images/close.png', heateorSssPluginIconPath = 'https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/../images/logo.png', heateorSssHorizontalSharingCountEnable = 0, heateorSssVerticalSharingCountEnable = 0, heateorSssSharingOffset = -10; var heateorSssMobileStickySharingEnabled = 0;var heateorSssCopyLinkMessage = "Link copied.";var heateorSssUrlCountFetched = [], heateorSssSharesText = 'Shares', heateorSssShareText = 'Share';function heateorSssPopup(e) {window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")};var heateorSssWhatsappShareAPI = "web"; </script> <script id="heateor_sss_sharing_js-js" src="https://www.chicagomag.com/wp-content/plugins/sassy-social-share/public/js/sassy-social-share-public.js?ver=3.3.20"></script> <script id="__ytprefsfitvids__-js" src="https://www.chicagomag.com/wp-content/plugins/youtube-embed-plus-pro/scripts/fitvids.min.js?ver=13.4.2"></script> <script id="wp-embed-js" src="https://www.chicagomag.com/wp-includes/js/wp-embed.min.js?ver=5.8.1"></script> <script> // When the user scrolls down 20px from the top of the document, slide down the navbar window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 240 || document.documentElement.scrollTop > 240) { document.getElementById("navbar").style.top = "0"; } else { document.getElementById("navbar").style.top = "-45px"; } } </script> </body> </html>
In [49]:print(soup_tmp.find('p', 'addy'))
<p class="addy"> <em>$10. 2109 W. Chicago Ave., 773-772-0406, <a href="http://www.theoldoaktap.com/">theoldoaktap.com</a></em></p>
원하는 정보가 다 있습니다. 주소와 가격과 전화번호까지 있습니다. 그럼 이상태에서 텍스트(text)로 가지고와서 빈 칸으로 나누면 될 것 같습니다.
In [50]:price_tmp = soup_tmp.find('p', 'addy').get_text() price_tmp
Out[50]:'\n$10. 2109 W. Chicago Ave., 773-772-0406, theoldoaktap.com'
일단.get_text()로 가지고 왔습니다. 원하는 내용은 다 있습니다.
In [51]:price_tmp.split()
Out[51]:['$10.', '2109', 'W.', 'Chicago', 'Ave.,', '773-772-0406,', 'theoldoaktap.com']
그리고 split()을 적용해보면 위 결과처럼 나타납니다. 여기서 빨리 눈치를 채야 하는 것은 각격은 제일 첫 번째라는 것입니다. 그리고 가운데가 주소의 체계에 따라 칸 수가 바뀔 수는 있지만 제일 뒤는 웹 주소고, 제일 뒤에서 두 번째는 전화번호입니다. 파이썬 리스트에서 제일 뒤는-1로 호출할 수 있습니다. 일단 먼저 가격을 가지고 왔습니다.
In [52]:price_tmp.split()[0]
Out[52]:'$10.'
맨 위에 점(.)이 항상 붙어서 아래와 같이 사용하기로 합니다.
In [53]:price_tmp.split()[0][:-1]
Out[53]:'$10'
이제 코드 [105]를 기준으로 두 번째부터 맨 마지막에서 세 번째까지 선택하고 싶은데 그렇게 해도 list형인 것은 변함없습니다. 바로 하나의 문장을 만들고 싶은 것입니다. 이럴 때 사용하는 명령이 join명령입니다.
In [54]:''.join(price_tmp.split()[1:-2])
Out[54]:'2109W.ChicagoAve.,'
이렇게 사용할 수 있습니다. 바로 주소가 되는 것입니다.
3-10 네이버 영화 평점 기준 영화의 평점 변화 확인하기¶
네이버에서는 영화 평점을 보여주는 사이트가 있습니다. 여기서는 인기 있는 영화를 알아볼 수도 있지만 지난 날짜의 인기도 확인할 수 있습니다. https://goo.gl/f5cHRG에 접근해보면 영화 평점순으로 정렬되어 있는 정보를 만날 수 있습니다. 여기서 크롬 개발자 도구를 사용해서 영화 제목이 나오는 부분의 태그를 확인합니다.
In [55]:from bs4 import BeautifulSoup import pandas as pd
우선 간단하게 Beautiful Soup와 pandas를 import합니다.
In [56]:from urllib.request import urlopen url_base = "http://movie.naver.com/" url_syb = "movie/sdb/rank/rmovie.nhn?sel=cur&date=20170804" page = urlopen(url_base+url_syb) soup = BeautifulSoup(page, "html.parser") soup
Out[56]:<!DOCTYPE html> <html lang="ko"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"/> <meta content="http://imgmovie.naver.com/today/naverme/naverme_profile.jpg" property="me2:image"> <meta content="네이버영화 " property="me2:post_tag"> <meta content="네이버영화" property="me2:category1"/> <meta content="" property="me2:category2"/> <meta content="랭킹 : 네이버 영화" property="og:title"/> <meta content="영화, 영화인, 예매, 박스오피스 랭킹 정보 제공" property="og:description"/> <meta content="article" property="og:type"/> <meta content="https://movie.naver.com/movie/sdb/rank/rmovie.naver?sel=cur&date=20170804" property="og:url"/> <meta content="http://static.naver.net/m/movie/icons/OG_270_270.png" property="og:image"/><!-- http://static.naver.net/m/movie/im/navermovie.jpg --> <meta content="http://imgmovie.naver.com/today/naverme/naverme_profile.jpg" property="og:article:thumbnailUrl"/> <meta content="네이버 영화" property="og:article:author"/> <meta content="https://movie.naver.com/" property="og:article:author:url"/> <link href="https://ssl.pstatic.net/static/m/movie/icons/naver_movie_favicon.ico" rel="shortcut icon" type="image/x-icon"/> <title>랭킹 : 네이버 영화</title> <link href="/common/css/movie_tablet.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/common.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/layout.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/old_default.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/old_layout.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/old_common.css?20211015110720" rel="stylesheet" type="text/css"/> <link href="/common/css/old_super_db.css?20211015110720" rel="stylesheet" type="text/css"/> <script src="/common/js/default-min.js" type="text/javascript"></script> </meta></meta></head> <body> <div class="fix" id="wrap"> <!-- GNB --> <script type="text/javascript"> function delayed_submit(object) { if (navigator.userAgent.indexOf('MSIE') == -1) { var b = c = new Date(); while ((b.getTime() - c.getTime()) < 100) { b = new Date(); } //window.setTimeout(function() {object.submit(); console.log('s');}, 300); } } var gnb_service = 'movie'; var gnb_logout = 'http://movie.naver.com/movie/sdb/rank/rmovie.naver%3Fsel%3Dcur%26date%3D20170804'; var gnb_template = "gnb_utf8"; /* https://ssl.pstatic.net/static.gn/templates/gnb_utf8.nhn */ var gnb_brightness=3; var gnb_response = true; </script> <a name="gnb_top"></a> <!-- skip navigation --> <div id="u_skip"> <a href="#header" onclick="document.getElementById('header').tabIndex=-1;document.getElementById('header').focus();return false;"><span>메인 메뉴로 바로가기</span></a> <a href="#content" id="gnb_goContent" onclick="document.getElementById('content').tabIndex=-1;document.getElementById('content').focus();return false;"><span>본문으로 바로가기</span></a> </div> <!-- //skip navigation --> <!-- GNB --> <div class="gnb_container"> <div class="gnb_content"> <div class="gnb_box"> <div class="gnb_wrap"> <div id="gnb" onload="javascript:getGNB();"> <script charset="utf-8" src="https://ssl.pstatic.net/static.gn/templates/gnb_utf8.nhn" type="text/javascript"></script> </div> </div> <!-- 검색창 --> <form action="/movie/search/result.naver" id="jSearchForm" method="get" style="margin:0;display:none;"> <input maxlength="100" name="query" title="영화검색" type="text"/> <input name="section" type="hidden" value="all"/> </form> <fieldset class="srch_area" id="jSearchArea"> <legend><span class="blind">영화검색 영역</span></legend> <div class="srch_field_on _view"> <span class="ipt_srch"> <label for="ipt_tx_srch" id="search_placeholder">영화검색</label> <input accesskey="s" autocomplete="off" class="ipt_tx_srch" id="ipt_tx_srch" maxlength="100" name="query" style="ime-mode:active;" type="text"/> <span class="align"></span> <span class="auto_tx"><a href="#" title="자동완성 펼치기"><img alt="자동완성 펼치기" height="4" src="https://ssl.pstatic.net/static/movie/2012/06/srch_arrow_down.gif" title="자동완성 펼치기" width="7"/></a></span> </span> <button class="btn_srch" onclick="clickcr(this, 'GNB.search', '', '', event); delayed_submit(this);#34; title="검색" type="submit"><span class="blind">검색</span></button> <!-- 자동 완성 영역임 #autocomplate_template--> </div> </fieldset> <!-- //검색창 --> </div> </div> </div> <!-- //GNB --> <!-- nClicks --> <script type="text/javascript">var nsc = "movie.sdb";</script> <script src="/common/js/clickcr.js" type="text/javascript"></script> <!-- // nClicks --> <!-- //GNB --> <!-- LNB --> <!-- header --> <div id="header"> <h1 class="svc_name"> <a class="ci_logo" href="http://www.naver.com/" id="lnb_gonaver" onclick="clickcr(this, 'LNB.naver', '', '', event);" title="naver로 바로가기"><img alt="NAVER" height="13" src="https://ssl.pstatic.net/static/movie/2013/07/logo_ci.png" width="62"/></a> <a class="svc_logo" href="/" onclick="clickcr(this, 'LNB.movie', '', '', event);" title="영화서비스홈으로 바로가기"><img alt="영화" height="19" src="https://ssl.pstatic.net/static/movie/2012/06/logo_svc.png" width="34"/></a> </h1> <div class="scrollbar scrollbar-noscript" id="scrollbar"> <div class="scrollbar-box"> <div class="scrollbar-content"> <div class="in_scroll"> <ul class="navi"> <li> <a class="menu01" href="/" onclick="clickcr(this, 'LNB.home', '', '', event);" title="영화홈"><strong>영화홈</strong></a> </li> <li> <a class="menu02" href="/movie/running/current.naver" onclick="clickcr(this, 'LNB.movies', '', '', event);" title="상영작·예정작"><strong>상영작·예정작</strong></a> <ul class="navi_sub" style="display:none"> <li><a class="sub2_1" href="/movie/running/current.naver" onclick="clickcr(this, 'LNB.now', '', '', event);" title="현재 상영영화"><em>현재 상영영화</em></a></li> <li><a class="sub2_2" href="/movie/running/premovie.naver" onclick="clickcr(this, 'LNB.soon', '', '', event);" title="개봉 예정영화"><em>개봉 예정영화</em></a></li> <li><a class="sub2_4" href="/movie/running/movieclip.naver" onclick="clickcr(this, 'LNB.tailer', '', '', event);" title="예고편"><em>예고편</em></a></li> </ul> </li> <li> <a class="menu03_on" href="/movie/sdb/rank/rmovie.naver" onclick="clickcr(this, 'LNB.db', '', '', event);" title="영화랭킹"><strong>영화랭킹</strong></a> <ul class="navi_sub" style="display:block"> <li><a class="sub3_1_on" href="/movie/sdb/rank/rmovie.naver" onclick="clickcr(this, 'LNB.rank', '', '', event);" title="랭킹"><em>랭킹</em></a></li> <li><a class="sub3_2" href="/movie/sdb/browsing/bmovie_nation.naver" onclick="clickcr(this, 'LNB.dir', '', '', event);" title="디렉토리"><em>디렉토리</em></a></li> </ul> </li> <li> <a class="menu07" href="/movie/point/af/list.naver" onclick="clickcr(this, 'LNB.comm', '', '', event);" title="평점"><strong>평점</strong></a> <ul class="navi_sub" style="display:none"> <li><a class="sub7_1" href="/movie/point/af/list.naver" onclick="clickcr(this, 'LNB.rating', '', '', event);" title="네티즌 평점"><em>네티즌 평점</em></a></li> <li><a class="sub7_2" href="/movie/board/review/list.naver" onclick="clickcr(this, 'LNB.review', '', '', event);" title="네티즌 리뷰"><em>네티즌 리뷰</em></a></li> </ul> </li> <li> <a class="menu08" href="http://serieson.naver.com/movie/home.nhn" onclick="clickcr(this, 'LNB.download', '', '', event);" target="_blank" title="다운로드"><strong>다운로드</strong></a> </li> <li class="nav_indi"> <a href="http://tv.naver.com/indiecinema" target="_blank" title="인디극장 UP"><strong>인디극장 UP</strong></a><!-- N=a:LNB.indie --> </li> </ul> <!-- div class="view_mode"> <a href="#" title="" class="normal_on"><em>1단 보기</em></a> <a href="#" title="" class="wide_off"><em>2단 보기</em></a> </div --> </div> </div> </div> <div class="scrollbar-v"> <div class="scrollbar-button-up"></div> <div class="scrollbar-track"> <div class="scrollbar-thumb"></div> </div> <div class="scrollbar-button-down"></div> </div> </div> </div> <!-- //header --> <!-- //LNB --> <div id="container"> <!-- content --> <div id="content"> <div class="article"> <div class="old_layout old_super_db"> <h3 class="h_db_rank"><strong class="blind">랭킹</strong></h3> <ul class="tab_db_rank"> <li><a class="db_tab01_on" href="/movie/sdb/rank/rmovie.naver" title="영화"><em>영화</em></a></li> <li><a class="db_tab02" href="/movie/sdb/rank/rpeople.naver" title="영화인"><em>영화인</em></a></li> <!-- li><a href="/movie/sdb/rank/rfestival.naver" title="영화제" class="db_tab03"><em>영화제</em></a></li --> <!-- li><a href="/movie/sdb/rank/rcompany.naver" title="영화사" class="db_tab04"><em>영화사</em></a></li --> <!-- li><a href="/movie/sdb/rank/rnews.naver" title="기자영화" class="db_tab05"><em>기자</em></a></li --> <!-- li><a href="/movie/sdb/rank/rreview.naver" title="네티즌리뷰" class="db_tab06"><em>네티즌리뷰</em></a></li --> </ul> <!-- Content Body --> <div class="type_1" id="cbody"> <div id="old_content"> <h4 class="tlt"><img alt="영화랭킹" height="15" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tlt_ranking_movie.gif" width="65"/> </h4> <!-- 탭메뉴 --> <div class="tab_type_6"> <ul><!--활성화된 탭의 이미지는 _on.gif 입니다--> <li><a href="rmovie.naver?sel=cnt&date=20170804"><img alt="조회순" height="28" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tab_movie_1_off.gif" width="112"/></a></li> <li><a href="rmovie.naver?sel=cur&date=20170804"><img alt="평점순(현재상영영화)" height="28" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tab_movie_2_on.gif" width="126"/></a></li> <li><a href="rmovie.naver?sel=pnt&date=20170804"><img alt="평점순(모든영화)" height="28" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tab_movie_3_off.gif" width="126"/></a></li> </ul> <p class="r_date">2017.08.04 <a href="rmovie.naver?sel=cur&tg=0&date=20170803"><img alt="prev" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/btn_prev.gif" style="margin-right:1px;" width="13"/></a><a href="rmovie.naver?sel=cur&tg=0&date=20170805"><img alt="next" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/btn_next.gif" width="13"/></a></p> </div> <!-- //탭메뉴 --> <!-- 랭킹 리스트 --> <table cellspacing="0" class="list_ranking"> <caption class="blind">랭킹 테이블</caption> <col width="6%"/><col width="*"/><col width="15%"/><col width="3%"/><col width="12%"/><col width="2%"/><col width="5%"/> <thead> <tr> <th scope="col">순위</th> <th scope="col">영화명</th> <th colspan="3" scope="col">평점</th> <th colspan="2" scope="col">변동폭</th> </tr> </thead> <tbody> <tr><td class="blank01" colspan="8"></td></tr> <!-- 예제 <tr> <td class="ac"><img src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g50.gif" alt="50" width="14" height="13"></td> <td class="title"><a href="#">트랜스포머</a></td> <td class="ac"><img src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" alt="down" width="7" height="10"></td> <td class="range ac">7</td> </tr> --> <tr> <td class="ac"><img alt="01" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r01.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=62586" title="다크 나이트">다크 나이트</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:93.19999694824219%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.32</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=62586">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="02" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r02.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=164290" title="킹 오브 프리즘 프라이드 더 히어로">킹 오브 프리즘 프라이드 더 히어로</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.79999732971191%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.28</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=164290">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="03" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r03.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152160" title="킹 오브 프리즘">킹 오브 프리즘</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.5%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.25</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=152160">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="04" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r04.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10448" title="오즈의 마법사">오즈의 마법사</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.29999542236328%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.23</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=10448">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="05" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r05.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154437" title="내 사랑">내 사랑</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.29999542236328%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.23</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=154437">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="up" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="06" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r06.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=160135" title="서서평, 천천히 평온하게">서서평, 천천히 평온하게</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.29999542236328%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.23</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=160135">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="07" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r07.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10217" title="로보캅">로보캅</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:92.10000038146973%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.21</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=10217">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="up" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="08" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r08.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=76309" title="플립">플립</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:91.99999809265137%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.20</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=76309">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="up" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="09" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r09.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=159054" title="명탐정 코난:진홍의 연가">명탐정 코난:진홍의 연가</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:91.80000305175781%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.18</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=159054">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">2</td> </tr> <tr> <td class="ac"><img alt="010" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_r10.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=31827" title="헤드윅">헤드윅</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:91.80000305175781%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.18</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=31827">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr><td class="line01" colspan="8"></td></tr> <tr> <td class="ac"><img alt="11" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g11.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=153621" title="댄서">댄서</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:91.40000343322754%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.14</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=153621">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="12" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g12.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=38444" title="이터널 선샤인">이터널 선샤인</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:91.00000381469727%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.10</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=38444">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="13" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g13.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=17970" title="샤인">샤인</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:90.9000015258789%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.09</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=17970">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="14" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g14.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=36944" title="올드보이">올드보이</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:90.50000190734863%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.05</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=36944">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="15" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g15.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=95767" title="어네스트와 셀레스틴">어네스트와 셀레스틴</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:90.50000190734863%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.05</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=95767">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="16" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g16.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=27350" title="기쿠지로의 여름">기쿠지로의 여름</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:90.20000457763672%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.02</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=27350">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="17" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g17.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=125417" title="파도가 지나간 자리">파도가 지나간 자리</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:90.0%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">9.00</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=125417">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="18" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g18.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146469" title="택시운전사">택시운전사</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:89.89999771118164%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.99</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=146469">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="up" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="19" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g19.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=134772" title="눈길">눈길</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:89.39999580383301%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.94</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=134772">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="20" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g20.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=162173" title="노무현입니다">노무현입니다</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:89.30000305175781%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.93</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=162173">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr><td class="line01" colspan="8"></td></tr> <tr> <td class="ac"><img alt="21" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g21.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=18682" title="스타쉽 트루퍼스">스타쉽 트루퍼스</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:89.0999984741211%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.91</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=18682">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="22" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g22.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=27260" title="파이트 클럽">파이트 클럽</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:89.0999984741211%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.91</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=27260">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="23" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g23.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=80774" title="청원">청원</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:88.69999885559082%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.87</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=80774">평점주기</a></td> <!-----------------------------------------> <td class="new_icon" colspan="2"><img alt="new" height="5" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_new_1.gif" width="20"/></td> </tr> <tr> <td class="ac"><img alt="24" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g24.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10800" title="토탈 리콜">토탈 리콜</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:88.59999656677246%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.86</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=10800">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="25" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g25.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=156477" title="극장판 짱구는 못말려 : 습격!! 외계인 덩덩이">극장판 짱구는 못말려 : 습격!! 외계인 덩덩이</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:88.4000015258789%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.84</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=156477">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="26" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g26.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=149481" title="연애담">연애담</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:87.60000228881836%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.76</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=149481">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="27" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g27.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=150198" title="너의 이름은.">너의 이름은.</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:87.60000228881836%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.76</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=150198">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="28" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g28.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=132626" title="슈퍼배드 3">슈퍼배드 3</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:87.39999771118164%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.74</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=132626">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="29" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g29.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154980" title="꿈의 제인">꿈의 제인</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:87.10000038146973%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.71</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=154980">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="30" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g30.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=156091" title="심야식당2">심야식당2</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:86.19999885559082%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.62</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=156091">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr><td class="line01" colspan="8"></td></tr> <tr> <td class="ac"><img alt="31" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g31.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=134963" title="라라랜드">라라랜드</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:85.9000015258789%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.59</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=134963">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="32" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g32.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152396" title="카3: 새로운 도전">카3: 새로운 도전</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:85.79999923706055%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.58</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=152396">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">2</td> </tr> <tr> <td class="ac"><img alt="33" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g33.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=125447" title="오두막">오두막</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:84.89999771118164%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.49</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=125447">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="34" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g34.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=135874" title="스파이더맨: 홈커밍">스파이더맨: 홈커밍</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:84.70000267028809%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.47</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=135874">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="35" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g35.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=143435" title="옥자">옥자</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:84.70000267028809%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.47</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=143435">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">2</td> </tr> <tr> <td class="ac"><img alt="36" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g36.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=53152" title="500일의 썸머">500일의 썸머</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:83.90000343322754%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.39</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=53152">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="37" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g37.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=32667" title="복수는 나의 것">복수는 나의 것</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:83.4000015258789%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.34</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=32667">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="38" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g38.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146480" title="덩케르크">덩케르크</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:83.10000419616699%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.31</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=146480">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="39" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g39.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=158910" title="예수는 역사다">예수는 역사다</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:81.40000343322754%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">8.14</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=158910">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="40" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g40.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=40932" title="매치 포인트">매치 포인트</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:79.6999979019165%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">7.97</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=40932">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr><td class="line01" colspan="8"></td></tr> <tr> <td class="ac"><img alt="41" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g41.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=144988" title="7번째 내가 죽던 날">7번째 내가 죽던 날</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:78.4000015258789%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">7.84</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=144988">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="42" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g42.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154262" title="위시 어폰">위시 어폰</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:77.10000038146973%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"#34;/></div></div></td> <td class="point">7.71</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=154262">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="43" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g43.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152616" title="47 미터">47 미터</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:74.00000095367432%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">7.40</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=152616">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="44" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g44.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=38766" title="친절한 금자씨">친절한 금자씨</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:72.60000228881836%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">7.26</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=38766">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="45" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g45.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=114268" title="송 투 송">송 투 송</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:70.3000020980835%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">7.03</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=114268">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="46" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g46.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=162956" title="그 후">그 후</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:65.99999904632568%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">6.60</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=162956">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="na" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/></td> <td class="range ac">0</td> </tr> <tr> <td class="ac"><img alt="47" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g47.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=59845" title="박쥐">박쥐</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:60.900001525878906%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">6.09</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=59845">평점주기</a></td> <!-----------------------------------------> <td class="new_icon" colspan="2"><img alt="new" height="5" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_new_1.gif" width="20"/></td> </tr> <tr> <td class="ac"><img alt="48" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g48.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=57675" title="싸이보그지만 괜찮아">싸이보그지만 괜찮아</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:51.70000076293945%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">5.17</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=57675">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr> <td class="ac"><img alt="49" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/common/bullet_r_g49.gif" width="14"/></td> <td class="title"> <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146506" title="군함도">군함도</a> </div> </td> <!-- 평점순일 때 평점 추가하기 --> <td><div class="point_type_2"><div class="mask" style="width:49.49999809265137%"><img alt="" height="14" src="https://ssl.pstatic.net/imgmovie/2007/img/common/point_type_2_bg_on.gif" width="79"/></div></div></td> <td class="point">4.95</td> <td class="ac"><a class="txt_link" href="/movie/point/af/list.naver?st=mcode&sword=146506">평점주기</a></td> <!-----------------------------------------> <td class="ac"><img alt="down" class="arrow" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/></td> <td class="range ac">1</td> </tr> <tr><td class="blank01" colspan="8"></td></tr> </tbody> </table> <!-- 페이지 네비게이션 시작 --> <!-- 페이지 네비게이션 끝 --> <!-- //랭킹 리스트 --> <span class="txt_mark">※</span> <span class="txt_term">집계기준 : <strong>2017.08.04</strong>일 까지 네이버영화에 수록 된 영화의 관람 후 평점</span> <!-- 네이버 영화평점랭킹 선정방법 --> <div class="box_choice_way"> <img alt="네이버 영화평점랭킹 선정방법" height="13" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_01.gif" width="154"/> <dl class="choice_way"> <dt><img alt="집계기준" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_01_1.gif" width="39"/></dt><dd>전국기준 현재 상영되고 있는 영화 중 <em>평점 응답자가 <strong>300명</strong> 이상</em>인 경우</dd> <dt><img alt="집계기간" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_01_2.gif" width="40"/></dt><dd>전일까지의 누적 평점</dd> <dt><img alt="표본오차" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_01_3.gif" width="40"/></dt><dd><em>95% 신뢰수준에서 ±5.65</em></dd> </dl> <table cellpadding="0" cellspacing="0" class="choice_way_data"> <col width="48"/><col width="73"/><col width="73"/><col width="73"/><col width="73"/><col width="73"/><col width="110"/> <tr> <th class="bgwhite" scope="row">구분</th> <td>N</td> <td>Range</td> <td>Minimum</td> <td>Maximum</td> <td>Mean</td> <td>Std.Deviation</td> </tr> <tr> <th class="bgwhite" scope="row">평점</th> <td class="range ac">26</td> <td class="range ac">4.39</td> <td class="range ac">4.75</td> <td class="range ac">9.14</td> <td class="range ac">7.59</td> <td class="range ac">7.59</td> </tr> </table> <dl class="choice_way_qna"> <dt><img alt="왜 평점응답자를 300명 이상으로 정하나요?" height="12" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_02.gif" width="221"/></dt> <dd>일반적인 여론조사에서의 최소 응답자수가 300명이기 때문입니다.</dd> <dt><img alt="표본오차 95% 신뢰수준에서 ±5.65가 무슨 뜻인가요?" height="12" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_03.gif" width="271"/></dt> <dd>동일한 실험을 100번 했을 경우 95번은 ±5.65% 범위 내에서 동일한 결과가 나온다는 말입니다.</dd> <dt><img alt="Descriptive Statistics는 어떻게 보는건가요?" height="12" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/txt_movie_ranking_04.gif" width="234"/></dt> <dd> <ul> <li>N=Case의 숫자</li> <li>Range=응답자의 범위</li> <li>Minimum=최소 응답값</li> <li>Maximum=최대응답값</li> <li>Mean=평균</li> <li>Std.Deviation=표준편자</li> </ul> </dd> </dl> </div> <!-- //네이버 영화평점랭킹 선정방법 --> <!-- 탑버튼 --> <div class="go_top"> <a href="#gnb_top"><img alt="TOP" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/common/btn_top.gif" width="30"/></a> </div> <!-- //탑버튼 --> <img alt="" class="clear" src="https://ssl.pstatic.net/imgmovie/2007/img/common/blank.gif"/> <!-- //Content Body --> <script src="/common/js/jindo2.js" type="text/javascript"></script> </div> <div id="assistant"> <!-- 우측 메뉴 --> <!-- 영화 인기검색어 --> <div class="box_type_1 mb_8"> <h3><img alt="영화 인기검색어" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tlt_r_best_movie.gif" width="75"/></h3> <ul class="r_ranking"> <li class="ranking01"> <a class="b" href="/movie/bi/mi/basic.naver?code=191559" onclick="clickcr(this,'pop.list','191559','1',event);" title="듄"><span class="blind">1위</span>듄</a> <span class="rank"> <img alt="순위 상승" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/>1</span> <li class="ranking02"> <a href="/movie/bi/mi/basic.naver?code=187323" onclick="clickcr(this,'pop.list','187323','2',event);" title="베놈 2: 렛 데어 비 카니지"><span class="blind">2위</span>베놈 2: 렛 데어 비..</a> <span class="rank"> <img alt="순위 하락" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/>1</span> <li class="ranking03"> <a href="/movie/bi/mi/basic.naver?code=191545" onclick="clickcr(this,'pop.list','191545','3',event);" title="라스트 듀얼: 최후의 결투"><span class="blind">3위</span>라스트 듀얼: 최후..</a> <span class="rank"> <img alt="순위 상승" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/>1</span> <li class="ranking04"> <a href="/movie/bi/mi/basic.naver?code=99702" onclick="clickcr(this,'pop.list','99702','4',event);" title="007 노 타임 투 다이"><span class="blind">4위</span>007 노 타임 투 다..</a> <span class="rank"> <img alt="순위 하락" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/>1</span> <li class="ranking05"> <a href="/movie/bi/mi/basic.naver?code=195986" onclick="clickcr(this,'pop.list','195986','5',event);" title="노회찬6411"><span class="blind">5위</span>노회찬6411</a> <span class="rank"> <img alt="순위 변동 없음" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/>0</span> </li></li></li></li></li></ul> <!--[D] 더보기 위치 이동 --> <a class="more" href="/movie/sdb/rank/rmovie.naver" onclick="clickcr(this,'pop.more','','',event);">더보기</a> <p class="term">2021.10.22</p> </div> <!-- 영화인 인기검색어 --> <div class="box_type_1 mb_8"> <h3><img alt="영화인 인기검색어" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/super_db/tlt_r_best_star.gif" width="85"/></h3> <ul class="r_ranking"> <li class="ranking01"> <a class="b" href="/movie/bi/pi/basic.naver?st=1&code=162941" onclick="clickcr(this,'peo.list','162941','1',event);" title="드니 빌뇌브"><span class="blind">1위</span>드니 빌뇌브</a> <span class="rank"> <img alt="" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/>0</span> <li class="ranking02"> <a href="/movie/bi/pi/basic.naver?st=1&code=86484" onclick="clickcr(this,'peo.list','86484','2',event);" title="캐리 후쿠나가"><span class="blind">2위</span>캐리 후쿠나가</a> <span class="rank"> <img alt="" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/>0</span> <li class="ranking03"> <a href="/movie/bi/pi/basic.naver?st=1&code=350759" onclick="clickcr(this,'peo.list','350759','3',event);" title="티모시 샬라메"><span class="blind">3위</span>티모시 샬라메</a> <span class="rank"> <img alt="" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_up_1.gif" width="7"/>1</span> <li class="ranking04"> <a href="/movie/bi/pi/basic.naver?st=1&code=9435" onclick="clickcr(this,'peo.list','9435','4',event);" title="앤디 서키스"><span class="blind">4위</span>앤디 서키스</a> <span class="rank"> <img alt="" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_down_1.gif" width="7"/>1</span> <li class="ranking05"> <a href="/movie/bi/pi/basic.naver?st=1&code=1309" onclick="clickcr(this,'peo.list','1309','5',event);" title="리들리 스콧"><span class="blind">5위</span>리들리 스콧</a> <span class="rank"> <img alt="" height="10" src="https://ssl.pstatic.net/imgmovie/2007/img/common/icon_na_1.gif" width="7"/>0</span> </li></li></li></li></li></ul> <a class="more" href="/movie/sdb/rank/rpeople.naver" onclick="clickcr(this,'peo.more','','',event);">더보기</a> <p class="term">2021.10.22</p> </div> <!--티켓예매순--> <div class="box_type_1 mb_8"> <h3><img alt="티켓예매순" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/running/tlt_r_reservation.gif" width="51"/></h3> <div id="reserveRanking0" style="display:block"> <ul class="r_ranking"> <li class="ranking01"><a class="b" href="/movie/bi/mi/basic.naver?code=191559" onclick="clickcr(this,'tck.list','191559','1',event);" title="듄"><span class="blind">1위</span>듄</a><span class="ratio check">31.38%</span></li> <li class="ranking02"><a href="/movie/bi/mi/basic.naver?code=187323" onclick="clickcr(this,'tck.list','187323','2',event);" title="베놈 2: 렛 데어 비 카니지"><span class="blind">2위</span>베놈 2: 렛 데어 비..</a> <span class="ratio">19.16%</span></li> <li class="ranking03"><a href="/movie/bi/mi/basic.naver?code=99702" onclick="clickcr(this,'tck.list','99702','3',event);" title="007 노 타임 투 다이"><span class="blind">3위</span>007 노 타임 투 다..</a> <span class="ratio">7.98%</span></li> <li class="ranking04"><a href="/movie/bi/mi/basic.naver?code=31607" onclick="clickcr(this,'tck.list','31607','4',event);" title="고양이를 부탁해"><span class="blind">4위</span>고양이를 부탁해</a> <span class="ratio">4.28%</span></li> <li class="ranking05"><a href="/movie/bi/mi/basic.naver?code=191545" onclick="clickcr(this,'tck.list','191545','5',event);" title="라스트 듀얼: 최후의 결투"><span class="blind">5위</span>라스트 듀얼: 최후..</a> <span class="ratio">3.9%</span></li> </ul> <a class="more" href="/movie/sdb/rank/rreserve.naver" id="ticketRankLink" onclick="clickcr(this,'tck.more','','',event);">더보기</a> <div class="term_1"><img alt="출처:YES24" height="12" src="https://ssl.pstatic.net/imgmovie/2007/img/common/txt_source_yes24_02.gif" width="54"/><div class="date">2021.10.23</div></div> </div> </div> <!--//티켓예매순--> <!--박스오피스--> <div class="box_type_1 mb_8"> <h3><img alt="박스오피스" height="11" src="https://ssl.pstatic.net/imgmovie/2007/img/running/tlt_r_boxoffice.gif" width="51"/></h3> <ul class="r_ranking box"> <li class="ranking01"><a class="b" href="/movie/bi/mi/basic.naver?code=187323" onclick="clickcr(this,'box.list','187323','1',event);" title="베놈 2: 렛 데어 비 카니지"><span class="blind">1위</span>베놈 2: 렛 데어 비 카니지</a> <span "="" class="ratio check"><em>777797</em> 명</span></li> <li class="ranking02"><a href="/movie/bi/mi/basic.naver?code=99702" onclick="clickcr(this,'box.list','99702','2',event);" title="007 노 타임 투 다이"><span class="blind">2위</span>007 노 타임 투 다이</a> <span class="ratio"><em>65340</em> 명</span></li> <li class="ranking03"><a href="/movie/bi/mi/basic.naver?code=190320" onclick="clickcr(this,'box.list','190320','3',event);" title="보이스"><span class="blind">3위</span>보이스</a> <span class="ratio"><em>34506</em> 명</span></li> <li class="ranking04"><a href="/movie/bi/mi/basic.naver?code=199860" onclick="clickcr(this,'box.list','199860','4',event);" title="기적"><span class="blind">4위</span>기적</a> <span class="ratio"><em>18834</em> 명</span></li> <li class="ranking05"><a href="/movie/bi/mi/basic.naver?code=205968" onclick="clickcr(this,'box.list','205968','5',event);" title="극장판 짱구는 못말려: 격돌! 낙서왕국과 얼추 네 명의 용사들"><span class="blind">5위</span>극장판 짱구는 못말려: 격돌! 낙서왕국과 얼추 네 명의 용사들</a> <span class="ratio"><em>9825</em> 명</span></li> </ul> <a class="more" href="/movie/sdb/rank/rboxoffice.naver" onclick="clickcr(this,'box.more','','',event);">더보기</a> <div class="term_1"><span class="cnt">주말관객 기준</span><div class="date">20211015-20211017</div></div> </div> <!--//박스오피스--> </div> <img alt="" class="clear" src="https://ssl.pstatic.net/imgmovie/2007/img/common/blank.gif"/> </div> <!-- //Content Body --> </div> </div> </div> <!-- //content --> </div> <!-- //container --> <!-- Footer --> <script src="/common/js/jindo/component/1.0.2/jindo.Component.js" type="text/javascript"></script> <script src="/common/js/jindo/component/1.0.2/jindo.UIComponent.js" type="text/javascript"></script> <!-- footer --> <div id="footer"> <div class="in_footer"> <div class="foot_con"> <ul> <li class="first"><a href="http://www.naver.com/rules/service.html" onclick="clickcr(this, 'fot.agreement', '', '', event);" target="_blank">이용약관</a></li> <li><a href="http://www.naver.com/rules/privacy.html" onclick="clickcr(this, 'fot.privacy', '', '', event);" target="_blank"><strong>개인정보처리방침</strong></a></li> <li><a href="http://www.naver.com/rules/disclaimer.html" onclick="clickcr(this, 'fot.disclaimer', '', '', event);" target="_blank">책임의 한계와 법적고지</a></li> <li><a href="https://help.naver.com/support/service/main.nhn?serviceNo=800" onclick="clickcr(this, 'fot.help', '', '', event);" target="_blank">영화 고객센터</a></li> </ul> <p class="info">본 콘텐츠의 저작권은 저작권자 또는 제공처에 있으며, 이를 무단 이용하는 경우 저작권법 등에 따라 법적 책임을 질 수 있습니다.</p> <p class="info"> 사업자등록번호 : 220-81-62517<span>통신판매업 신고번호</span> : 경기성남 제 2006 - 692호<span>대표이사 : 한성숙</span><span><a href="http://www.ftc.go.kr/info/bizinfo/communicationList.jsp" onclick="clickcr(this, 'fot.bizinfo', '', '', event);">사업자등록정보 확인</a></span><br/> 주소 : 경기도 성남시 분당구 불정로 6 네이버 그린팩토리 <span>대표전화 : 1588-3820</span> </p> <address> <a class="logo" href="https://www.navercorp.com" onclick="clickcr(this, 'fot.nhn', '', '', event);" target="_blank"><img alt="NAVER" height="11" src="https://ssl.pstatic.net/static/movie/2013/07/logo_naver.png" width="63"/></a> <em>Copyright ©</em> <a href="https://www.navercorp.com" onclick="clickcr(this, 'fot.corp', '', '', event);" target="_blank">NAVER Corp.</a> <span>All Rights Reserved.</span> </address> </div> </div> </div> <!-- //footer --> <script type="text/javascript"> if (false) { var alertType = "NONE"; var koreanTitle = ""; var movieCode = "0"; var userReserveCount = "0"; var todayDatetime = "20211023140525"; var endDatetimeAfterTwoDays = "00000000000000"; if (movieCode > 0) { openWriteActualPointAlert (alertType, koreanTitle, movieCode, userReserveCount, todayDatetime, endDatetimeAfterTwoDays); } } function openWriteActualPointAlert (alertType, koreanTitle, movieCode, count, today, endDate) { if (alertType == "ONE" || alertType == "MORE") { setCookieLastUserReserveDate(today, endDate); if (confirm("관람하신 " + koreanTitle + "에\n평점 등록 시 네이버페이 마일리지 500원 적립!\n지금 평점쓰기 메뉴로 이동하시겠습니까?")) { top.location.href = "http://movie.naver.com/movie/bi/mi/point.naver?code=" + movieCode; } } } function setCookieLastUserReserveDate(today, endDate) { var cookieForNotOpenActualPointPopup = jindo.$Cookie(); cookieForNotOpenActualPointPopup.remove("lastUserReserveDatetime"); cookieForNotOpenActualPointPopup.remove("lastUserReserveCheckDatetime"); cookieForNotOpenActualPointPopup.set("lastUserReserveDatetime", endDate, 9999, "movie.naver.com"); cookieForNotOpenActualPointPopup.set("lastUserReserveCheckDatetime", today, 9999, "movie.naver.com"); } </script> <script type="text/javascript"> var alertMessage = "지원되지 않는 브라우저로 서비스 이용에 제한이 있습니다."; function getBrowser() { var ua = navigator.userAgent; if (/NAVER/.test(ua)) { return "NAVER_APP"; } else if (/IEMobile/.test(ua)) { return "INTERNET_EXPLORER_MOBILE"; } else if (/MSIE/.test(ua) || /Trident/.test(ua)) { return "INTERNET_EXPLORER"; } else if (/Firefox/.test(ua)) { return "FIREFOX"; } else if (/Opera\//.test(ua) || /OPR\//.test(ua)) { return "OPERA"; } else if (/Swing\//.test(ua)) { return "SWING"; } else if (/Chrome\//.test(ua) || /CriOS\//.test(ua)) { return "CHROME"; } else if (/BAND\//.test(ua)) { return "BAND_APP"; } else if (/FBAN\/FBIOS/.test(ua)) { return "FACEBOOK_APP"; } else if (/Twitter/.test(ua)) { return "TWITTER_APP"; } else if (/KAKAOTALK/.test(ua)) { return "KAKAOTALK_APP"; } else if (/Android/.test(ua) && /Safari/.test(ua)) { return "ANDROID_INTERNET_APP"; } else if (/Safari/.test(ua)) { return "SAFARI"; } return ""; } if (getBrowser() === "UNKNOWN" && jindo.$Cookie().get("notSupportBrowserAlert") != 'true') { alert(alertMessage); jindo.$Cookie().set("notSupportBrowserAlert", "true", "9999", "movie.naver.com"); } </script> <script src="/common/js/lcslog.js" type="text/javascript"></script> <script src="/common/js/jindo/component/1.0.2/jindo.Component.min.js" type="text/javascript"></script> <script charset="UTF-8" src="/common/js/vendor/jindo.WatchInput.js" type="text/javascript"></script> <script charset="UTF-8" src="/common/js/lib/Core.js?20211015110720" type="text/javascript"></script> <script charset="UTF-8" src="/common/js/lib/LNB.js?20211015110720" type="text/javascript"></script> <script charset="UTF-8" src="/common/js/lib/Search.js?20211015110720" type="text/javascript"></script> <script type="text/javascript"> // nhn.movie.Search가 jindo 기반이어서 javascript로 전환함 if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function () { document.removeEventListener("DOMContentLoaded", arguments.callee, false); loadFooter(); }, false); } // Internet Explorer else if (document.attachEvent) { // onreadystatechange 는 모든 브라우저가 반환 document.attachEvent("onreadystatechange", function () { if (document.readyState == "complete" || document.readyState == 'loaded') { document.detachEvent("onreadystatechange", arguments.callee); loadFooter(); } }); } function loadFooter() { var goNaver = document.getElementById("lnb_gonaver"); goNaver.addEventListener("focus", focusonNaverIcon, false); // LNB - 사용처를 못 찾음 // var oLNB = new nhn.movie.LNB(); // 상단 검색영역 var oSearch = new nhn.movie.Search({ area : "jSearchArea", autosearch : "https://auto-movie.naver.com/ac?q_enc=UTF-8&st=1&r_lt=1&n_ext=1&t_koreng=1&r_format=json&r_enc=utf-8&r_unicode=0&r_escape=1&q=", movelink : "/movie/bi/mi/basic.naver?code=", peoplelink : "/movie/bi/pi/basic.naver?code=" }); getGNB(); } function focusonNaverIcon(event) { event.preventDefault(); // jindo.$Event.CANCEL_DEFAULT 와 동일한 기능으로 추측됨 document.getElementById('ipt_tx_srch').value= ""; document.getElementById('search_placeholder').style = "display:inline;"; if (document.getElementById('jAutoComplate') != undefined && document.getElementById('jAutoComplate') !== null) { document.getElementById('jAutoComplate').style = "display:none;" } } window.addEventListener('pageshow', function(event) { lcs_do(); }); document.addEventListener('click', function (event) { var welSource = event.srcElement; // jindo.$Element(oEvent.element); if (!document.getElementById("gnb").contains(welSource)) { gnbAllLayerClose(); } }); </script> <!-- //Footer --> </div> </body> </html>
해당 주소를 한번 읽어보겠습니다. 앞에서도 이야기했지만 책으로 출판하다 보니 코드가 길어 스크롤되는 문제가 있어서 url_base+url_sub와 같이 표현한 것뿐입니다.
In [57]:soup.find_all('div', 'tit5')
Out[57]:[<div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=62586" title="다크 나이트">다크 나이트</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=164290" title="킹 오브 프리즘 프라이드 더 히어로">킹 오브 프리즘 프라이드 더 히어로</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152160" title="킹 오브 프리즘">킹 오브 프리즘</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10448" title="오즈의 마법사">오즈의 마법사</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154437" title="내 사랑">내 사랑</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=160135" title="서서평, 천천히 평온하게">서서평, 천천히 평온하게</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10217" title="로보캅">로보캅</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=76309" title="플립">플립</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=159054" title="명탐정 코난:진홍의 연가">명탐정 코난:진홍의 연가</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=31827" title="헤드윅">헤드윅</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=153621" title="댄서">댄서</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=38444" title="이터널 선샤인">이터널 선샤인</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=17970" title="샤인">샤인</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=36944" title="올드보이">올드보이</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=95767" title="어네스트와 셀레스틴">어네스트와 셀레스틴</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=27350" title="기쿠지로의 여름">기쿠지로의 여름</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=125417" title="파도가 지나간 자리">파도가 지나간 자리</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146469" title="택시운전사">택시운전사</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=134772" title="눈길">눈길</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=162173" title="노무현입니다">노무현입니다</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=18682" title="스타쉽 트루퍼스">스타쉽 트루퍼스</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=27260" title="파이트 클럽">파이트 클럽</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=80774" title="청원">청원</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=10800" title="토탈 리콜">토탈 리콜</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=156477" title="극장판 짱구는 못말려 : 습격!! 외계인 덩덩이">극장판 짱구는 못말려 : 습격!! 외계인 덩덩이</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=149481" title="연애담">연애담</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=150198" title="너의 이름은.">너의 이름은.</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=132626" title="슈퍼배드 3">슈퍼배드 3</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154980" title="꿈의 제인">꿈의 제인</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=156091" title="심야식당2">심야식당2</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=134963" title="라라랜드">라라랜드</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152396" title="카3: 새로운 도전">카3: 새로운 도전</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=125447" title="오두막">오두막</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=135874" title="스파이더맨: 홈커밍">스파이더맨: 홈커밍</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=143435" title="옥자">옥자</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=53152" title="500일의 썸머">500일의 썸머</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=32667" title="복수는 나의 것">복수는 나의 것</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146480" title="덩케르크">덩케르크</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=158910" title="예수는 역사다">예수는 역사다</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=40932" title="매치 포인트">매치 포인트</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=144988" title="7번째 내가 죽던 날">7번째 내가 죽던 날</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=154262" title="위시 어폰">위시 어폰</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=152616" title="47 미터">47 미터</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=38766" title="친절한 금자씨">친절한 금자씨</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=114268" title="송 투 송">송 투 송</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=162956" title="그 후">그 후</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=59845" title="박쥐">박쥐</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=57675" title="싸이보그지만 괜찮아">싸이보그지만 괜찮아</a> </div>, <div class="tit5"> <a href="/movie/bi/mi/basic.naver?code=146506" title="군함도">군함도</a> </div>]
In [58]:soup.find_all('div', 'tit5')[0].a.string
Out[58]:'다크 나이트'
이렇게 제목만 찾을 수 있습니다.
In [59]:soup.find_all('td','point')[0].string
Out[59]:'9.32'
그다음은 포인트를 찾을 수 있습니다.
In [60]:date = pd.date_range('2017-5-1', periods=100, freq='D') date
Out[60]:DatetimeIndex(['2017-05-01', '2017-05-02', '2017-05-03', '2017-05-04', '2017-05-05', '2017-05-06', '2017-05-07', '2017-05-08', '2017-05-09', '2017-05-10', '2017-05-11', '2017-05-12', '2017-05-13', '2017-05-14', '2017-05-15', '2017-05-16', '2017-05-17', '2017-05-18', '2017-05-19', '2017-05-20', '2017-05-21', '2017-05-22', '2017-05-23', '2017-05-24', '2017-05-25', '2017-05-26', '2017-05-27', '2017-05-28', '2017-05-29', '2017-05-30', '2017-05-31', '2017-06-01', '2017-06-02', '2017-06-03', '2017-06-04', '2017-06-05', '2017-06-06', '2017-06-07', '2017-06-08', '2017-06-09', '2017-06-10', '2017-06-11', '2017-06-12', '2017-06-13', '2017-06-14', '2017-06-15', '2017-06-16', '2017-06-17', '2017-06-18', '2017-06-19', '2017-06-20', '2017-06-21', '2017-06-22', '2017-06-23', '2017-06-24', '2017-06-25', '2017-06-26', '2017-06-27', '2017-06-28', '2017-06-29', '2017-06-30', '2017-07-01', '2017-07-02', '2017-07-03', '2017-07-04', '2017-07-05', '2017-07-06', '2017-07-07', '2017-07-08', '2017-07-09', '2017-07-10', '2017-07-11', '2017-07-12', '2017-07-13', '2017-07-14', '2017-07-15', '2017-07-16', '2017-07-17', '2017-07-18', '2017-07-19', '2017-07-20', '2017-07-21', '2017-07-22', '2017-07-23', '2017-07-24', '2017-07-25', '2017-07-26', '2017-07-27', '2017-07-28', '2017-07-29', '2017-07-30', '2017-07-31', '2017-08-01', '2017-08-02', '2017-08-03', '2017-08-04', '2017-08-05', '2017-08-06', '2017-08-07', '2017-08-08'], dtype='datetime64[ns]', freq='D')
이제 날짜를 5월 1일부터 100일간으로 정의하고 그 날짜에 해당하는 영화 정보 전체를 찾도록 하겠습니다.
In [61]:import urllib from tqdm import tqdm_notebook movie_date = [] movie_name = [] movie_point = [] for today in tqdm_notebook(date): html = "http://movie.naver.com/" + \ "movie/sdb/rank/rmovie.nhn?sel=cur&date={date}" response = urlopen(html.format(date= urllib.parse.quote(today.strftime('%Y%m%d')))) soup = BeautifulSoup(response, "html.parser") end = len(soup.find_all('td', 'point')) movie_date.extend([today for n in range(0, end)]) movie_name.extend([soup.find_all('div', 'tit5')[n].a.string for n in range(0, end)]) movie_point.extend([soup.find_all('td', 'point')[n].string for n in range(0, end)])
/tmp/ipykernel_1476/3666733401.py:8: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0 Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook` for today in tqdm_notebook(date):
어렵지 않습니다. 변수 html을 지정할 때 중괄호 {}로 date라고 잡은 것은 그 밑에 response라는 변수에서 {date}를 변수로 취급하고 내용을 바꿀 것이기 때문입니다. 그러고 나서 제목과 포인트를 읽어왔습니다.
In [62]:movie = pd.DataFrame({'date':movie_date, 'name':movie_name, 'point':movie_point}) movie['point'] = movie['point'].astype(float) movie.head()
Out[62]:date name point 0 2017-05-01 히든 피겨스 9.38 1 2017-05-01 사운드 오브 뮤직 9.36 2 2017-05-01 시네마 천국 9.29 3 2017-05-01 미스 슬로운 9.26 4 2017-05-01 잉여들의 히치하이킹 9.25 읽은 내용을 pandas로 저장합니다. 이 내용에는 날짜별로 영화와 포인트가 저장되어 있을 것입니다. 만약 날짜가 아니라 영화별로 점수의 합산으로 데이터를 보고 싶다면 pivot_table을 사용하면 됩니다.
In [63]:import numpy as np movie_unique = pd.pivot_table(movie, index=['name'], aggfunc=np.sum) movie_best = movie_unique.sort_values(by='point', ascending=False) movie_best.head()
Out[63]:point name 댄서 914.60 서서평, 천천히 평온하게 889.64 오두막 861.65 라라랜드 858.89 너의 이름은. 738.42 여기서 aggfunc으로 np.sum을 이용해서 합산을 해야 영화별 점수의 합계로 정렬될 것입니다. 5월1일 부터 100일간 점수의 합산으로 볼 때 코드[18]의 결과를 보면 고득점 영화 1위부터 5위가 보입니다.
In [64]:tmp = movie.query('name == ["노무현입니다"]') tmp
Out[64]:date name point 1162 2017-05-25 노무현입니다 9.20 1215 2017-05-26 노무현입니다 8.97 1255 2017-05-27 노무현입니다 9.04 1298 2017-05-28 노무현입니다 9.04 1340 2017-05-29 노무현입니다 9.05 ... ... ... ... 4501 2017-08-04 노무현입니다 8.93 4549 2017-08-05 노무현입니다 8.93 4596 2017-08-06 노무현입니다 8.93 4642 2017-08-07 노무현입니다 8.93 4693 2017-08-08 노무현입니다 8.93 76 rows × 3 columns
혹은 위 코드처럼'노무현입니다'라는 영화만 추려서 확인할 수 있습니다. 날짜별 평점의 변화를 확인할 수 있습니다.
In [71]:import matplotlib.pyplot as plt %matplotlib inline plt.figure(figsize=(12,8)) plt.plot(tmp['date'], tmp['point']) plt.legend(loc='best') plt.grid() plt.show()
No handles with labels found to put in legend.
당연히 이것만 날짜별로 그려볼 수 있습니다. 결과는 위 그래프와 같습니다.
3-11 영화별 날짜 변화에 따른 평점 변화 확인하기¶
In [72]:movie_pivot = pd.pivot_table(movie, index=["date"], columns=['name'], values=['point']) movie_pivot.head()
Out[72]:point name 10분 47 미터 500일의 썸머 7년-그들이 없는 언론 7번째 내가 죽던 날 7인의 사무라이 8 마일 가디언즈 오브 갤럭시 가디언즈 오브 갤럭시 VOL. 2 겟 아웃 ... 하울의 움직이는 성 하이큐!! 끝과 시작 한공주 해리가 샐리를 만났을 때 핵소 고지 행복 목욕탕 헤드윅 환상의 빛 흑집사 : 북 오브 더 아틀란틱 히든 피겨스 date 2017-05-01 8.89 NaN NaN NaN NaN NaN NaN 8.56 NaN NaN ... NaN NaN 8.78 8.89 NaN 8.70 NaN NaN 9.20 9.38 2017-05-02 8.89 NaN NaN NaN NaN NaN NaN 8.56 NaN NaN ... NaN NaN 8.78 8.89 NaN 8.68 NaN NaN 9.21 9.37 2017-05-03 8.89 NaN NaN NaN NaN NaN NaN NaN 9.22 NaN ... NaN NaN 8.78 8.89 NaN 8.70 NaN NaN 9.22 9.38 2017-05-04 8.89 NaN NaN NaN NaN NaN NaN NaN 9.15 NaN ... NaN NaN 8.78 NaN NaN 8.67 NaN NaN 9.23 9.38 2017-05-05 8.89 NaN NaN NaN NaN NaN NaN NaN 9.08 NaN ... NaN NaN 8.78 NaN NaN 8.69 NaN NaN 9.24 9.37 5 rows × 204 columns
날짜별로 정리되어 있던 데이터를 pivot_table을 이용해서 코드[22]에서처럼 손쉽게 세로축으로 날짜를, 가로축에 영화 제목을 넣을 수 있습니다.
In [73]:movie_pivot.columns = movie_pivot.columns.droplevel()
In [74]:movie_pivot.head()
Out[74]:name 10분 47 미터 500일의 썸머 7년-그들이 없는 언론 7번째 내가 죽던 날 7인의 사무라이 8 마일 가디언즈 오브 갤럭시 가디언즈 오브 갤럭시 VOL. 2 겟 아웃 ... 하울의 움직이는 성 하이큐!! 끝과 시작 한공주 해리가 샐리를 만났을 때 핵소 고지 행복 목욕탕 헤드윅 환상의 빛 흑집사 : 북 오브 더 아틀란틱 히든 피겨스 date 2017-05-01 8.89 NaN NaN NaN NaN NaN NaN 8.56 NaN NaN ... NaN NaN 8.78 8.89 NaN 8.70 NaN NaN 9.20 9.38 2017-05-02 8.89 NaN NaN NaN NaN NaN NaN 8.56 NaN NaN ... NaN NaN 8.78 8.89 NaN 8.68 NaN NaN 9.21 9.37 2017-05-03 8.89 NaN NaN NaN NaN NaN NaN NaN 9.22 NaN ... NaN NaN 8.78 8.89 NaN 8.70 NaN NaN 9.22 9.38 2017-05-04 8.89 NaN NaN NaN NaN NaN NaN NaN 9.15 NaN ... NaN NaN 8.78 NaN NaN 8.67 NaN NaN 9.23 9.38 2017-05-05 8.89 NaN NaN NaN NaN NaN NaN NaN 9.08 NaN ... NaN NaN 8.78 NaN NaN 8.69 NaN NaN 9.24 9.37 5 rows × 204 columns
이 데이터에서 pivot_table의 결과로 붙은 컬럼 제목을 하나 정리하겠습니다.
In [75]:import platform from matplotlib import font_manager, rc plt.rcParams['axes.unicode_minus'] = False if platform.system() == 'Darwin': rc('font', family='AppleGothic') print('Mac version') elif platform.system() == 'Windows': path = "c:/Windows/Fonts/malgun.ttf" font_name = font_manager.FontProperties(fname=path).get_name() rc('font', family=font_name) print('Windows version') elif platform.system() == 'Linux': path = "/usr/share/fonts/NanumFont/NanumGothicBold.ttf" font_name = font_manager.FontProperties(fname=path).get_name() plt.rc('font', family=font_name) print('Linux version') else: print('Unknown system... sorry~~~~')
Linux version
matplotlib에서의 한글 문제를 설정합니다.
In [76]:movie_pivot.plot(y=['군함도', '노무현입니다','택시운전사','다크 나이트'], figsize=(12,6)) plt.legend(loc='best') plt.grid() plt.show()
관심 있는 영화 몇개를 지정해서 날짜별 변화를 확인해보겠습니다.
결과는 위와 같습니다.'노무현입니다'와'택시운전사'의 성과가 눈에 보입니다. 그리고 그 변화 추이도 알 수 있습니다. 한참 논란이 되는'군함도'의 평점 결과도 나타나고 있습니다. 비록 늦은 감이 분명 있지만, 이런 영화(노무현입니다,택시운전사)들이 주목받고 높은 평점을 유지한다는 사실을 직접 확인 할 수 있따는 것이 참으로 다행입니다.출처 : "파이썬으로 데이터 주무르기"
'파이썬으로 데이터 주무르기' 카테고리의 다른 글
chapter-7 시계열 데이터를 다뤄보자 (0) 2021.10.25 chapter-5 우리나라 인구 소멸 위기 지역 분석 (0) 2021.10.25 chapter-2 서울시 범죄 현황 분석 (0) 2021.10.21 chapter-01 서울시 구별 CCTV 현황 분석 (0) 2021.10.21