Skip to content

Releases: wetrycode/tegenaria

v0.5.0

23 Mar 12:43
Compare
Choose a tag to compare

v0.5.0 (2023-03-23)

Refactor

  • 拆分引擎组件,抽离独立的组件接口,提供自定义组件的能力
  • 移除定时轮询接口
  • 优化引擎内部对单个请求进行调度的流程
  • 移除Context全局管理器,在引擎端引入context计数器
  • 移除RequestContext对象内存池,解决多协程场景下Request复用错误的问题
  • Request对象的Parser类型由func(resp *Context, req chan<- *Context) error方法改为string方便对Request对象进行序列化
  • 优化爬虫停止判断策略,增加组件接口判断逻辑,允许用户自定义爬虫终止逻辑

Features

  • 新增分布式抓取组件,提供分布式部署和抓取的能力

  • 新增gRPC和http接口,提供实时远程控和查询制爬虫状态的能力

  • 引擎内部新增一个运行时的状态管理器,用于控制爬虫的启停

  • Request对象新增一个DoNotFilter字段,支持Request粒度下的去重控制

  • Request对象新增方法ToMap() (map[string]interface{}, error),用于将Request对象进行序列化

  • Request对象新增方法RequestFromMap(src map[string]interface{}, opts ...RequestOption) *Request,用于将map[string]interface{}对象进行反序列化为Request对象

  • Request新增初始化选项RequestWithPostForm(payload url.Values) RequestOption用于接收application/x-www-form-urlencoded参数

  • Request新增初始化选项RequestWithBodyReader(body io.Reader) RequestOption用于从内存读取二进制数据

  • Request新增初始化选项RRequestWithDoNotFilter(doNotFilter bool) RequestOption用于控制Request对象是否参与去重

  • Response新增一个接口WriteTo(writer io.Writer) (int64, error),允许用户将response写入自定义的io.Writer,例如一个本地文件io实例,实现文件下载

  • 新增ComponentInterface组件接口,允许用户自定义组件

  • 新增DistributedWorkerInterface分布式节点控制接口允许用户实现自定义对节点的控制逻辑

Style

  • 重命名RequestResponseHeaderHeaders

  • 重命名CacheInterface接口的所有方法以大写字母开头

v0.4.6

27 Jan 07:45
f916e63
Compare
Choose a tag to compare

更新内容

Feature

  • 新增定时任务方式启动工能并通过命令行方式设置相关的参数

  • 异常日志新增调用栈内容

  • 移除不必要的异常捕获

  • 允许构建请求过程通过参数设置当前Request对象是否需要去重处理

Style

  • 格式化代码

v0.4.5

21 Jan 12:48
Compare
Choose a tag to compare

Feature

  • 新增对分布式抓取的支持

  • 新增一个基于redis实现的分布式组件

  • 新增抓取过程诸如START/STOP/ERROR事件捕获和处理机制并提供接口实现对事件自定义处理

  • 新增一个支持分布式抓取数据指标统计的组件

Refactor

  • 重构数据抓取流程,简化引擎组件

  • 优化单条数据抓取全生命周期的管理

  • 优化配置文件加载逻辑,支持默认配置和项目自定义配置同步加载

Chore

  • 补充注释及其相关的文档

  • 更换证书为MIT

Release v0.3.0

15 Feb 09:01
Compare
Choose a tag to compare
fix:add retract

Release v0.1.3

15 Feb 05:15
Compare
Choose a tag to compare

Undo the wrong version number

Release v0.1.2-fix

12 Feb 08:24
Compare
Choose a tag to compare

fix version error

v0.1.2

05 Feb 16:37
Compare
Choose a tag to compare

FEATURE

  • Add download request limit number

v0.1.1: Fix the problem that the request is not fully processed and the proce…

01 Feb 11:22
Compare
Choose a tag to compare

BUGFIX

  • Fix the problem that the request is not fully processed and the process exits

FEATURE

  • Remove cache channel and update data flow

DOCS

  • Update data flow chart

Release v0.1.0

29 Jan 09:55
Compare
Choose a tag to compare

BUGFIX

  • fix request body Fingerprint error

DOCS

  • Add docs