Ayugespidertools

Latest version: v3.11.2

Safety actively analyzes 723326 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 11

3.9.1

Deprecations

- 无。

New features

- 添加 `postgresql` 的 `asyncio` 的 `AsyncConnectionPool` 存储场景支持。([`341e768`](https://github.com/shengchenyang/AyugeSpiderTools/commit/341e7681931f796b5167696b948ea331e2b62dbb))

Bug fixes

- 解决 `asyncio` 协程场景下的 `spider` 的 `AyuItem` 写法风格不兼容的问题。([`66177e4`](https://github.com/shengchenyang/AyugeSpiderTools/commit/66177e402d0e9c15b559664bfc40c6de0e545735))

Code optimizations

- 更新 `spider` 模板示例。([`61e10b1`](https://github.com/shengchenyang/AyugeSpiderTools/commit/61e10b140e880c7b2348b35687c167b6fad99b99))

3.9.0

Deprecations

- `AsyncMysqlPipeline` 改名为 `AyuAsyncMysqlPipeline`。
- `AsyncMongoPipeline` 改名为 `AyuAsyncMongoPipeline`。
- 删除 `oss` 的模块及依赖。

注:最新示例请在 [DemoSpider](https://github.com/shengchenyang/DemoSpider) 中查看,以往旧版请切换对应分支查看。

New features

- 添加 `oracle` 的存储场景支持,目前有 `fty` 及 `twisted` 两种方式。
- 添加 `mongodb:uri` 的配置方式。

Bug fixes

- 解决 `asyncio mysql` 协程场景下可能会出现的被垃圾回收而阻塞的问题。
- 解决 `mysql` 或 `postgresql` 的错误处理场景下由于权限等问题造成的循环递归问题。

Code optimizations

- 优化 `.conf` 模板示例,配置更明确且更易管理。
- `mypy check`.

3.8.0

Deprecations

- `MYSQL_ENGINE_ENABLED` 的配置项名改为 `DATABASE_ENGINE_ENABLED`,目前支持 `msyql` 和 `postgresql`。
- 安装再添加 `database` 选项,可通过 `pip install ayugespidertools[database]` 安装所需的所有数据依赖及扩展。

**注意:此变更包含不兼容部分,需要着重注意的部分如下:**
- 删除了 `MYSQL_ENGINE_ENABLED` 配置项;
- 由于 `SQLAlchemy` 依赖升级到了 `2.0+` 新版本,与以往的去重使用有变化,具体请查看本库 `readthedocs` 文档。

New features

- 支持 `python3.12`。
- 添加 `postgresql` 的存储场景支持,目前有同步场景及结合 `twisted` 的异步场景。
- `DATABASE_ENGINE_ENABLED` 的配置目前会激活对应场景中数据库的 `engine` 和 `engine_conn` 以供去重使用。
- 将 `psycopg` 相关的数据库扩展依赖改为可选项,可通过 `pip install ayugespidertools[database]` 安装所需依赖。

Bug fixes

- 无。

Code optimizations

- 优化 `type hints`。
- 更新生成脚本模板以匹配新版本,也可使用以往 `pandas` 去重方式。
- 更明确的日志信息。

3.7.0

Deprecations

- 获取 `nacos` 和 `consul` 中的配置时不再转小写,请按照 [readthedocs](https://ayugespidertools.readthedocs.io/en/latest/intro/examples.html) 示例填写。
- 删除 `html2text` 相关依赖及代码,此场景更适合自行实现。
- 安装不再包含非核心依赖,可通过 `pip install ayugespidertools[all]` 安装全部依赖。
- 一些 `api`变动:

| 更改前 | 更改后 | 受影响的部分 | 备注 |
| ---------------------------------------- | ------------------------------------------ | ------------------------------------------------------------ | ------------------------ |
| extract_html_to_md | 删除 | ayugespidertools.formatdata | |
| AliOssBase | 转移到 ayugespider.extras 中 | ayugespidertools.oss | |
| yidungap, imgoperation, verificationcode | 转移到 ayugespider.extras 中,并整理在一起 | ayugespidertools.imgoperation<br>ayugespidertools.verificationcode<br>ayugespidertools.common.yidungap | 在 extras 部分查看变化。 |

- 以下是对 `extras` 相关模块所影响较大部分的介绍:

| 更改前 | 更改后 | 受影响的部分 | 备注 |
| ---------------------- | ------------------------------ | --------------------------------- | ---- |
| YiDunGetGap.discern | CvnpilKit.discern_gap | ayugespidertools.common.yidungap | |
| Picture.identify_gap | CvnpilKit.identify_gap | ayugespidertools.imgoperation | |
| match_img_get_distance | CvnpilKit.match_gap | ayugespidertools.verificationcode | |
| get_normal_track | CvnpilKit.get_normal_track | ayugespidertools.verificationcode | |
| get_selenium_tracks | ToolsForAyu.get_selenium_track | ayugespidertools.verificationcode | |

注意:

- **此变更包含不兼容部分,如果你只使用其中 `scrapy` 扩展库部分,那么除了 `nacos`,`consul` 的 `yaml` 和 `hcl` 解析外对你无影响。**
- **再次提醒,使用时请做好依赖管理,以免不兼容部分对你的影响!**

New features

- `mongo` 场景添加 `authMechanisem` 配置选项,为可选配置,默认为 `SCRAM-SHA-1`。
- 将 `numpy`, `oss`, `pillow` 等非核心依赖改为可选项,可通过 `pip install ayugespidertools[all]` 安装所有依赖。

Bug fixes

- 无。

Code optimizations

- 优化 `aiohttp`, `cvnpil` 等测试用例,将图像相关功能整理并放入 `cvnpil` 模块中。
- `ayuge version` 修改为从 `__version__` 获取信息的方式。
- 更新模板,`mysql_engine` 的示例改为通过 `sqlalchemy` 的方式,减少依赖数且大部分场景运行效率更好。
- 将可选装依赖的相关的功能代码统一放入 `extras` 中,更易管理。

3.6.1

New features

- 无。

Bug fixes

- 解决 `mq` 推送场景时 `yield AyuItem` 时的错误,现可支持多种格式。
- 解决 `VIT_DIR` 默认参数未存储至 `settings` 中的问题。

Code optimizations

- 文件下载场景添加 `FILES_STORE` 路径不存在时的自动创建处理。
- `settings` 模板删除无关配置。
- 项目添加 `question issues template`。

3.6.0

Deprecations

- 一些 `api` 变动:

| 更改前 | 更改后 | 受影响的部分 | 备注 |
| ------------------------------------------------------------ | ------------------------------------------------------------ | --------------------- | ---- |
| 删除 `LOGURU_CONFIG` 配置参数 | 现只需配置 `LOGURU_ENABLED` 即可 | `slog` 日志模块 | |
| 删除 `spider` 中 `settings_type` 参数 | 此为过度设计,若需要可自定义配置 | 项目配置信息 | |
| 删除 `spider` 中 `mysql_engine_enabled` 参数 | 转移到设置中,名称为 `MYSQL_ENGINE_ENABLED` | 配置模块,影响较大。 | |
| `AyuItem` 中 `_table` 参数类型修改<br>删除 `spider` 中 `custom_table_enum` 参数 | 修改为与普通字段一样的 `DataItem` 或 `str` 类型,删除 `demand_code` 字段。 | `spider`,`Item` 模块 | |
| 删除 `RECORD_LOG_TO_MYSQL` 配置参数 | 改为 `ayugespidertools.pipelines.AyuStatisticsMysqlPipeline` 方式调用。 | 配置模块 | |

注意:
- **此变更包含不兼容内容,请修改不兼容部分并调试正常后再投入生产;本项目在有一些不兼容变更时,会发布 `Minor` 及以上的版本包,请做好依赖版本管理。**
- **新版本的示例请查看 [DemoSpider](https://github.com/shengchenyang/DemoSpider) 中最新代码,`v3.5` 旧版本示例请查看其 `3.5.x` 分支。**

New features

- 无。

Bug fixes

- 无。

Code optimizations

- 设置 `VIT_DIR` 默认参数。
- 去除冗余配置,统一配置风格。将一些过于复杂的模块拆分,便于管理。

Page 3 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.