Ayugespidertools

Latest version: v3.11.2

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

Scan your dependencies

Page 1 of 11

3.11.2

====================================

New features
------------

- 添加 mq(aio-pika) 的 async 管道模版示例。请在 DemoSpider 中 demo_mq_async 或文档中查看具体使用方法。

- 添加 mq(pika) 管道的集群支持。

Code optimizations
------------------

- mq pipeline 场景下的 .conf [mq] 部分配置更清晰。

- 固定 ci 的依赖库版本,使测试更稳定。

[See the full changelog.](https://ayugespidertools.readthedocs.io/en/latest/additional/news.html#ayugespidertools-3-11-2-2025-03-30)

3.11.1

> 此版本为 patch 更新,但还是推荐测试正常后再更新到生产环境。

Deprecations

- 删除 `ROBOTSTXT_OBEY` 模式配置。

Code optimizations

- 生成模版中添加日志 remove 示例。
- 添加 AiohttpRequest 参数弃用警告。
- 完善 poetry 开发流程。
- 优化 `VIT_DIR` 的获取方式。
- middlewares 和 pipelines 模块添加延迟加载功能。
- 将文档格式由 md 转为 rst。
- 添加和优化 pyupgrade,Makefile,exception 模块。

[See the full changelog.](https://ayugespidertools.readthedocs.io/en/latest/additional/news.html#ayugespidertools-3-11-1-2025-01-31)

3.11.0

> 此版本为大版本更新,请确认测试正常后再更新到生产环境。

Deprecations

- 移除对 `python3.8` 的支持。([104a3fa](https://github.com/shengchenyang/AyugeSpiderTools/commit/104a3faa0877a72febd960d110d349ec9be22239))
- 不再支持 `3.4` 及以下版本的 `mongodb` 的存储,([2874aab](https://github.com/shengchenyang/AyugeSpiderTools/commit/2874aabadb5149cbc376aa78e78077555309084b))

New features

- `scrapy` 依赖更新为最新的 `2.12.0`。([c3cf229](https://github.com/shengchenyang/AyugeSpiderTools/commit/c3cf229179e86fab4b7800bbd8dacfb408382f83))
- 升级 `aiohttp` 依赖版本,解决升级后的兼容问题。([9f6b68e](https://github.com/shengchenyang/AyugeSpiderTools/commit/9f6b68e77ffed45d6a2721678573b9fc9c63700e),[62160a8](https://github.com/shengchenyang/AyugeSpiderTools/commit/62160a8e3b3eb355a429bbaedfc6d05e771368ab))

Bug fixes

- 解决 `psycopg` 相关依赖可能存在的冲突问题。([a267c03](https://github.com/shengchenyang/AyugeSpiderTools/commit/a267c03aec55ed63a16926f90cf3d22e9ca20611))

Code optimizations

- 项目改为基于 `python 3.9` 开发,将涉及到的开发代码,`ci/cd`,测试等工具都改为 `3.9` 的特性。([1e44c3f](https://github.com/shengchenyang/AyugeSpiderTools/commit/1e44c3f9f4fee29f305da929413b2aa1774e319b))

3.10.1

Deprecations

- `mongodb` 场景统一存储相关的代码逻辑,且更新方式由之前 `update_many` 改为更正常的 `update_one` 的规则。([8af915f](https://github.com/shengchenyang/AyugeSpiderTools/commit/8af915f65fa021a97b2eeaf9893167f511ce81b9))

注:
1. 虽然此版本为 `patch` 升级,但还请在虚拟环境中自行测试后再确认是否升级。

New features

- 无。

Bug fixes

- 解决 `macOS` 低版本的依赖兼容问题,优化依赖管理;解决 `mongodb` 存储在 `py3.11` 及以上场景时 `motor` 和 `pymongo` 的版本冲突造成的运行报错。([a52755f](https://github.com/shengchenyang/AyugeSpiderTools/commit/a52755fc1e3b75728f09a04017b5907afa161624))

Code optimizations

- 整理代码风格。([c080c3c](https://github.com/shengchenyang/AyugeSpiderTools/commit/c080c3ccf0e0796c728dc8e25562b2d90f79e72d), [2130092](https://github.com/shengchenyang/AyugeSpiderTools/commit/213009271ab66ce6ec846462db0db0afe0f068dd))

3.10.0

Deprecations

- 将 `ayugespidertools.common.utils` 中 `ToolsForAyu` 修改为 `Tools`。([73703a0](https://github.com/shengchenyang/AyugeSpiderTools/commit/73703a0cbf26e53813bb58db83e89fe55486a3e1))
- 删除 `AiohttpFormRequest`,`AiohttpRequestArgs`,改为更简洁的 `AiohttpRequest` 且与 `aiohttp` 请求参数一致。([1a7b100](https://github.com/shengchenyang/AyugeSpiderTools/commit/1a7b1000fe32abe249007533a65f891bd989aee9))
- 整理并统一了 `ayugespidertools.common.multiplexing` 中 `ReuseOperation` 的函数参数名。([1cad13a](https://github.com/shengchenyang/AyugeSpiderTools/commit/1cad13a94449dafa2f988fdd825fe282c2368dec))

注:
1. 以上变动比较影响用户的是 `AiohttpRequest` 的部分,为不兼容的重构部分。其它部分如果未在项目中使用则完全不影响库的正常运行。
2. `AiohttpRequest` 新功能介绍文档请在 [ayugespidertools aiohttp](https://ayugespidertools.readthedocs.io/en/latest/topics/downloader-middleware.html#aiohttp) 中查看。

New features

- 升级 `ua` 数据为新版本,并且将其放入 `data` 中的 `browsers.json` 文件中,修改获取 `ua` 的方式。([7d08f85](https://github.com/shengchenyang/AyugeSpiderTools/commit/7d08f853a7ca0ad9b860a8cc0e550c1b0b66e2f0),[7a905a3](https://github.com/shengchenyang/AyugeSpiderTools/commit/7a905a3403801bb6ed0d453d6d87698eb0fd4ce4))
- `oss` 上传文件资源场景支持列表类型,现在可通过 `mongodb` 存储场景将 `oss` 相关的 `AyuItem` 字段设置为列表类型,在 [demo_oss_super](https://github.com/shengchenyang/DemoSpider/blob/3.10.x/DemoSpider/spiders/demo_oss_super.py) 中查看示例。([5946c54](https://github.com/shengchenyang/AyugeSpiderTools/commit/5946c54144f30503090d7f09ec6a88a0b66427f9), [e553152](https://github.com/shengchenyang/AyugeSpiderTools/commit/e553152773f9fe7aee1fdd118a9bb6327daf52ef))
- 增加从 `VIT_DIR` 中 `.conf` 的 `ini` 配置解析方法 `get_cfg`,以方便配置统一存放管理和保护隐私,在 [demo_conf](https://github.com/shengchenyang/DemoSpider/blob/3.10.x/DemoSpider/spiders/demo_conf.py) 中查看示例。([dd2485b](https://github.com/shengchenyang/AyugeSpiderTools/commit/dd2485bf28ddf4cc9a08b464f9baf7af39bf7587))
- `aiohttp` 请求方式改为更人性化的,且与 `aiohttp` 请求参数保持一致的体验。以减少用户使用,理解和维护成本。([1cad13a](https://github.com/shengchenyang/AyugeSpiderTools/commit/1cad13a94449dafa2f988fdd825fe282c2368dec))

注:
1. 其它存储场景的 `oss` 暂不支持列表形式,需自行实现,可自行按照示例添加自行打包。

Bug fixes

- 修复轨迹生成时关于抖动出错的问题。([6ad6958](https://github.com/shengchenyang/AyugeSpiderTools/commit/6ad69583647fc3a4261f7a4ad4521c22580cc1ab))
- 修复自使用的 `json` 解析方法的错误。([a1d7aac](https://github.com/shengchenyang/AyugeSpiderTools/commit/a1d7aac2c826807c4838e4fbd31de6e637cab963))

注:
1. 这里的问题修复都是非框架主要功能,不影响 `scrapy` 的扩展功能使用。

Code optimizations

- 升级 `aiohttp` 依赖版本。([5b448e5](https://github.com/shengchenyang/AyugeSpiderTools/commit/5b448e5991cd7e26b6702cdbd1bfcacc9b3ebcce))
- `Makefile` 添加 `git` 相关的配置。([6304b77](https://github.com/shengchenyang/AyugeSpiderTools/commit/6304b772b14daf0880b591e82ff182a66c77bd2e))
- 解决文档 `Edit on GitHub` 出现的链接不对的问题。([6a79f61](https://github.com/shengchenyang/AyugeSpiderTools/commit/6a79f617eb8d0e6834f673199d1ab08f68681df3))
- 文档完善贡献部分。([842300a](https://github.com/shengchenyang/AyugeSpiderTools/commit/842300ad38afd9169e70e2c839128d282a120508))
- 优化 `get_items_except_keys` 方法,提升效率。([d218144](https://github.com/shengchenyang/AyugeSpiderTools/commit/d2181444982995421f34c406e51ca0a053f9db1f))

3.9.8

Deprecations

- 删除新建项目中 `pyproject.toml` 模板。([bb0adf3](https://github.com/shengchenyang/AyugeSpiderTools/commit/bb0adf3083cfdbeace76ddb96c9ac35a6dc4f76d))
- 删除新建项目中 `run.py`, `run.sh`, `README.md`, `requirements.txt` 模板的过度设计,不影响程序功能,按需自行添加。([2a02faa](https://github.com/shengchenyang/AyugeSpiderTools/commit/2a02faa385069ac3a93194296c326dc31228c47b), [cb1393f](https://github.com/shengchenyang/AyugeSpiderTools/commit/cb1393f70f49e4f956adecc4be5126871a97c3df))
- 更新 `spider` 模板内容,保证示例的稳定,为了通用性去除 `type hint`(请按需自行添加,`DemoSpider` 项目中有示例),并规避一些问题等。([7dc45fd](https://github.com/shengchenyang/AyugeSpiderTools/commit/7dc45fda8af3270d713fc21d9feda3ca8d6ea739))
- `EncryptOperation` 改名为 `Encrypt`,不影响库的使用。([5e529ca](https://github.com/shengchenyang/AyugeSpiderTools/commit/5e529ca3eb625637894712a3972ba95a612c1526))
- 删除库中未使用的 `get_files_from_path` 方法。([e0d04d2](https://github.com/shengchenyang/AyugeSpiderTools/commit/e0d04d27a5b1a58eabe785485ed3402f0748c892))

补充:
此弃用和变动并不影响项目中的功能,只涉及一些自动生成的多余配置文件,运行文件等,这些为过度设计(不应替用户强行决定,且未做到完美适配)。

比较喜欢完整项目模版的开发者,则可选择通过 [LazyScraper](https://github.com/shengchenyang/LazyScraper) 项目来更方便地生成项目模版。

New features

- 同步更新 `scrapy` 依赖版本为 `2.11.2`。([1618654](https://github.com/shengchenyang/AyugeSpiderTools/commit/1618654d4c2b9bd4032a52844e29abe17d2ee532))

Bug fixes

- 无。

Code optimizations

- `requests` 相关代码更换为 `urllib` 方式。([f014030](https://github.com/shengchenyang/AyugeSpiderTools/commit/f01403012bcebce0e49c27840dff446aa7ef70fd),[5cd28cc](https://github.com/shengchenyang/AyugeSpiderTools/commit/5cd28ccd6f38d1a37b2d57cf7bc1306c13173d1e))
- `.conf` 模板格式整理,修改模板为英文,以解决中英文混编下的格式问题。([f6f0e43](https://github.com/shengchenyang/AyugeSpiderTools/commit/f6f0e43bd5fcced5f724882606941fd033a56156),[01d02a1](https://github.com/shengchenyang/AyugeSpiderTools/commit/01d02a19ee275fe80c52d696dee39500d35c9581),[8ded926](https://github.com/shengchenyang/AyugeSpiderTools/commit/8ded926de0a04680ce91fd07bfde36d478bfda5e))
- 添加 `.editorconfig` 配置。([d175c6e](https://github.com/shengchenyang/AyugeSpiderTools/commit/d175c6e0ddfaf3dcc105c62ada422c9f907388cb))
- `poetry` 依赖更新。([f783546](https://github.com/shengchenyang/AyugeSpiderTools/commit/f78354616c3e95d8e00238e8970fe332373a0273))
- 文档更新。
- `mongodb` 存储场景中 `pymongo` 依赖版本及应用场景的判定逻辑修改,由通过 `py` 版本来判定改为由 `pymongo` 依赖版本来判定。目前本库在 `py3.11` 及以上还是会安装 `^4.5.0` 版本的 `pymongo`,不影响旧项目功能。([625ad1c](https://github.com/shengchenyang/AyugeSpiderTools/commit/625ad1cf3a16463aa77744b7ce4d46f94f056bab))

补充解释:若 `py 3.11` 及以上则使用 `^4.5.0` 版本的 `pymongo` 来支持 `3.6` 及以上版本的 `MongoDB` 来解决 `motor` 的异步存储问题;若 `py3.11` 以下则使用 `3.13.0` 的 `pymongo` 版本来与目前一致。 ([issue 11](https://github.com/shengchenyang/AyugeSpiderTools/issues/11))

Page 1 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.