<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>개발지식창고 | AI&amp;middot;유튜브 실측 기록</title>
    <link>https://chon91.tistory.com/</link>
    <description>AI 커뮤니티와 유튜브 데이터를 직접 모아 계산해 본 실측 기록이에요. AI 도구 사용법, AI 영상 제작기, 업무 자동화&amp;middot;엑셀 도구를 만들어 써 보고 적어요. 숫자가 틀렸으면 댓글로 알려 주세요. 확인하고 고쳐 둘게요.</description>
    <language>ko</language>
    <pubDate>Tue, 27 Oct 2026 13:30:53 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>일손덜기</managingEditor>
    <image>
      <title>개발지식창고 | AI&amp;middot;유튜브 실측 기록</title>
      <url>https://tistory1.daumcdn.net/tistory/4691580/attach/4ab24c06a9c9418eaca2c97f615cb121</url>
      <link>https://chon91.tistory.com</link>
    </image>
    <item>
      <title>파이썬 크롤링 하는 법: 결과가 0개일 때 브라우저가 필요한지 가리는 기준</title>
      <link>https://chon91.tistory.com/6</link>
      <description>&lt;style&gt;h1,h2,h3,h1 *,.title-article{word-break:keep-all!important;overflow-wrap:normal!important;text-wrap:balance}@media (max-width:720px){table.rt,table.rt tbody,table.rt tr,table.rt td{display:block!important;width:auto!important}table.rt thead{display:none!important}table.rt tr{border:1px solid #e5e7eb;border-radius:10px;padding:10px 14px;margin:0 0 .75em;background:#fff}table.rt td{border:0!important;padding:.2em 0!important;background:none!important}table.rt td:first-child{font-weight:700;font-size:1.05em}table.rt td+td::before{content:attr(data-label);display:block;font-size:13px;color:#4b5563;font-weight:400}}@media (min-width:721px){figure.fig-chart img{max-width:min(100%,560px)!important}}&lt;/style&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cqARCa/dJMcaiemthe/8zB3KTzsGibGSVdNMK13Z1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cqARCa/dJMcaiemthe/8zB3KTzsGibGSVdNMK13Z1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cqARCa/dJMcaiemthe/8zB3KTzsGibGSVdNMK13Z1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcqARCa%2FdJMcaiemthe%2F8zB3KTzsGibGSVdNMK13Z1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1200&quot; height=&quot;630&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;div class=&quot;post-summary&quot; style=&quot;border:1px solid #c7d2fe;background:#f5f7ff;border-radius:10px;padding:14px 16px;margin:1.4em 0 1.8em&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:16px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글에서 얻는 것&lt;/p&gt;&lt;ul style=&quot;margin:0 0 .4em;padding-left:1.3em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;requests로 첫 크롤링 코드를 돌리고 결과를 확인할 수 있습니다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;결과가 0개일 때 브라우저가 필요한지 직접 가릴 수 있습니다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;수집 전에 robots.txt 허용 여부를 코드로 확인할 수 있습니다&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin:.7em 0 .3em!important;font-weight:700;font-size:16px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;바로 받기&lt;/p&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-size:15px;line-height:1.7;color:#374151;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;글에 나온 코드 5개와 점검 목록 7항목을 파일 하나로 묶었습니다.&lt;/p&gt;&lt;p style=&quot;margin:0!important;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;button type=&quot;button&quot; data-name=&quot;2026-10-21-evergreen-kwbcbc90.md&quot; data-bundle=&quot;# 파이썬 크롤링 하는 법: 결과가 0개일 때 브라우저가 필요한지 가리는 기준

## 코드 1

```python
import time, requests
from bs4 import BeautifulSoup
headers = {&amp;quot;user-agent&amp;quot;: &amp;quot;my-app/0.0.1&amp;quot;}
with requests.Session() as s:  # 연결을 다시 씀
    for n in range(1, 4):
        r = s.get(f&amp;quot;https://books.toscrape.com/catalogue/page-{n}.html&amp;quot;, headers=headers, timeout=10)
        r.raise_for_status()  # 400번대·500번대면 오류
        soup = BeautifulSoup(r.text, &amp;quot;html.parser&amp;quot;)
        print(len(soup.select(&amp;quot;article.product_pod h3 a&amp;quot;)))
        time.sleep(1)  # 요청 사이 1초 쉬기
```

## 코드 2

```python
r.raise_for_status()
print(&amp;quot;찾을문구&amp;quot; in r.text)  # True면 requests로 충분
```

## 코드 3

```python
r = requests.get(&amp;quot;https://quotes.toscrape.com/js/&amp;quot;, timeout=10)
soup = BeautifulSoup(r.text, &amp;quot;html.parser&amp;quot;)
print(len(soup.select(&amp;quot;div.quote&amp;quot;)))
```

## 코드 4

```python
from playwright.sync_api import sync_playwright
from bs4 import BeautifulSoup
with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto(&amp;quot;https://quotes.toscrape.com/js/&amp;quot;)
    page.wait_for_selector(&amp;quot;div.quote&amp;quot;)  # 명언이 그려질 때까지 기다림
    print(len(BeautifulSoup(page.content(), &amp;quot;html.parser&amp;quot;).select(&amp;quot;div.quote&amp;quot;)))
    browser.close()
```

## 코드 5

```python
from urllib.robotparser import RobotFileParser
rp = RobotFileParser(&amp;quot;https://books.toscrape.com/robots.txt&amp;quot;)
rp.read()
print(rp.can_fetch(&amp;quot;my-app/0.0.1&amp;quot;, &amp;quot;https://books.toscrape.com/&amp;quot;))
```

## 점검 목록

- [ ] `can_fetch()`로 robots.txt를 확인했다
- [ ] 이용약관에 자동 수집을 막는 조항이 있는지 읽었다
- [ ] 요청 사이에 간격을 두었다(저는 1초)
- [ ] 모든 요청에 timeout과 user-agent를 넣었다
- [ ] requests 결과에 원하는 문구가 있는지 먼저 확인했다
- [ ] 결과가 False나 0개일 때만 Playwright를 쓰고, 기다리는 줄을 넣었다
- [ ] 문서와 제도는 바뀔 수 있으니 최신 안내를 다시 확인한다
&quot; onclick=&quot;var t=this.getAttribute('data-bundle'),a=document.createElement('a');a.href='data:text/markdown;charset=utf-8,'+encodeURIComponent(t);a.download=this.getAttribute('data-name');document.body.appendChild(a);a.click();a.remove()&quot; style=&quot;font-size:15px;padding:9px 16px;border:0;border-radius:8px;background:#2563eb;color:#fff;cursor:pointer&quot;&gt;코드·점검 목록 받기 (.md)&lt;/button&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;파이썬으로 웹페이지를 받았는데 화면에 보이던 글이 0개로 나와 막힐 때가 있습니다. 결론은 간단합니다. 먼저 requests로 받아 보고, 원하는 내용이 없을 때만 Playwright로 브라우저를 띄우면 됩니다. 이 글을 따라 하면 첫 크롤링 코드를 돌려 볼 수 있습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;브라우저가 필요한 페이지인지도 직접 가릴 수 있습니다.&lt;/p&gt;
&lt;div style=&quot;background:#f3f4f6;border-radius:8px;padding:14px 18px;margin:1.6em 0&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:bold;font-size:16px;margin-left:0!important;margin-right:0!important&quot;&gt;목차&lt;/p&gt;&lt;ol style=&quot;margin:0;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec1&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;왜 화면에는 보이는데 결과는 0개일까?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec2&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;따라 하기: 첫 크롤링부터 브라우저까지&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec3&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;그래도 막히면 무엇을 볼까?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec4&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;requests와 브라우저, 실제로 무엇이 다를까?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec5&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;크롤링해도 되는 사이트인지 어떻게 확인하나?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec6&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;자주 묻는 질문&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec7&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;시작 전 점검 목록&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h2 id=&quot;sec1&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;왜 화면에는 보이는데 결과는 0개일까?&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;크롤링은 프로그램으로 웹페이지 내용을 모으는 일입니다. 비유하면 신문을 받아 와서 필요한 기사에 형광펜을 긋는 일입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;그런데 어떤 페이지는 신문이 반쯤 빈 채로 옵니다. 내용이 HTML(웹페이지의 뼈대가 되는 글)이 아니라 자바스크립트 안에 들어 있어서입니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;requests:&lt;/strong&gt; 웹페이지를 받아 옵니다. 신문을 배달하는 역할입니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;BeautifulSoup:&lt;/strong&gt; 받은 HTML에서 필요한 부분만 골라냅니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;Playwright:&lt;/strong&gt; 진짜 브라우저를 프로그램으로 움직입니다.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;sec2&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;따라 하기: 첫 크롤링부터 브라우저까지&lt;/h2&gt;
&lt;ol style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;도구를 설치합니다.&lt;/strong&gt; 명령 창에 아래 코드를 입력합니다. 이어서 아래 코드도 입력합니다. 오류 없이 끝나면 성공입니다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;pip&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;install&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;requests&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;beautifulsoup4&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;playwright
playwright&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;install&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;chromium&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;ol start=&quot;2&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;아래 코드를 돌립니다.&lt;/strong&gt; 연습용 서점 사이트에서 3쪽을 받아 쪽마다 책 제목 수를 셉니다.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;PYTHON&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;time&lt;/span&gt;&lt;span style=&quot;color: #666&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;requests&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;bs4&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;import&lt;/span&gt; BeautifulSoup

headers &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; {&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;user-agent&quot;&lt;/span&gt;: &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;my-app/0.0.1&quot;&lt;/span&gt;}
&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;with&lt;/span&gt; requests&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;Session() &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;as&lt;/span&gt; s:  &lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 연결을 다시 씀&lt;/span&gt;
  &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;for&lt;/span&gt; n &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #007020&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #40A070&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #40A070&quot;&gt;4&lt;/span&gt;):
    r &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; s&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;get(
      &lt;span style=&quot;color: #4070A0&quot;&gt;f&quot;https://books.toscrape.com/catalogue/page-&lt;/span&gt;&lt;span style=&quot;color: #70A0D0; font-style: italic&quot;&gt;{&lt;/span&gt;n&lt;span style=&quot;color: #70A0D0; font-style: italic&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;.html&quot;&lt;/span&gt;,
      headers&lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt;headers,
      timeout&lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A070&quot;&gt;10&lt;/span&gt;,
    )
    r&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;raise_for_status()  &lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 400번대·500번대면 오류&lt;/span&gt;
    soup &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; BeautifulSoup(
      r&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;text, &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;html.parser&quot;&lt;/span&gt;
    )
    &lt;span style=&quot;color: #007020&quot;&gt;print&lt;/span&gt;(
      &lt;span style=&quot;color: #007020&quot;&gt;len&lt;/span&gt;(
        soup&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;select(
          (
            &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;article.produc&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;t_pod h3 a&quot;&lt;/span&gt;
          )
        )
      )
    )
    time&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;sleep(&lt;span style=&quot;color: #40A070&quot;&gt;1&lt;/span&gt;)  &lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 요청 사이 1초 쉬기&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start=&quot;3&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;결과를 확인합니다.&lt;/strong&gt; 한 쪽에 20권이 있어서 20이 세 번 나오면 성공입니다. timeout은 응답을 기다릴 최대 시간입니다. 이 값이 없으면 프로그램이 끝없이 멈출 수 있습니다. user-agent는 내 프로그램 이름입니다. Session은 한 번 맺은 연결을 계속 쓰는 방식입니다.&lt;/li&gt;&lt;/ol&gt;
&lt;ol start=&quot;4&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;골라내는 법을 익힙니다.&lt;/strong&gt; &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;select()&lt;/code&gt;는 CSS 선택자(태그를 찾는 주소 같은 표현)로 찾습니다. &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;find_all()&lt;/code&gt;은 맞는 태그를 모두 돌려주고, &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;find()&lt;/code&gt;는 첫 하나만 돌려줍니다. 맞는 태그가 없으면 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;find()&lt;/code&gt;는 None을 돌려줍니다.&lt;/li&gt;&lt;/ol&gt;
&lt;ol start=&quot;5&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;원하는 문구가 받은 글에 있는지 검사합니다.&lt;/strong&gt; 반복문 안에서 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;r&lt;/code&gt;을 받은 줄 아래에 같은 들여쓰기로 넣습니다.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;PYTHON&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;r&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;raise_for_status()
&lt;span style=&quot;color: #007020&quot;&gt;print&lt;/span&gt;(
  &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;찾을문구&quot;&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;in&lt;/span&gt; r&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;text
)  &lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# True면 requests로 충분&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start=&quot;6&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;스크립트로 그리는 페이지와 비교합니다.&lt;/strong&gt; quotes.toscrape.com/js/는 명언을 자바스크립트로 그리는 연습용 페이지입니다. 앞 코드 아래에 이어 붙여 돌립니다.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;PYTHON&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;r &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; requests&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;get(
  &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;https://quotes.toscrape.com/js/&quot;&lt;/span&gt;,
  timeout&lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A070&quot;&gt;10&lt;/span&gt;,
)
soup &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; BeautifulSoup(r&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;text, &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;html.parser&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #007020&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #007020&quot;&gt;len&lt;/span&gt;(soup&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;select(&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;div.quote&quot;&lt;/span&gt;)))&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;제가 돌렸을 때 결과는 0개였습니다. 이렇게 0개가 나오거나 앞 단계 검사에서 False가 나오면 다음 단계로 갑니다.&lt;/p&gt;
&lt;ol start=&quot;7&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;이럴 때만 브라우저를 씁니다.&lt;/strong&gt; 화면을 다 그린 뒤의 HTML을 받아 BeautifulSoup으로 읽습니다.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;PYTHON&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;playwright.sync_api&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;import&lt;/span&gt; (
  sync_playwright,
)
&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;bs4&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;import&lt;/span&gt; BeautifulSoup

&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;with&lt;/span&gt; sync_playwright() &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;as&lt;/span&gt; p:
  browser &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; p&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;chromium&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;launch()
  page &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; browser&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;new_page()
  page&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;goto(
    (
      &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;https://quotes.toscrape.co&quot;&lt;/span&gt;
      &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;m/js/&quot;&lt;/span&gt;
    )
  )
  page&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;wait_for_selector(
    &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;div.quote&quot;&lt;/span&gt;
  )  &lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 명언이 그려질 때까지 기다림&lt;/span&gt;
  &lt;span style=&quot;color: #007020&quot;&gt;print&lt;/span&gt;(
    &lt;span style=&quot;color: #007020&quot;&gt;len&lt;/span&gt;(
      BeautifulSoup(
        page&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;content(),
        &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;html.parser&quot;&lt;/span&gt;,
      )&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;select(&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;div.quote&quot;&lt;/span&gt;)
    )
  )
  browser&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;close()&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;제가 잴 때는 명언 10개를 가져왔습니다. 기다리는 줄이 없으면 그리기 전에 읽어서 0개가 나올 수 있습니다.&lt;/p&gt;
&lt;h2 id=&quot;sec3&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;그래도 막히면 무엇을 볼까?&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;브라우저로도 0개일 때:&lt;/strong&gt; 기다리는 시간이 모자란 것일 수 있습니다. 아래 코드 안의 선택자가 실제 칸과 맞는지 봅니다.&lt;/p&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;wait_for_selector()&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;문구는 있는데 개수가 0일 때:&lt;/strong&gt; 선택자를 잘못 적었을 수 있습니다. 서점 사이트라면 아래 코드부터 넣어 봅니다. None이 나오면 태그 이름이 틀린 것입니다. 결과가 나오면 그 안의 h3, a 순서로 좁혀 갑니다.&lt;/p&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;soup.find(&amp;quot;article&amp;quot;)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;한글이 깨질 때:&lt;/strong&gt; 인코딩(글자 저장 방식)이 맞지 않는 경우입니다. &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;r.content&lt;/code&gt;에서 HTML에 적힌 인코딩을 찾아 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;r.encoding&lt;/code&gt;에 넣습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;**&lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;raise_for_status()&lt;/code&gt;에서 오류가 날 때:** 요청 간격을 늘립니다. robots.txt와 이용약관도 다시 봅니다.&lt;/p&gt;
&lt;h2 id=&quot;sec4&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;requests와 브라우저, 실제로 무엇이 다를까?&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;연습용 사이트 두 곳에서 방식마다 5~6번 요청해 직접 쟀습니다. 요청 사이에는 1초를 쉬었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;표 1. 스크립트로 그리는 페이지(가져온 개수 비교)&lt;/strong&gt;&lt;/p&gt;
&lt;table class=&quot;rt table-cards&quot; style=&quot;border-collapse:collapse;width:100%;margin:1.3em 0 1.6em;font-size:16px;line-height:1.6&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;방식&lt;/th&gt;&lt;th style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;가져온 개수&lt;/th&gt;&lt;th style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;시간(초)&lt;/th&gt;&lt;th style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;조건&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td data-label=&quot;방식&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Session&lt;/td&gt;&lt;td data-label=&quot;가져온 개수&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;0&lt;/td&gt;&lt;td data-label=&quot;시간(초)&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;0.229&lt;/td&gt;&lt;td data-label=&quot;조건&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;이후 중간값&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td data-label=&quot;방식&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Playwright&lt;/td&gt;&lt;td data-label=&quot;가져온 개수&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;10&lt;/td&gt;&lt;td data-label=&quot;시간(초)&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;1.032&lt;/td&gt;&lt;td data-label=&quot;조건&quot; style=&quot;padding:.5em .6em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;화면 없이 실행&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;shot_table0.png&quot; data-origin-width=&quot;1272&quot; data-origin-height=&quot;412&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/s7f2F/dJMcacFdii9/c0lHuDNZ7sRHrog6zCMpDK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/s7f2F/dJMcacFdii9/c0lHuDNZ7sRHrog6zCMpDK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/s7f2F/dJMcacFdii9/c0lHuDNZ7sRHrog6zCMpDK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fs7f2F%2FdJMcacFdii9%2Fc0lHuDNZ7sRHrog6zCMpDK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1272&quot; height=&quot;412&quot; data-filename=&quot;shot_table0.png&quot; data-origin-width=&quot;1272&quot; data-origin-height=&quot;412&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;font-size:.95em;color:#4b5563;margin:0 0 2.2em!important;word-break:keep-all&quot;&gt;글에 나온 표를 화면 그대로 캡처한 그림&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bO63LE/dJMcadKD4dN/u596lz1PYutbkv3OOk55a0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bO63LE/dJMcadKD4dN/u596lz1PYutbkv3OOk55a0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bO63LE/dJMcadKD4dN/u596lz1PYutbkv3OOk55a0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbO63LE%2FdJMcadKD4dN%2Fu596lz1PYutbkv3OOk55a0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;442&quot; height=&quot;456&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;font-size:.95em;color:#4b5563;margin:0 0 2.2em!important;word-break:keep-all&quot;&gt;정적 페이지 1회 수집 시간 중앙값 (직접 측정)&lt;br&gt;&lt;span style=&quot;font-size:.88em;overflow-wrap:anywhere&quot;&gt;출처: 직접 측정 (2026-10-21, PC 한 대)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;중요한 것은 속도가 아니라 내용을 가져오느냐입니다.&lt;/strong&gt; 명언이 HTML이 아니라 스크립트 안에 있어서 requests로는 0개가 나왔습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;표 2. 일반 페이지(Session, 매번 20개)&lt;/strong&gt;&lt;/p&gt;
&lt;table style=&quot;border-collapse:collapse;width:100%;table-layout:fixed;margin:1.3em 0;font-size:16px;line-height:1.6&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width:36%&quot;&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;요청&lt;/th&gt;&lt;th style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;시간(초)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;첫 요청&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;1.404&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;이후 중간값&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;0.694&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이후 요청이 더 짧았던 것은 연결을 다시 쓴 영향일 수 있습니다. 다만 잰 횟수가 적어서 단정하기는 어렵습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&amp;gt; 일반 페이지에서 Playwright는 0.565초였습니다. 하지만 캐시(미리 저장해 둔 자료)가 있는 조건이라 표 2와 견주면 안 됩니다.&lt;/p&gt;
&lt;h2 id=&quot;sec5&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;크롤링해도 되는 사이트인지 어떻게 확인하나?&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;robots.txt는 사이트가 수집을 허락하는 곳과 막는 곳을 적어 둔 안내문입니다. 파이썬에 들어 있는 도구로 바로 확인할 수 있습니다.&lt;/p&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;PYTHON&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0E84B5; font-weight: bold&quot;&gt;urllib.robotparser&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;import&lt;/span&gt; (
  RobotFileParser,
)

rp &lt;span style=&quot;color: #666&quot;&gt;=&lt;/span&gt; RobotFileParser(
  (
    &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;https://books.toscrape.com/rob&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;ots.txt&quot;&lt;/span&gt;
  )
)
rp&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;read()
&lt;span style=&quot;color: #007020&quot;&gt;print&lt;/span&gt;(
  rp&lt;span style=&quot;color: #666&quot;&gt;.&lt;/span&gt;can_fetch(
    &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;my-app/0.0.1&quot;&lt;/span&gt;,
    &lt;span style=&quot;color: #4070A0&quot;&gt;&quot;https://books.toscrape.com/&quot;&lt;/span&gt;,
  )
)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;True면 수집을 허락한 곳입니다. Google 검색 센터에 따르면 robots.txt는 지나친 요청을 막는 장치입니다. 그리고 지킬지는 각자에게 맡겨져 있습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;법무법인 세종 뉴스레터에 따르면 대법원은 2022년 5월 12일 2021도1533 판결에서 무죄를 확정했습니다. 경쟁사 서버를 크롤링한 피고인들에 대한 판결입니다. 보호조치와 이용약관 같은 사정을 함께 보고 접근 권한을 판단해야 한다고 했습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;다만 이것은 그 사건의 사정에 따른 결론입니다. 크롤링이 늘 허용된다는 뜻은 아닙니다. 이 글은 법률 자문이 아니니 구체적인 판단은 전문가에게 확인하시기 바랍니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;참고로 요청 간격 안내는 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;rp.crawl_delay()&lt;/code&gt;로 볼 수 있습니다. 문서를 읽는 방식으로 저는 설치가 필요 없는 html.parser를 씁니다. BeautifulSoup 문서는 속도 때문에 lxml을 권합니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글의 명령어·요금제·화면은 2026-10-22 기준으로 공식 문서와 대조했습니다. 이후 바뀔 수 있으니 최신 안내를 함께 확인하세요.&lt;/p&gt;
&lt;h2 id=&quot;sec6&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;자주 묻는 질문&lt;/h2&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;파이썬 크롤링은 어떤 순서로 하면 되나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;먼저 requests로 페이지를 받아 보고, 원하는 내용이 없을 때만 Playwright로 브라우저를 띄우면 됩니다. 받은 HTML에서 필요한 부분은 BeautifulSoup으로 골라냅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;크롤링 결과가 0개로 나오는 이유는 무엇인가요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;내용이 HTML이 아니라 자바스크립트 안에 들어 있는 페이지이기 때문입니다. 이런 페이지는 requests로 받으면 화면에 보이던 글이 비어 있을 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;크롤링에 필요한 도구는 어떻게 설치하나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;명령 창에 pip install requests beautifulsoup4 playwright를 입력하고, 이어서 playwright install chromium도 입력합니다. 오류 없이 끝나면 성공입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;브라우저(Playwright)가 필요한 페이지인지 어떻게 가리나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;requests 결과에서 원하는 문구 검사가 False이거나 개수가 0개로 나오면 브라우저가 필요한 페이지입니다. 이때만 Playwright를 씁니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;크롤링한 글자가 깨질 때는 어떻게 하나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;인코딩이 맞지 않는 경우이므로, HTML에 적힌 인코딩을 찾아 r.encoding에 넣습니다. 찾을 때는 r.content를 봅니다.&lt;/p&gt;
&lt;h2 id=&quot;sec7&quot; style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;시작 전 점검 목록&lt;/h2&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;can_fetch()&lt;/code&gt;로 robots.txt를 확인했다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;이용약관에 자동 수집을 막는 조항이 있는지 읽었다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;요청 사이에 간격을 두었다(저는 1초)&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;모든 요청에 timeout과 user-agent를 넣었다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;requests 결과에 원하는 문구가 있는지 먼저 확인했다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;결과가 False나 0개일 때만 Playwright를 쓰고, 기다리는 줄을 넣었다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;문서와 제도는 바뀔 수 있으니 최신 안내를 다시 확인한다&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;engage&quot; style=&quot;margin:2em 0 0;border-top:2px solid #e5e7eb;padding-top:.6em&quot;&gt;&lt;h3 style=&quot;font-size:1.05em;margin:1.4em 0 .5em;line-height:1.4&quot;&gt;연재 이어 보기&lt;/h3&gt;&lt;p style=&quot;margin:0 0 .4em!important;margin-left:0!important;margin-right:0!important&quot;&gt;다음 편 예고: 엑셀 열 기준으로 파일 나누기, 엑셀모아 사용법과 실측 시간&lt;/p&gt;&lt;h3 style=&quot;font-size:1.05em;margin:1.4em 0 .5em;line-height:1.4&quot;&gt;함께 읽으면 좋은 글&lt;/h3&gt;&lt;ul style=&quot;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .5em;font-size:16px&quot;&gt;&lt;a href=&quot;https://chon91.tistory.com/4&quot;&gt;claude -p 자동 호출 토큰 줄이는 법, 4만에서 900으로&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .5em;font-size:16px&quot;&gt;&lt;a href=&quot;https://chon91.tistory.com/5&quot;&gt;클로드 코드 설치 방법: 준비물부터 첫 실행 확인까지 4단계&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin:1.2em 0 .4em!important;padding:.8em 1em;background:#f6f7f9;border-radius:8px;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;파이썬, 여러분은 어떻게 하고 계신가요? 막힌 곳이나 궁금한 점을 댓글로 남겨 주시면 다음 글에서 직접 해 보고 답하겠습니다.&lt;/p&gt;&lt;p style=&quot;margin:.4em 0!important;font-size:.95em;color:#4b5563;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;새 글을 놓치지 않으려면 블로그 오른쪽 위 &amp;#x27;구독하기&amp;#x27;를 누르거나 RSS(https://chon91.tistory.com/rss)를 등록해 주세요.&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;disclosure&quot; style=&quot;font-size:.9em;color:#4b5563;word-break:keep-all;border-left:3px solid #ccc;padding-left:.8em;margin:1.6em 0 1em&quot;&gt;&lt;p style=&quot;margin:0 0 .3em!important;line-height:1.6;margin-left:0!important;margin-right:0!important&quot;&gt;이 글은 AI의 도움을 받아 작성했으며, 수치는 직접 수집한 데이터에서 계산한 값입니다. 틀린 곳을 알려 주시면 확인해 고치겠습니다.&lt;/p&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-size:1.3em;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb&quot;&gt;출처&lt;/h2&gt;&lt;ol style=&quot;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://requests.readthedocs.io/en/latest/user/quickstart/&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Requests 공식 문서 - Quickstart&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://www.crummy.com/software/BeautifulSoup/bs4/doc/&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Beautiful Soup Documentation&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://docs.python.org/3/library/urllib.robotparser.html&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Python 공식 문서 - urllib.robotparser&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://developers.google.com/search/docs/crawling-indexing/robots/intro&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Google 검색 센터 - robots.txt 소개&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://docs.scrapy.org/en/latest/topics/settings.html&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Scrapy 공식 문서 - Settings&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://www.shinkim.com/kor/media/newsletter/1843&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;법무법인 세종(신앤김) 뉴스레터 - 대법원 2021도1533 판결&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;script type=&quot;application/ld+json&quot;&gt;{&quot;@context&quot;: &quot;https://schema.org&quot;, &quot;@graph&quot;: [{&quot;@type&quot;: &quot;FAQPage&quot;, &quot;mainEntity&quot;: [{&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;파이썬 크롤링은 어떤 순서로 하면 되나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;먼저 requests로 페이지를 받아 보고, 원하는 내용이 없을 때만 Playwright로 브라우저를 띄우면 됩니다. 받은 HTML에서 필요한 부분은 BeautifulSoup으로 골라냅니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;크롤링 결과가 0개로 나오는 이유는 무엇인가요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;내용이 HTML이 아니라 자바스크립트 안에 들어 있는 페이지이기 때문입니다. 이런 페이지는 requests로 받으면 화면에 보이던 글이 비어 있을 수 있습니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;크롤링에 필요한 도구는 어떻게 설치하나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;명령 창에 pip install requests beautifulsoup4 playwright를 입력하고, 이어서 playwright install chromium도 입력합니다. 오류 없이 끝나면 성공입니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;브라우저(Playwright)가 필요한 페이지인지 어떻게 가리나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;requests 결과에서 원하는 문구 검사가 False이거나 개수가 0개로 나오면 브라우저가 필요한 페이지입니다. 이때만 Playwright를 씁니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;크롤링한 글자가 깨질 때는 어떻게 하나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;인코딩이 맞지 않는 경우이므로, HTML에 적힌 인코딩을 찾아 r.encoding에 넣습니다. 찾을 때는 r.content를 봅니다.&quot;}}]}]}&lt;/script&gt;</description>
      <category>업무 자동화&amp;middot;엑셀/파이썬 크롤링</category>
      <category>beautifulsoup</category>
      <category>playwright</category>
      <category>requests</category>
      <category>robots.txt</category>
      <category>파이썬 크롤링</category>
      <author>일손덜기</author>
      <guid isPermaLink="true">https://chon91.tistory.com/6</guid>
      <comments>https://chon91.tistory.com/6#entry6comment</comments>
      <pubDate>Wed, 21 Oct 2026 20:13:48 +0900</pubDate>
    </item>
    <item>
      <title>클로드 코드 설치 방법: 준비물부터 첫 실행 확인까지 4단계</title>
      <link>https://chon91.tistory.com/5</link>
      <description>&lt;style&gt;h1,h2,h3,h1 *,.title-article{word-break:keep-all!important;overflow-wrap:normal!important;text-wrap:balance}&lt;/style&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bWFyyq/dJMcagtTZnE/jA2p478La5otKv96Zo0jW0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bWFyyq/dJMcagtTZnE/jA2p478La5otKv96Zo0jW0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bWFyyq/dJMcagtTZnE/jA2p478La5otKv96Zo0jW0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbWFyyq%2FdJMcagtTZnE%2FjA2p478La5otKv96Zo0jW0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1200&quot; height=&quot;630&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;div class=&quot;post-summary&quot; style=&quot;border:1px solid #c7d2fe;background:#f5f7ff;border-radius:10px;padding:14px 16px;margin:1.4em 0 1.8em&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:16px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글에서 얻는 것&lt;/p&gt;&lt;ul style=&quot;margin:0 0 .4em;padding-left:1.3em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;설치 명령 한 줄로 깔고 첫 로그인까지 마친다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;API 키 설정과 CLAUDE.md 길이를 점검해 한도를 아낀다&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin:.7em 0 .3em!important;font-weight:700;font-size:16px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;바로 받기&lt;/p&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-size:15px;line-height:1.7;color:#374151;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;글에 나온 코드 1개와 점검 목록 5항목을 파일 하나로 묶었습니다.&lt;/p&gt;&lt;p style=&quot;margin:0!important;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;button type=&quot;button&quot; data-name=&quot;2026-10-21-evergreen-kw9572aa.md&quot; data-bundle=&quot;# 클로드 코드 설치 방법: 준비물부터 첫 실행 확인까지 4단계

## 코드 1

```bash
# 맥, 리눅스, WSL
curl -fsSL https://claude.ai/install.sh | bash

# 윈도우 PowerShell
irm https://claude.ai/install.ps1 | iex
```

## 점검 목록

- [ ] 유료 계정(Pro, Max, Team, Enterprise, Console 중 하나)이 있는지 확인했습니다.
- [ ] 공식 설치 명령으로 깔았는지 확인했습니다. Homebrew나 WinGet이라면 직접 업데이트합니다.
- [ ] 관계없는 작업으로 넘어갈 때 /clear를 입력하기로 했습니다.
- [ ] 복잡한 작업 전에는 Shift+Tab으로 플랜 모드로 바꾸기로 했습니다.
- [ ] 요금제와 화면은 바뀔 수 있습니다. 최신 안내는 [공식 개요 문서](https://code.claude.com/docs/en/overview), [비용 관리 문서](https://code.claude.com/docs/en/costs), [요금제 도움말](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan)에서 확인합니다.
&quot; onclick=&quot;var t=this.getAttribute('data-bundle'),a=document.createElement('a');a.href='data:text/markdown;charset=utf-8,'+encodeURIComponent(t);a.download=this.getAttribute('data-name');document.body.appendChild(a);a.click();a.remove()&quot; style=&quot;font-size:15px;padding:9px 16px;border:0;border-radius:8px;background:#2563eb;color:#fff;cursor:pointer&quot;&gt;코드·점검 목록 받기 (.md)&lt;/button&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;클로드 코드 사용법의 첫걸음은 설치입니다. 유료 계정을 준비하고 운영체제에 맞는 설치 명령 한 줄을 실행한 뒤, 작업할 폴더에서 claude를 입력하면 됩니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글을 따라 하면 계정과 컴퓨터 조건 확인부터 첫 로그인까지 마칠 수 있습니다.&lt;/p&gt;
&lt;div style=&quot;background:#f3f4f6;border-radius:8px;padding:14px 18px;margin:1.6em 0&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:bold;font-size:16px;margin-left:0!important;margin-right:0!important&quot;&gt;목차&lt;/p&gt;&lt;ol style=&quot;margin:0;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec1&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;설치 전에 확인할 것: 계정과 컴퓨터&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec2&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;따라 하기: 설치하고 처음 실행하기&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec3&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;클로드 코드 설치나 로그인이 안 될 땐?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec4&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;자주 묻는 질문&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec5&quot; style=&quot;color:inherit;text-decoration:none&quot;&gt;바로 해 볼 점검 목록&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h2 id=&quot;sec1&quot; style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;설치 전에 확인할 것: 계정과 컴퓨터&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;무료 요금제로는 쓸 수 없습니다. 공식 설정 문서에 따르면 Pro, Max, Team, Enterprise, Console 중 하나가 있어야 합니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;Amazon Bedrock 같은 외부 업체를 거쳐 쓰는 방법도 있습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;컴퓨터 조건도 공식 설정 문서에 나와 있습니다.&lt;/p&gt;
&lt;table style=&quot;border-collapse:collapse;width:100%;table-layout:fixed;margin:1.3em 0;font-size:15px;line-height:1.6&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width:36%&quot;&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;항목&lt;/th&gt;&lt;th style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word;background:#f3f4f6&quot;&gt;조건&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;맥&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;macOS 13.0 이상&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;윈도우&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;10 1809 이상, Server 2019 이상&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;리눅스&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Ubuntu 20.04, Debian 10, Alpine 3.19 이상&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;하드웨어&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;메모리(RAM) 4GB 이상, x64 또는 ARM64&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;npm으로 설치할 때&lt;/td&gt;&lt;td style=&quot;padding:.5em .55em;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Node.js 22 이상&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;sec2&quot; style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;따라 하기: 설치하고 처음 실행하기&lt;/h2&gt;
&lt;ol style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;터미널을 엽니다. 터미널은 글자로 명령을 입력하는 창입니다.&lt;ul style=&quot;margin:.4em 0 0;padding-left:1.2em&quot;&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;맥: Spotlight에서 '터미널'을 검색해 엽니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;윈도우: PowerShell을 엽니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;운영체제에 맞는 한 줄을 붙여 넣고 실행합니다. 공식 개요 문서에 나온 명령입니다. WSL은 윈도우 안에서 리눅스를 쓰는 기능입니다.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;BASH&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:13px;line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;&lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 맥, 리눅스, WSL&lt;/span&gt;
curl&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;-fsSL&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;https://claude.ai/install.sh&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;|&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;bash

&lt;span style=&quot;color: #60A0B0; font-style: italic&quot;&gt;# 윈도우 PowerShell&lt;/span&gt;
irm&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;https://claude.ai/install.ps1&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;|&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;iex&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start=&quot;3&quot; style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;설치가 끝나면 작업할 폴더로 옮겨 갑니다. 그 폴더에서 claude를 입력합니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;처음 실행하면 로그인(인증)하라는 안내가 화면에 나옵니다. 안내대로 유료 계정으로 로그인하면 질문을 입력할 수 있습니다.&lt;/li&gt;&lt;/ol&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 방식으로 깔면 알아서 자동 업데이트됩니다. Homebrew나 WinGet(프로그램 설치 도우미)으로 깔면 기본적으로 자동 업데이트가 되지 않습니다.&lt;/p&gt;
&lt;h2 id=&quot;sec3&quot; style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드 설치나 로그인이 안 될 땐?&lt;/h2&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;아래 네 가지는 공식 문서에 나온 내용입니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;로그인이 되지 않으면 요금제부터 확인합니다. 무료 요금제로는 쓸 수 없습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;윈도우에서는 Git for Windows 설치를 권합니다. 없으면 명령이 PowerShell로 실행됩니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;npm으로 설치한다면 sudo(관리자 권한)를 붙이지 않습니다. 권한 문제와 보안 위험이 있다고 경고합니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;터미널이 낯설면 VS Code 확장, JetBrains 플러그인, 데스크톱 앱, 웹에서도 쓸 수 있습니다.&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;다음 두 가지는 공식 문서 인용이 아니라 일반적인 확인법입니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;claude를 찾을 수 없다고 나오면 터미널을 닫았다가 다시 열어 봅니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;claude --version&lt;/code&gt;을 입력해 버전 번호가 나오면 설치는 된 것입니다.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;sec4&quot; style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;자주 묻는 질문&lt;/h2&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드는 무료로 쓸 수 있나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;무료 요금제로는 쓸 수 없습니다. Pro, Max, Team, Enterprise, Console 중 하나가 있어야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드 설치 방법은 무엇인가요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;터미널에 운영체제에 맞는 한 줄을 붙여 넣어 실행합니다. 맥, 리눅스, WSL은 curl 명령을, 윈도우 PowerShell은 irm 명령을 씁니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드 설치 방법 윈도우에서는 어떻게 하나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;윈도우에서는 PowerShell을 열고 irm https://claude.ai/install.ps1 | iex 명령을 실행합니다. Git for Windows를 함께 설치하길 권합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드는 설치 후 어떻게 실행하나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;설치가 끝나면 작업할 폴더로 옮겨 가서 claude를 입력합니다. 처음 실행하면 나오는 안내대로 유료 계정으로 로그인하면 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;클로드 코드 업데이트는 어떻게 하나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;공식 명령으로 설치하면 자동으로 업데이트됩니다. Homebrew나 WinGet으로 설치했다면 기본적으로 자동 업데이트가 되지 않아 직접 업데이트해야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size:1.15em;margin:1.8em 0 .6em;line-height:1.4;word-break:keep-all;text-wrap:balance&quot;&gt;터미널이 낯설면 클로드 코드를 다른 방법으로 쓸 수 있나요?&lt;/h3&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;가능합니다. VS Code 확장, JetBrains 플러그인, 데스크톱 앱, 웹에서도 쓸 수 있습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0.9em 0!important;font-size:16px;line-height:1.7;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글의 명령어·요금제·화면은 2026-10-22 기준으로 공식 문서와 대조했습니다. 이후 바뀔 수 있으니 최신 안내를 함께 확인하세요.&lt;/p&gt;
&lt;h2 id=&quot;sec5&quot; style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;바로 해 볼 점검 목록&lt;/h2&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;유료 계정(Pro, Max, Team, Enterprise, Console 중 하나)이 있는지 확인했습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;공식 설치 명령으로 깔았는지 확인했습니다. Homebrew나 WinGet이라면 직접 업데이트합니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;관계없는 작업으로 넘어갈 때 /clear를 입력하기로 했습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;복잡한 작업 전에는 Shift+Tab으로 플랜 모드로 바꾸기로 했습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;요금제와 화면은 바뀔 수 있습니다. 최신 안내는 &lt;a href=&quot;https://code.claude.com/docs/en/overview&quot; rel=&quot;noopener nofollow&quot;&gt;공식 개요 문서&lt;/a&gt;, &lt;a href=&quot;https://code.claude.com/docs/en/costs&quot; rel=&quot;noopener nofollow&quot;&gt;비용 관리 문서&lt;/a&gt;, &lt;a href=&quot;https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan&quot; rel=&quot;noopener nofollow&quot;&gt;요금제 도움말&lt;/a&gt;에서 확인합니다.&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;engage&quot; style=&quot;margin:2em 0 0;border-top:2px solid #e5e7eb;padding-top:.6em&quot;&gt;&lt;h3 style=&quot;font-size:1.05em;margin:1.4em 0 .5em;line-height:1.4&quot;&gt;연재 이어 보기&lt;/h3&gt;&lt;p style=&quot;margin:0 0 .4em!important;margin-left:0!important;margin-right:0!important&quot;&gt;다음 편 예고: VRAM 8GB·12GB에 맞는 Ollama 로컬 LLM 모델 고르는 법&lt;/p&gt;&lt;h3 style=&quot;font-size:1.05em;margin:1.4em 0 .5em;line-height:1.4&quot;&gt;함께 읽으면 좋은 글&lt;/h3&gt;&lt;ul style=&quot;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .5em;font-size:16px&quot;&gt;&lt;a href=&quot;https://chon91.tistory.com/4&quot;&gt;claude -p 자동 호출 토큰 줄이는 법, 4만에서 900으로&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin:1.2em 0 .4em!important;padding:.8em 1em;background:#f6f7f9;border-radius:8px;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;클로드 코드, 여러분은 어떻게 하고 계신가요? 막힌 곳이나 궁금한 점을 댓글로 남겨 주시면 다음 글에서 직접 해 보고 답하겠습니다.&lt;/p&gt;&lt;p style=&quot;margin:.4em 0!important;font-size:.95em;color:#4b5563;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;새 글을 놓치지 않으려면 블로그 오른쪽 위 &amp;#x27;구독하기&amp;#x27;를 누르거나 RSS(https://chon91.tistory.com/rss)를 등록해 주세요.&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;disclosure&quot; style=&quot;font-size:.9em;color:#4b5563;word-break:keep-all;border-left:3px solid #ccc;padding-left:.8em;margin:1.6em 0 1em&quot;&gt;&lt;p style=&quot;margin:0 0 .3em!important;line-height:1.6;margin-left:0!important;margin-right:0!important&quot;&gt;이 글은 AI의 도움을 받아 작성했으며, 수치는 직접 수집한 데이터에서 계산한 값입니다. 틀린 곳을 알려 주시면 확인해 고치겠습니다.&lt;/p&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-size:1.3rem;margin:1.6em 0 0.6em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb&quot;&gt;출처&lt;/h2&gt;&lt;ol style=&quot;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Claude Code overview (Claude Code Docs)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://code.claude.com/docs/en/setup&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Advanced setup (Claude Code Docs)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://code.claude.com/docs/en/costs&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Manage costs effectively (Claude Code Docs)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://code.claude.com/docs/en/memory&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;How Claude remembers your project (Claude Code Docs)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://www.anthropic.com/news/claude-4&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Introducing Claude 4 (Anthropic News)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://www.anthropic.com/news/claude-3-7-sonnet&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Claude 3.7 Sonnet and Claude Code (Anthropic News)&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;a href=&quot;https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan&quot; rel=&quot;noopener nofollow&quot; style=&quot;word-break:keep-all;overflow-wrap:break-word&quot;&gt;Use Claude Code with your Pro or Max plan (Claude Help Center)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;script type=&quot;application/ld+json&quot;&gt;{&quot;@context&quot;: &quot;https://schema.org&quot;, &quot;@graph&quot;: [{&quot;@type&quot;: &quot;FAQPage&quot;, &quot;mainEntity&quot;: [{&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;클로드 코드는 무료로 쓸 수 있나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;무료 요금제로는 쓸 수 없습니다. Pro, Max, Team, Enterprise, Console 중 하나가 있어야 합니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;클로드 코드 설치 방법은 무엇인가요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;터미널에 운영체제에 맞는 한 줄을 붙여 넣어 실행합니다. 맥, 리눅스, WSL은 curl 명령을, 윈도우 PowerShell은 irm 명령을 씁니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;클로드 코드 설치 방법 윈도우에서는 어떻게 하나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;윈도우에서는 PowerShell을 열고 irm https://claude.ai/install.ps1 | iex 명령을 실행합니다. Git for Windows를 함께 설치하길 권합니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;클로드 코드는 설치 후 어떻게 실행하나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;설치가 끝나면 작업할 폴더로 옮겨 가서 claude를 입력합니다. 처음 실행하면 나오는 안내대로 유료 계정으로 로그인하면 됩니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;클로드 코드 업데이트는 어떻게 하나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;공식 명령으로 설치하면 자동으로 업데이트됩니다. Homebrew나 WinGet으로 설치했다면 기본적으로 자동 업데이트가 되지 않아 직접 업데이트해야 합니다.&quot;}}, {&quot;@type&quot;: &quot;Question&quot;, &quot;name&quot;: &quot;터미널이 낯설면 클로드 코드를 다른 방법으로 쓸 수 있나요?&quot;, &quot;acceptedAnswer&quot;: {&quot;@type&quot;: &quot;Answer&quot;, &quot;text&quot;: &quot;가능합니다. VS Code 확장, JetBrains 플러그인, 데스크톱 앱, 웹에서도 쓸 수 있습니다.&quot;}}]}]}&lt;/script&gt;</description>
      <category>AI 도구 사용법/클로드 코드</category>
      <category>ai 코딩 도구</category>
      <category>claude code</category>
      <category>Claude.md</category>
      <category>클로드 코드</category>
      <category>토큰 비용</category>
      <author>일손덜기</author>
      <guid isPermaLink="true">https://chon91.tistory.com/5</guid>
      <comments>https://chon91.tistory.com/5#entry5comment</comments>
      <pubDate>Wed, 21 Oct 2026 19:39:47 +0900</pubDate>
    </item>
    <item>
      <title>claude -p 자동 호출 토큰 줄이는 법, 4만에서 900으로</title>
      <link>https://chon91.tistory.com/4</link>
      <description>&lt;style&gt;h1,h2,h3,h1 *,.title-article{word-break:keep-all!important;overflow-wrap:normal!important;text-wrap:balance}&lt;/style&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/kPRRs/dJMcaikZYDa/bTbs85kNe3xZkEnkSHUBuK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/kPRRs/dJMcaikZYDa/bTbs85kNe3xZkEnkSHUBuK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/kPRRs/dJMcaikZYDa/bTbs85kNe3xZkEnkSHUBuK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FkPRRs%2FdJMcaikZYDa%2FbTbs85kNe3xZkEnkSHUBuK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1200&quot; height=&quot;630&quot; data-filename=&quot;thumb.png&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;630&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;div class=&quot;post-summary&quot; style=&quot;border:1px solid #c7d2fe;background:#f5f7ff;border-radius:10px;padding:14px 16px;margin:1.4em 0 1.8em&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:17px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글에서 얻는 것&lt;/p&gt;&lt;ul style=&quot;margin:0 0 .4em;padding-left:1.3em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;usage 세 값을 더해 내 호출 크기를 잴 수 있다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;플래그와 짧은 지시문으로 4만 토큰을 900토큰대로 줄인다&lt;/li&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word&quot;&gt;오류가 나면 claude --help로 플래그를 확인한다&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin:.7em 0 .3em!important;font-weight:700;font-size:17px;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;바로 받기&lt;/p&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-size:15px;line-height:1.7;color:#374151;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;글에 나온 코드 1개와 점검 목록 7항목을 파일 하나로 묶었습니다.&lt;/p&gt;&lt;p style=&quot;margin:0!important;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;button type=&quot;button&quot; data-name=&quot;2026-10-21-series-token_cut.md&quot; data-bundle=&quot;# claude -p 자동 호출 토큰 줄이는 법, 4만에서 900으로

## 코드 1

```bash
claude -p &amp;quot;준비 완료를 한 번 출력해&amp;quot; --model haiku \
  --strict-mcp-config --mcp-config &amp;#x27;{&amp;quot;mcpServers&amp;quot;:{}}&amp;#x27; \
  --tools &amp;quot;&amp;quot; --safe-mode --setting-sources &amp;quot;&amp;quot; \
  --settings &amp;#x27;{&amp;quot;disableAllHooks&amp;quot;:true}&amp;#x27; \
  --system-prompt &amp;quot;한국어로, 요청받은 형식 그대로만 답한다.&amp;quot;
```

## 점검 목록

- [ ] 지금 쓰는 호출을 `--output-format stream-json --verbose`로 실행해 `usage` 항목을 찾았다.
- [ ] 입력·캐시 생성·캐시 읽기 세 값을 더해 문맥 합계를 냈다.
- [ ] `claude --help`로 쓰려는 플래그 이름이 내 버전에 있는지 확인했다.
- [ ] 도구가 필요 없는 호출에 축소 플래그를 붙였다.
- [ ] 답 형식이 정해진 작업은 지시문을 한 문장으로 바꾸고 전후 합계를 비교했다.
- [ ] 플래그별 효과가 궁금하면 하나씩 따로 켜서 쟀다.
- [ ] 조건마다 여러 번 재고, 모델과 버전을 함께 적어 두었다.
&quot; onclick=&quot;var t=this.getAttribute('data-bundle'),a=document.createElement('a');a.href='data:text/markdown;charset=utf-8,'+encodeURIComponent(t);a.download=this.getAttribute('data-name');document.body.appendChild(a);a.click();a.remove()&quot; style=&quot;font-size:15px;padding:9px 16px;border:0;border-radius:8px;background:#2563eb;color:#fff;cursor:pointer&quot;&gt;코드·점검 목록 받기 (.md)&lt;/button&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;claude -p로 짧은 요청을 자동으로 반복해 보내 보면, 답은 몇 글자인데 사용량은 생각보다 많이 쌓입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이럴 때는 필요 없는 기능을 끄는 플래그와 한 문장짜리 지시문을 붙이면 됩니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;제가 haiku 모델로 조건마다 한 번씩 재 보니, 호출 한 번에 실리는 양이 39,967토큰에서 900토큰으로 97.7% 줄었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 글을 읽으면 다음을 할 수 있습니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;내 호출이 실제로 몇 토큰을 싣는지 직접 잽니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;플래그와 짧은 지시문으로 39,967토큰을 900토큰 수준까지 줄이는 방법을 따라 합니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;줄이기 전후를 같은 기준으로 비교합니다.&lt;/li&gt;&lt;/ul&gt;
&lt;div style=&quot;background:#f3f4f6;border-radius:8px;padding:14px 18px;margin:1.6em 0&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:bold;font-size:17px;margin-left:0!important;margin-right:0!important&quot;&gt;목차&lt;/p&gt;&lt;ol style=&quot;margin:0;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec1&quot;&gt;짧은 요청인데 왜 토큰이 4만 개나 붙나요?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec2&quot;&gt;따라 하기: 내 호출을 가볍게 만들기&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec3&quot;&gt;줄이면 실제로 얼마나 달라지나?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec4&quot;&gt;이 숫자를 볼 때 조심할 점은?&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec5&quot;&gt;자주 묻는 질문&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .3em;font-size:.95em;word-break:keep-all&quot;&gt;&lt;a href=&quot;#sec6&quot;&gt;바로 해 볼 점검 목록&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;h2 id=&quot;sec1&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;짧은 요청인데 왜 토큰이 4만 개나 붙나요?&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;토큰은 AI가 글을 읽을 때 세는 단위입니다. claude -p는 명령창에서 한 번 묻고 답을 받는 방식입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;'준비 완료'를 한 번 출력하라는 요청을 옵션 없이 보내 봤습니다. 답은 7토큰이었는데, 문맥은 39,967토큰이었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;문맥은 내 요청과 함께 AI에게 한꺼번에 보내는 내용 전부입니다. 여기에 도구 31개와 스킬 35개가 함께 실려 있었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;도구는 AI가 파일을 읽거나 명령을 실행할 때 쓰는 기능입니다. 스킬은 특정 작업을 할 때 꺼내 쓰도록 미리 넣어 둔 작업 안내서 묶음입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;비유하자면 한 줄짜리 쪽지를 보낼 때마다 두꺼운 설명서를 같이 넣는 셈입니다. 수백 번 부르면 그 설명서도 수백 번 쌓입니다.&lt;/p&gt;
&lt;h2 id=&quot;sec2&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;따라 하기: 내 호출을 가볍게 만들기&lt;/h2&gt;
&lt;ol style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;지금 크기를 잽니다.&lt;/strong&gt; 평소 명령 뒤에 아래 코드를 붙여 실행합니다. 출력 기록에서 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;usage&lt;/code&gt; 항목을 찾습니다. 그 안에 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;input_tokens&lt;/code&gt;, 아래 코드, &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;cache_read_input_tokens&lt;/code&gt; 세 값이 보이면 성공입니다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;--output-format&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;stream-json&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--verbose
cache_creation_input_tokens&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;문맥 합계를 계산합니다.&lt;/strong&gt; 세 값을 더합니다. 제 기본 실행에서는 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;usage&lt;/code&gt; 부분이 아래 코드처럼 나왔습니다(필요한 부분만 줄여 옮김). 2 + 10,773 + 29,192 = 39,967토큰입니다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;&amp;quot;input_tokens&amp;quot;:2, &amp;quot;cache_creation_input_tokens&amp;quot;:10773, &amp;quot;cache_read_input_tokens&amp;quot;:29192&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;외부 도구 연결을 비웁니다.&lt;/strong&gt; &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--strict-mcp-config&lt;/code&gt;와 아래 코드를 붙입니다. MCP(외부 도구를 연결하는 장치) 서버가 하나도 없는 설정만 쓰게 됩니다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;--mcp-config&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;'{&quot;mcpServers&quot;:{}}'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;도구·설정·훅을 끕니다.&lt;/strong&gt; &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--tools &quot;&quot;&lt;/code&gt;로 도구를 0개로 만듭니다. &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--safe-mode&lt;/code&gt;와 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--setting-sources &quot;&quot;&lt;/code&gt;로 설정 출처를 비웁니다. 아래 코드로 훅(정해진 때 저절로 실행되는 동작)을 모두 끕니다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;--settings&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;'{&quot;disableAllHooks&quot;:true}'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;기본 지시문을 한 문장으로 바꿉니다.&lt;/strong&gt; &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--system-prompt&lt;/code&gt;를 씁니다. 시스템 프롬프트는 AI에게 미리 주는 기본 지시문입니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;strong&gt;다시 재서 비교합니다.&lt;/strong&gt; 1~2번을 다시 해서 합계가 처음보다 작아졌으면 성공입니다.&lt;/li&gt;&lt;/ol&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;캐시는 앞서 보낸 내용을 잠시 저장해 두었다가 다시 꺼내 쓰는 것입니다. 캐시 생성은 새로 저장한 양이고, 캐시 읽기는 저장해 둔 것을 다시 읽은 양입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;이 두 값은 입력과 따로 집계되므로 입력 칸만 보면 차이를 놓칩니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;아래는 측정에 쓴 실행기의 플래그를 명령 한 줄로 옮긴 예시입니다. 이 한 줄 자체를 다시 재 보지는 않았으니, 쓰실 때는 1~2번 방법으로 꼭 직접 재 보세요.&lt;/p&gt;
&lt;div class=&quot;code-box&quot; style=&quot;margin:1.3em 0&quot;&gt;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin:0 0 6px;font-size:12px;color:#6b7280;letter-spacing:.04em&quot;&gt;&lt;span&gt;BASH&lt;/span&gt;&lt;button type=&quot;button&quot; onclick=&quot;var b=this,c=b.parentNode.nextSibling.innerText;navigator.clipboard.writeText(c).then(function(){b.textContent='복사됨';setTimeout(function(){b.textContent='복사'},1500)})&quot; style=&quot;font-size:13px;line-height:1;padding:6px 12px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#222;cursor:pointer&quot;&gt;복사&lt;/button&gt;&lt;/div&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;claude&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;-p&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;준비 완료를 한 번 출력해&quot;&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--model&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;haiku&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;--strict-mcp-config&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--mcp-config&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;'{&quot;mcpServers&quot;:{}}'&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;--tools&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--safe-mode&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--setting-sources&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;--settings&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;'{&quot;disableAllHooks&quot;:true}'&lt;/span&gt;&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #4070A0; font-weight: bold&quot;&gt;\&lt;/span&gt;
&lt;span style=&quot;color: #BBB&quot;&gt;  &lt;/span&gt;--system-prompt&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4070A0&quot;&gt;&quot;한국어로, 요청받은 형식 그대로만 답한다.&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;막힐 때는 이렇게 해 봅니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;알 수 없는 옵션이라는 오류가 나면 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;claude --help&lt;/code&gt;로 지금 버전의 플래그 이름을 확인합니다. 버전에 따라 이름이 다를 수 있습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;도구가 꼭 필요한 작업이라면 플래그는 그대로 둡니다. 대신 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--tools&lt;/code&gt;와 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--allowedTools&lt;/code&gt;로 필요한 도구만 엽니다. 권한을 통째로 여는 방식은 쓰지 않았습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;플래그를 넣어도 스킬은 22개가 남았습니다. 스킬 수가 0이 아니어도 이상한 것이 아닙니다.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;sec3&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;줄이면 실제로 얼마나 달라지나?&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;같은 요청을 세 조건으로 한 번씩 보내 직접 쟀습니다. 모델은 haiku입니다. A는 옵션 없이 새로 만든 빈 임시 폴더에서 실행했습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;B는 축소 플래그만, C는 축소 플래그에 짧은 지시문을 더했습니다.&lt;/p&gt;
&lt;div class=&quot;table-cards&quot; style=&quot;margin:1.3em 0 1.6em&quot;&gt;&lt;div style=&quot;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;margin:0 0 .75em;background:#fff&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:17px;line-height:1.45;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;A 기본 실행&lt;/p&gt;&lt;div style=&quot;display:grid;grid-template-columns:repeat(auto-fill,minmax(7.5em,1fr));gap:.55em 1em&quot;&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;문맥 합계&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;39,967&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;입력&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 생성&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;10,773&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 읽기&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;29,192&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;비용(달러)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0.00258&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;시간(초)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;3.9&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;도구&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;31&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;스킬&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;35&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;A보다 줄어든 비율&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;-&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;margin:0 0 .75em;background:#fff&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:17px;line-height:1.45;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;B 축소 플래그&lt;/p&gt;&lt;div style=&quot;display:grid;grid-template-columns:repeat(auto-fill,minmax(7.5em,1fr));gap:.55em 1em&quot;&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;문맥 합계&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;3,312&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;입력&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 생성&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;2,661&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 읽기&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;649&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;비용(달러)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0.00067&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;시간(초)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;2.8&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;도구&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;스킬&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;22&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;A보다 줄어든 비율&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;91.7%&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;margin:0 0 .75em;background:#fff&quot;&gt;&lt;p style=&quot;margin:0 0 .5em!important;font-weight:700;font-size:17px;line-height:1.45;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;C 축소 + 짧은 지시문&lt;/p&gt;&lt;div style=&quot;display:grid;grid-template-columns:repeat(auto-fill,minmax(7.5em,1fr));gap:.55em 1em&quot;&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;문맥 합계&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;900&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;입력&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 생성&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;898&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;캐시 읽기&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;비용(달러)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0.00031&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;시간(초)&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;3.2&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;도구&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;0&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;스킬&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;22&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height:1.4;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;div style=&quot;font-size:14px;color:#4b5563&quot;&gt;A보다 줄어든 비율&lt;/div&gt;&lt;div style=&quot;font-size:16px;font-weight:700;color:#222&quot;&gt;97.7%&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;chart_tbl0_1.png&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bQhfNE/dJMcaggkGJy/MMBh880mEWoEnfL75QVT5K/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bQhfNE/dJMcaggkGJy/MMBh880mEWoEnfL75QVT5K/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bQhfNE/dJMcaggkGJy/MMBh880mEWoEnfL75QVT5K/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbQhfNE%2FdJMcaggkGJy%2FMMBh880mEWoEnfL75QVT5K%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;442&quot; height=&quot;456&quot; data-filename=&quot;chart_tbl0_1.png&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;font-size:.95em;color:#4b5563;margin:0 0 2.2em!important;word-break:keep-all&quot;&gt;문맥 합계 비교 (위 표의 값)&lt;br&gt;&lt;span style=&quot;font-size:.88em;overflow-wrap:anywhere&quot;&gt;출처: 글 표의 값을 그대로 옮김&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;margin:1.8em 0 .4em!important&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;chart_tokens.png&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bAfV01/dJMcacSqoPl/HOfW6aN7KFxhF9mkxyhQdK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bAfV01/dJMcacSqoPl/HOfW6aN7KFxhF9mkxyhQdK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bAfV01/dJMcacSqoPl/HOfW6aN7KFxhF9mkxyhQdK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbAfV01%2FdJMcacSqoPl%2FHOfW6aN7KFxhF9mkxyhQdK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;442&quot; height=&quot;456&quot; data-filename=&quot;chart_tokens.png&quot; data-origin-width=&quot;920&quot; data-origin-height=&quot;950&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;&lt;p data-ke-size=&quot;size16&quot; style=&quot;text-align:center;font-size:.95em;color:#4b5563;margin:0 0 2.2em!important;word-break:keep-all&quot;&gt;claude -p 호출 한 번의 기본 문맥 토큰 (자체 실측)&lt;br&gt;&lt;span style=&quot;font-size:.88em;overflow-wrap:anywhere&quot;&gt;출처: 자체 실측 (token_baseline_haiku_20261021_052037.json)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;핵심은 세 가지입니다.&lt;/p&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;문맥이 39,967토큰에서 900토큰으로 97.7% 줄었습니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;지시문만 바꿔도 B보다 72.8%가 더 줄었습니다. B와 C의 차이는 지시문 하나뿐이라, 줄어든 약 2,412토큰은 기본 지시문 차이로 보입니다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;비용은 88% 줄어 토큰보다 덜 줄었습니다. A는 문맥의 73.0%가 캐시 읽기였고 C는 0이었지만, 단가별로 나눠 보지는 않았습니다.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;sec4&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;이 숫자를 볼 때 조심할 점은?&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;조건마다 한 번씩만 잰 값이라 참고용입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;B는 여러 플래그를 한꺼번에 바꾼 조건입니다. 그래서 어느 플래그가 얼마를 줄였는지는 모릅니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;C는 B보다 가벼운데 시간은 더 걸렸습니다. 한 번씩 잰 값이라 속도 차이를 말하기는 어렵습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;모델이나 명령창 프로그램 버전이 바뀌면 숫자도 달라질 수 있습니다. 캐시 상태에 따라 생성과 읽기 비율도 바뀌어서 비교는 합계로 했습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;구독형이라 표의 비용을 실제로 내지는 않습니다. 그래도 호출 크기를 비교하는 잣대로는 쓸 만합니다.&lt;/p&gt;
&lt;h2 id=&quot;sec5&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;자주 묻는 질문&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;가장 쉽게 아끼는 방법은 무엇인가요?&lt;/strong&gt; 도구가 필요 없는 호출이면 축소 플래그에 짧은 지시문을 더합니다. 제 측정에서는 900토큰까지 줄었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;입력 토큰만 확인하면 되나요?&lt;/strong&gt; 아닙니다. 세 조건 모두 입력은 2토큰이었고, 차이는 캐시 생성과 캐시 읽기에 있었습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;어느 플래그가 가장 많이 줄였나요?&lt;/strong&gt; 이 측정으로는 알 수 없습니다. 여러 플래그를 한꺼번에 바꿨기 때문입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;도구가 필요한 작업에도 쓸 수 있나요?&lt;/strong&gt; 쓸 수 있습니다. 플래그는 그대로 두고 필요한 도구만 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--tools&lt;/code&gt;와 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;--allowedTools&lt;/code&gt;로 엽니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;명령을 넣었더니 오류가 납니다.&lt;/strong&gt; &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;claude --help&lt;/code&gt;로 지금 버전에 그 플래그가 있는지, 이름이 같은지 먼저 확인합니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 1em!important;font-size:17px;line-height:1.75;color:#222;word-break:keep-all;overflow-wrap:break-word;margin-left:0!important;margin-right:0!important&quot;&gt;&lt;strong&gt;이 결과를 그대로 믿어도 되나요?&lt;/strong&gt; 잠정적인 결과로 봐 주세요. 조건마다 한 번만 쟀고, 모델과 버전에 따라 달라질 수 있습니다.&lt;/p&gt;
&lt;h2 id=&quot;sec6&quot; style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb;word-break:keep-all;text-wrap:balance&quot;&gt;바로 해 볼 점검 목록&lt;/h2&gt;
&lt;ul style=&quot;margin:0 0 1.2em;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;지금 쓰는 호출을 아래 코드로 실행해 &lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;usage&lt;/code&gt; 항목을 찾았다.&lt;div class=&quot;code-box&quot; style=&quot;margin:.6em 0 1em&quot;&gt;&lt;pre style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;overflow:visible;background:#f8f9fb;border:1px solid #e5e7eb;padding:12px 12px;border-radius:10px;font-size:clamp(13px, calc(11px + .6vw), 14px);line-height:1.65;margin:0;tab-size:2;font-family:Consolas,'D2Coding',monospace&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;overflow-wrap:anywhere;font-size:inherit;font-family:Consolas,'D2Coding','Courier New',monospace&quot;&gt;--output-format&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;stream-json&lt;span style=&quot;color: #BBB&quot;&gt; &lt;/span&gt;--verbose&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;입력·캐시 생성·캐시 읽기 세 값을 더해 문맥 합계를 냈다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;&lt;code style=&quot;background:#f3f4f6;padding:.1em .4em;border-radius:4px;font-family:Consolas,'D2Coding',monospace;font-size:.92em;white-space:nowrap&quot;&gt;claude --help&lt;/code&gt;로 쓰려는 플래그 이름이 내 버전에 있는지 확인했다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;도구가 필요 없는 호출에 축소 플래그를 붙였다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;답 형식이 정해진 작업은 지시문을 한 문장으로 바꾸고 전후 합계를 비교했다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;플래그별 효과가 궁금하면 하나씩 따로 켜서 쟀다.&lt;/li&gt;&lt;li style=&quot;margin:0 0 .75em;font-size:17px;line-height:1.75;word-break:keep-all;overflow-wrap:break-word&quot;&gt;조건마다 여러 번 재고, 모델과 버전을 함께 적어 두었다.&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;engage&quot; style=&quot;margin:2em 0 0;border-top:2px solid #e5e7eb;padding-top:.6em&quot;&gt;&lt;p style=&quot;margin:1.2em 0 .4em!important;padding:.8em 1em;background:#f6f7f9;border-radius:8px;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;Claude Code, 여러분은 어떻게 하고 계신가요? 막힌 곳이나 궁금한 점을 댓글로 남겨 주시면 다음 글에서 직접 해 보고 답하겠습니다.&lt;/p&gt;&lt;p style=&quot;margin:.4em 0!important;font-size:.95em;color:#4b5563;word-break:keep-all;margin-left:0!important;margin-right:0!important&quot;&gt;새 글을 놓치지 않으려면 블로그 오른쪽 위 &amp;#x27;구독하기&amp;#x27;를 누르거나 RSS(https://chon91.tistory.com/rss)를 등록해 주세요.&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;disclosure&quot; style=&quot;font-size:.9em;color:#4b5563;word-break:keep-all;border-left:3px solid #ccc;padding-left:.8em;margin:1.6em 0 1em&quot;&gt;&lt;p style=&quot;margin:0 0 .3em!important;line-height:1.6;margin-left:0!important;margin-right:0!important&quot;&gt;이 글은 AI의 도움을 받아 작성했으며, 수치는 직접 수집한 데이터에서 계산한 값입니다. 틀린 곳을 알려 주시면 확인해 고치겠습니다.&lt;/p&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-size:20px;margin:2em 0 0.8em;line-height:1.4;padding-bottom:.3em;border-bottom:2px solid #e5e7eb&quot;&gt;출처&lt;/h2&gt;&lt;ol style=&quot;padding-left:1.4em&quot;&gt;&lt;li style=&quot;margin:0 0 .4em;font-size:.95em;word-break:keep-all;overflow-wrap:break-word&quot;&gt;자체 프로젝트 기록(코드·실측 파일)&lt;/li&gt;&lt;/ol&gt;</description>
      <category>1인 자동화 제작기</category>
      <category>1인 무인 자동화</category>
      <category>claude -p</category>
      <category>claude code</category>
      <category>자동화 제작기</category>
      <category>토큰 절감</category>
      <author>일손덜기</author>
      <guid isPermaLink="true">https://chon91.tistory.com/4</guid>
      <comments>https://chon91.tistory.com/4#entry4comment</comments>
      <pubDate>Wed, 21 Oct 2026 11:00:44 +0900</pubDate>
    </item>
    <item>
      <title>환영합니다!</title>
      <link>https://chon91.tistory.com/1</link>
      <description>&lt;h3 data-ke-size=&quot;size23&quot;&gt;#1 글을 작성하고 블로그를 관리해보세요.&lt;/h3&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://t1.daumcdn.net/cfile/tistory/990A5D36607EB61D22?original&quot; data-phocus=&quot;https://t1.daumcdn.net/cfile/tistory/990A5D36607EB61D22?original&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/990A5D36607EB61D22&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F990A5D36607EB61D22&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;전재호님의 회원 가입을 진심으로 축하합니다. 이 글은 비공개로 작성돼 있습니다.&lt;br /&gt;'&lt;a href=&quot;/manage/post/1&quot;&gt;편집&lt;/a&gt;'으로 내용을 바꾸시거나, 삭제 후 '&lt;a href=&quot;/manage/post&quot;&gt;새 글을 작성&lt;/a&gt;'하셔도 됩니다.&lt;br /&gt;글 뿐만 아니라 블로그의 각종 설정을 변경할 수도 있습니다. '&lt;a href=&quot;/manage&quot;&gt;블로그관리&lt;/a&gt;'를 확인해보세요.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;#2 다양한 스킨이 있어요.&lt;/h3&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://t1.daumcdn.net/cfile/tistory/9945ED3A607EB61D22?original&quot; data-phocus=&quot;https://t1.daumcdn.net/cfile/tistory/9945ED3A607EB61D22?original&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/9945ED3A607EB61D22&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F9945ED3A607EB61D22&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;티스토리에 있는 다양한 '&lt;a href=&quot;https://www.tistory.com/skin&quot;&gt;스킨&lt;/a&gt;'도 살펴 보세요.&lt;br /&gt;블로그나 사이트를 사용하는 목적에 맞게 스킨을 고를 수 있습니다.&lt;br /&gt;어떤 이야기를 주로 하실 건가요? 잘 생각해 보시고, 마음에 드는 스킨을 고르세요.&lt;br /&gt;'&lt;a href=&quot;/manage/design/skin/edit#/&quot;&gt;스킨 편집&lt;/a&gt;'을 통해 다양한 커스텀, 그리고 홈 꾸미기를 적용하실 수도 있답니다.&lt;/p&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;#3 포럼에서 사람들과 소통하세요.&lt;/h3&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://t1.daumcdn.net/cfile/tistory/997D8944607EB61D23?original&quot; data-phocus=&quot;https://t1.daumcdn.net/cfile/tistory/997D8944607EB61D23?original&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/997D8944607EB61D23&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F997D8944607EB61D23&quot; data-origin-width=&quot;1200&quot; data-origin-height=&quot;600&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;마지막으로 사용하시다가 티스토리에 대해 궁금한 내용이 있다면 '&lt;a href=&quot;https://www.tistory.com/community/forum&quot;&gt;포럼&lt;/a&gt;'을 확인하세요.&lt;br /&gt;찾기 어려울 땐 직접 질문을 해보는 건 어떨까요? 친절한 티슷터 분들이 바로 답변해 줄 거에요.&lt;/p&gt;</description>
      <author>일손덜기</author>
      <guid isPermaLink="true">https://chon91.tistory.com/1</guid>
      <comments>https://chon91.tistory.com/1#entry1comment</comments>
      <pubDate>Tue, 20 Apr 2021 20:08:14 +0900</pubDate>
    </item>
  </channel>
</rss>