# 批量提取 - 连续页面 URL

{% hint style="success" %} <mark style="color:$success;">**等一下！**</mark> **了解生成顺序页面 URL 的更简单方法**

如果您尝试批量提取按顺序编号的页面，使用[分页模板功能](https://help.listly.io/getting-started/databoard-features/settings-pagination-templates)会更简单——您可以跳过获取 1,2,3... 页面地址的步骤。分页模板会自动点击"下一页"按钮来提取顺序页面。
{% endhint %}

***

## 使用方法

{% stepper %}
{% step %}
**检查 URL 模式**

当您在要提取的网页上点击页码时，观察 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="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/ULPkF3X3dQxuHMTxJKHN/%E1%84%91%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%8C%E1%85%B5%E1%84%82%E1%85%A6%E1%84%8B%E1%85%B5%E1%84%89%E1%85%A7%E1%86%AB%20%E1%84%8C%E1%85%AE%E1%84%89%E1%85%A9.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**使用自动 URL 生成工具**

**A. 使用对话式 AI 服务**<sup><mark style="color:green;">**推荐**<mark style="color:green;"></sup>

您可以使用 ChatGPT 等基于 LLM 的对话式 AI 服务轻松生成顺序页面地址。像下面的示例页面一样检查页面 URL 模式后，尝试说"创建页码从 1 到 30 的 URL 地址"。

<figure><img src="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/7u4iOSFJMN5ec1WGSzSk/listly%20sequential%20urls.png" 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="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/6OMvy7kgCw69T41QzhiR/page%20url%202.png" alt="" data-size="original">
{% endhint %}

**B. 使用 URL 生成器**

在 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="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/ucNl4gbNJF1QjahKvDNP/%E1%84%80%E1%85%B3%E1%84%85%E1%85%AE%E1%86%B8%E1%84%8E%E1%85%AE%E1%84%8E%E1%85%AE%E1%86%AF%201.png" 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="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/gDCIfpdEIjM4q0Da4ugY/%E1%84%80%E1%85%B3%E1%84%85%E1%85%AE%E1%86%B8%E1%84%8E%E1%85%AE%E1%84%8E%E1%85%AE%E1%86%AF%202.png" alt=""><figcaption></figcaption></figure>

按如下输入选项并点击 Generate 按钮：

* 输入页码之前不变的部分。
* 输入起始页码。（第 1 页通常省略参数，但输入 page=1 仍然可以正常工作。）
* 输入结束页码。
* 输入递增步长。通常是 1,2,3... 顺序，所以输入 1。
* 输入页码之后不变的部分。如果没有则留空。
  {% endstep %}

{% step %}
**使用结果**

根据您输入的范围顺序生成 URL 后，复制生成的地址并将其粘贴到**批量提取**中，即可一次提取多个页面。

<figure><img src="https://content.gitbook.com/content/LlkvcuviCyyU871Augk5/blobs/nUVFxi9ndqnZzrSJhx6k/%E1%84%80%E1%85%B3%E1%84%85%E1%85%AE%E1%86%B8%E1%84%8E%E1%85%AE%E1%84%8E%E1%85%AE%E1%86%AF%203.png" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
