Skip to content
dsh.fish
Bundle

dsh-useragent

User-Agent 解析:识别浏览器/版本、操作系统、设备类型、渲染引擎与爬虫

Source
uckkk
License
MIT
Updated
Updated 20 days ago

Readme

# dsh-useragent · User-Agent 解析

解析 User-Agent 字符串,识别浏览器/版本、操作系统、设备类型、引擎与爬虫。纯 Node 实现。

## 提供的工具

| 工具 | 作用 |
|---|---|
| `parse_ua` | 解析 UA 字符串 |

## 安装

```bash
dsh plugin add dsh-useragent
```
安装后在 profile 的 `package.json` 的 `dsh.profile.bundles` 中加入 `"dsh-useragent"`。

## 用法示例

```
这个 UA 是什么浏览器和系统
→ 调用 parse_ua(ua="Mozilla/5.0 ... Chrome/120 ...")
```

## 安装

```bash
dsh plugin add github:uckkk/dsh-useragent
```

> 安装即在本机运行第三方代码,请自行审阅源码。

## 安装

```bash
dsh plugin add github:uckkk/dsh-useragent
```

## 使用

安装后在会话中调用该插件注册的工具即可。

## 许可

MIT

> 安装即在本机运行第三方代码,请自行审阅源码。

Install

dsh plugin --profile web add github:uckkk/dsh-useragent

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source