> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Webスクレイピングと自動化

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<div id="overview">
  ## 概要
</div>

Devin は、あなたのために休まず働くウェブスクレイピングアシスタントです。ウェブスクレイパーを構築できるだけでなく、繰り返し発生するウェブリサーチや情報収集タスクを自動で実行することもできます。

<div id="use-cases">
  ## ユースケース
</div>

1. Webスクレイピングとデータ収集
2. 自動データ抽出
3. スクレイピングしたデータの構造化フォーマットへの変換
4. 静的および動的なWebコンテンツの両方の取り扱い
5. 繰り返し作業のためのブラウザ自動化
6. [APIリファレンス](/ja/api-reference/overview) を使用した自動データ収集パイプラインの構築

<div id="example-prompts">
  ## プロンプト例
</div>

<AccordionGroup>
  <Accordion title="絵文字をスクレイピングする" icon="face-smile">
    <PromptBlock>
      ```txt Scrape emojis theme={null}
      このリポジトリ (https://github.com/muan/unicode-emoji-json) を使って、https://www.gstatic.com/android/keyboard/emojikitchen/20201001/u1f600/u1f600_u2615.png のような文字列から 2 つの絵文字コード (u1f600, u2615) を抽出し、それらを実際の絵文字に変換してから "grinning_face_warm_beverage" に変換する関数を書いてください。
      ```
    </PromptBlock>
  </Accordion>

  <Accordion title="クライアントサイドとサーバーサイドのスクリプトによるスクレイピング" icon="shovel-snow">
    <PromptBlock>
      ```txt Scrape website theme={null}
      ## 概要
      このプレイブックは、Web サイトをスクレイピングして結果をユーザーに返すとともに、その結果を生成するために使用したクライアントサイドおよびサーバーサイドのスクレイピングスクリプトも併せて返すために使用できます。
      ```
    </PromptBlock>
  </Accordion>

  <Accordion title="反復的な Web 作業" icon="globe">
    <PromptBlock>
      ```txt Download logos theme={null}
      Fortune 500 企業のうち 50 社のロゴを検索してダウンロードしてください。
      ```
    </PromptBlock>
  </Accordion>
</AccordionGroup>

<div id="example-sessions">
  ## セッション例
</div>

<div id="emoji-data-processing">
  ### 絵文字データ処理
</div>

**絵文字をスクレイピングする**

GitHub リポジトリ内の絵文字 Unicode データをパースして変換し、人間にとって読みやすい形式にする方法を学びます。このセッションでは、絵文字処理のために JSON データソースを扱い、文字列操作を行う方法を紹介します。

[https://app.devin.ai/sessions/4f8a7b129820493b9c0ca140cddede50](https://app.devin.ai/sessions/4f8a7b129820493b9c0ca140cddede50)

<div id="youtube-content-extraction">
  ### YouTube コンテンツ抽出
</div>

**YouTube プレイリストのスクレイピング**

YouTube プレイリストから動画のメタデータをプログラムで抽出する方法を学びます。このセッションでは、YouTube の利用規約を順守しながら、Python を用いて動画のタイトルや説明文、その他のプレイリスト情報にアクセスする方法を解説します。

[https://app.devin.ai/sessions/8c6edbbb0bce4b70acd09255e1994c0b](https://app.devin.ai/sessions/8c6edbbb0bce4b70acd09255e1994c0b)

<div id="e-commerce-data-collection">
  ### Eコマースのデータ収集
</div>

**eBayデータのスクレイピング**

eBayの出品一覧から大規模に商品情報を収集する手法を学びます。このセッションでは、ページネーションやレート制限に対応しながら、価格、商品説明、出品者情報を収集するための自動化されたWebスクレイピング手法を解説します。

[https://app.devin.ai/sessions/dc70fe0649cb4041852da384e65d42be](https://app.devin.ai/sessions/dc70fe0649cb4041852da384e65d42be)
