> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取Cookie

## 指令说明

**描述：** 在指定页面或指定URL获取Cookie信息，比如网页登录Cookie等。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/web-automation/images/web-cookie-get-01.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=486bda2ae1eefae0ff13b7febff03d17" alt="获取Cookie指令参数面板" width="660" height="479" data-path="helpcenter/commands/web-automation/images/web-cookie-get-01.png" />

    | 参数             | 说明                                                                                                                                                                      |
    | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **获取Cookie方式** | 下拉选择：指定页面的Cookie和指定Url的Cookie                                                                                                                                           |
    | **网页对象**       | "获取Cookie方式"选择指定页面的Cookie时候，需填写该参数。选择一个之前通过【打开网页】或【获取已打开的网页对象】指令创建的网页对象                                                                                                 |
    | **浏览器类型**      | "获取Cookie方式"选择指定Url的Cookie时候，需填写该参数。支持下拉选择：八爪鱼浏览器、谷歌浏览器、Edge浏览器、360安全浏览器、AdsPower、飞跨浏览器、紫鸟浏览器V6、紫鸟浏览器、易得客浏览器、稳卖AI浏览器（原牛卖浏览器）、Hubstudio、跨境卫士浏览器、站斧浏览器、云登浏览器、比特浏览器、自定义浏览器 |
    | **cookie url** | "获取Cookie方式"选择指定Url的Cookie时候，需填写该参数。填写Cookie所在网页的链接，后续会根据给定的url匹配，筛选浏览器Cookie                                                                                           |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/web-automation/images/web-cookie-get-02.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=1e9b3db8a9501506bf79a9d83d638607" alt="获取Cookie使用示例 - 流程搭建" width="1035" height="195" data-path="helpcenter/commands/web-automation/images/web-cookie-get-02.png" />

**该流程执行逻辑：**

使用【获取Cookie】指令获取指定链接 `https://s.weibo.com/top/summary?cate=realtimehot` 中的Cookie

由于上一步生成的是一个列表对象，如果想要拿到列表中的每一项，需要用到【列表循环】指令

每一个循环项对应列表中具体的Cookie值

### 效果展示

成功获取指定URL的Cookie列表，可循环输出每一项Cookie值。

<img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/web-automation/images/web-cookie-get-03.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=7e995548aadee3ba3c436c068d17404e" alt="获取Cookie使用示例 - 效果展示" width="1183" height="344" data-path="helpcenter/commands/web-automation/images/web-cookie-get-03.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
