# 批次擷取 - 連續頁面 URL

{% hint style="success" %} <mark style="color:$success;">**等一下！**</mark>\*\* 了解更簡單生成連續頁面 URL 的方法\*\*

如要群組提取以數字區分的頁面，使用[分頁範本功能](https://app.gitbook.com/o/Uu6AM3fgpZza0EpsJM4N/s/QSPSOmaFPAz7khj6t7Ds/getting-started/databoard-features/settings-pagination-templates-zh-hant)可以不用取得 1,2,3…頁面位址的步驟，更簡單地進行。分頁範本是自動點擊「下一頁」按鈕提取連續頁面的方式。
{% endhint %}

***

## 使用方法

{% stepper %}
{% step %}

#### 確認位址規則

在想提取的網頁按頁碼，確認位址（URL）如何變化。大部分情況有 <mark style="background-color:red;">page=</mark> 後面只有數字不同的結構（第 1 頁可能省略參數）。

[<mark style="color:$success;">https://www.example.com/categories/420186/?sort=latest</mark>](https://www.example.com/categories/420186/?sort=latest)

[<mark style="color:$success;">https://www.example.com/categories/420186?page=2\\\\\&sort=latest</mark>](https://www.example.com/categories/420186?page=2\\\\\&sort=latest)

[<mark style="color:$success;">https://www.example.com/categories/420186?page=3\\\\\&sort=latest</mark>](https://www.example.com/categories/420186?page=3\\\\\&sort=latest)

利用此原理可以用一個 URL 輕鬆製作所有頁面的分頁位址。

<figure><img src="/files/152817b2f006dba1df7f018e0c74d8dbb88c9086" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### 活用 URL 自動生成工具

**A. 使用對話式 AI 服務&#x20;**<sup><mark style="color:green;">**推薦**<mark style="color:green;"></sup>

使用 ChatGPT 等基於 LLM 的對話式 AI 服務可以簡單生成連續頁面位址。像下方範例頁面一樣確認想提取的頁面位址模式後，說「*生成將 Page 數字從 1 到 30 代入的 URL 位址*」試試看。

<figure><img src="/files/fd446db26c95f520929dbec4c0e4627fdf9d8346" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Listly 測試頁面連結：** [**https://test.listly.io/pagination/basic?page=2**](https://test.listly.io/pagination/basic?page=1)

<img src="/files/d4dd1776d4a9fe7c8c7b7d6a28ac664ab30deecc" alt="" data-size="original">
{% endhint %}

**B. 使用 URL Builder**

在 Google 等入口網站搜尋「*sequential url generator*」或「url builder」可以找到多種免費網頁工具。此說明以**Online Sequential Number, URL & Text Generator** 服務為例。\
（只要理解 URL 結構，用 Excel 公式也能輕鬆製作。）

{% hint style="info" %}
使用服務連結：[Online Sequential Number, URL & Text Generator](https://reznortech.rf.gd/online-sequential-number-text-url-link-generator.php?utm_source=chatgpt.com\&i=1)
{% endhint %}

移動到使用服務連結會出現如下畫面。

<figure><img src="/files/f06c1584f4fa05b2f5e7890b23892a0ebe31f0a6" alt=""><figcaption></figcaption></figure>

如下範例設定選項生成連續頁面 URL。

<mark style="color:$success;">範例 URL：</mark>[<mark style="color:$success;">https://www.example.com/categories/420186?page=2\\\\\&sort=latest</mark>](https://www.example.com/categories/420186?page=2\\\\\&sort=latest)

<figure><img src="/files/b90fd6270bf28c6abee1100ce5d2d178f11741e3" alt=""><figcaption></figcaption></figure>

\ <mark style="color:red;">➊</mark> 輸入頁碼前不變的部分。

<mark style="color:red;">➋</mark> 輸入頁面開始號碼。\
（第 1 頁省略參數的情況也很多，但輸入 <mark style="color:$success;">page=1</mark> 也沒問題。）

<mark style="color:red;">➌</mark> 輸入頁面最後號碼。

<mark style="color:red;">➍</mark> 輸入數字的增加階段。通常是 1,2,3… 順序增加，所以輸入 1 即可。

<mark style="color:red;">➎</mark> 輸入頁碼後不變的部分。沒有的話留空即可。完成輸入後，點擊下方的\*\*【Generate】\*\*按鈕，會自動生成連續 URL。
{% endstep %}

{% step %}

#### 活用結果

根據輸入的範圍順序生成 URL 後，複製生成的位址貼到**群組提取**。可以一次提取多個頁面。

<figure><img src="/files/408f7242a5025b26ce5610d87d4952bcbc37e94e" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.listly.io/docs/zh-hant/getting-started/result-page-features-zh-hant/group-extraction-sequential-urls-zh-hant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
