Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.0.1.5 pw2累计更新修复 24/Feb/24 - 24/Apr/04 #68

Merged
merged 164 commits into from
Apr 4, 2024

Conversation

Johnserf-Seed
Copy link
Owner

[0.0.1.5] - 2024-04-04

Added

Changed

  • 修改douyin主页收藏模式为collection
  • 更正douyin文档user-mix方法
  • 修改F2版本号输出
  • 修改douyintiktok帮助信息
  • 优化douyintiktokutilsmsTokenttwidsec_user_idaweme_idwebcast_id,具体请求错误的输出
  • 明确douyintiktok所有fetch函数返回为过滤器类型
  • 更新了F2版本号的导入
  • 优化tiktokhandler处理播放列表的逻辑
  • 优化douyintiktok中对具体请求错误的输出
  • 更正douyintiktokcollects_id类型导致的多次转换
  • 更正tiktokhandler多种获取用户信息方法的参数
  • 添加base_downloader对重命名文件时的异常处理
  • 更新_dlhead请求Content-Length失效时调用get方法
  • 更新douyintiktok接口文档代码片段
  • 更新douyintiktokcli中的handler_auto_cookie方法
  • 更新douyintiktokcli中的handler_naming方法
  • 更新douyintiktok--mode统一choice管理
  • 更新F2帮助说明格式
  • 统一了douyin关注粉丝用户的total字段
  • 修改下载逻辑以提高性能
  • 更新douyintiktok数据库字段(需要删除旧数据库或迁移)
  • 优化douyintiktokhandler模块注释表达与方法参数格式
  • 重构了所有handle方法的调用
  • 重构了所有fetch方法的返回类型
  • 调整douyin mix作品在没有更多数据时提前break
  • 调整tiktok获取用户数据去除地区参数
  • 优化在适当的位置yield作品数据
  • 修改日志输出级别
  • 重构数据库异常类
  • 重构文件异常类
  • 重构接口异常类
  • 完善i18n消息

Deprecated

  • 弃用douyin UserLiveFilter的无用方法
  • 弃用douyin PostDetailFilter的无用方法

Removed

  • 删除文档旧版本-d指令
  • 移除tiktokpost\detail接口示例
  • 删除无用的__init__.py文件
  • 删除douyintiktokcli下的get_cookie_from_browser方法
  • 删除example示例
  • 删除无用导入
  • 删除apps中db模块的aiosqlite导入与错误处理

Fixed

  • 修复本地化服务([BUG]翻译代码逻辑错误 #58)
  • 修复douyin关注用户数据过滤器_to_list方法的排除字段
  • 修复douyin数据过滤器时间戳类型

Security

  • 更新rich版本到13.7.1
  • 更新douyin接口版本到19.5.0

收藏作品(collect) -> 收藏作品(collection)
对[*]使用self._get_list_attr_value方法
1、优化日志内容输出
2、优化http状态码异常
1、优化日志内容输出
2、优化http状态码异常
改用中文符号
1、优化日志内容输出
2、优化http状态码异常
修改后的正则表达式将匹配http与https
1、添加了对webcast_id的错误捕获
2、优化日志内容输出
3、优化http状态码异常
_to_list方法只针对多组数据
max_cursor: int = 0
page_counts: int = 20
max_counts: int = None
## [0.0.1.5] - 2024-04-04

### Added

- 添加安全政策汇报
- 添加`run_app`时输出版本号
- 添加`douyin`用户收藏夹下载
- 添加`douyin`的`filter`对非法收藏夹名字符的处理
- 添加`douyin`用户音乐收藏下载
- 添加`douyin`音乐歌词json转lrc方法
- 添加`douyin`用户收藏音乐下载任务
- 添加`douyin`配置`--lyric`
- 添加`f2 utils`的`get_cookie_from_browser`方法
- 添加`f2 utils`的`check_invalid_naming`方法
- 添加`f2 utils`的`merge_config`方法
- 添加`douyin`粉丝用户接口方法
- 添加`douyin`关注用户接口方法
- 添加`douyin`,`tiktok`数据过滤器的原始字段
- 添加对30位时间戳进行格式化
- 添加测试抖音原声歌词转换
- 添加获取抖音用户粉丝代码片段
- 添加获取抖音用户关注代码片段
- 添加`fetch`方法的`timeout`参数,避免请求过于频繁
- 添加`douyin`用户收藏夹代码片段
- 添加对丢失链接的重试逻辑
- 添加`自定义UA`生成`XBogus`参数
- 添加`douyin`,`tiktok`对`UserProfile`请求内容为空的报错

### Changed

- 修改`douyin`主页收藏模式为`collection`
- 更正`douyin`文档`user-mix`方法
- 修改`F2`版本号输出
- 修改`douyin`,`tiktok`帮助信息
- 优化`douyin`,`tiktok`的`utils`中`msToken`,`ttwid`,`sec_user_id`,`aweme_id`,`webcast_id`,具体请求错误的输出
- 明确`douyin`,`tiktok`所有`fetch`函数返回为过滤器类型
- 更新了F2版本号的导入
- 优化`tiktok`的`handler`处理播放列表的逻辑
- 优化`douyin`,`tiktok`中对具体请求错误的输出
- 更正`douyin`,`tiktok`受`collects_id`类型导致的多次转换
- 更正`tiktok`的`handler`多种获取用户信息方法的参数
- 添加`base_downloader`对重命名文件时的异常处理
- 更新`_dl`的`head`请求`Content-Length`失效时调用`get`方法
- 更新`douyin`,`tiktok`接口文档代码片段
- 更新`douyin`,`tiktok`在`cli`中的`handler_auto_cookie`方法
- 更新`douyin`,`tiktok`在`cli`中的`handler_naming`方法
- 更新`douyin`,`tiktok`的`--mode`统一`choice`管理
- 更新`F2`帮助说明格式
- 统一了`douyin`关注粉丝用户的`total`字段
- 修改下载逻辑以提高性能
- 更新`douyin`,`tiktok`数据库字段(需要删除旧数据库或迁移)
- 优化`douyin`,`tiktok`的`handler`模块注释表达与方法参数格式
- 重构了所有`handle`方法的调用
- 重构了所有`fetch`方法的返回类型
- 调整`douyin` `mix`作品在没有更多数据时提前`break`
- 调整`tiktok`获取用户数据去除地区参数
- 优化在适当的位置`yield`作品数据
- 修改日志输出级别
- 重构数据库异常类
- 重构文件异常类
- 重构接口异常类
- 完善`i18n`消息

### Deprecated

- 弃用`douyin` `UserLiveFilter`的无用方法
- 弃用`douyin` `PostDetailFilter`的无用方法

### Removed

- 删除文档旧版本`-d`指令
- 移除`tiktok`的`post\detail`接口示例
- 删除无用的`__init__.py`文件
- 删除`douyin`,`tiktok`:`cli`下的`get_cookie_from_browser`方法
- 删除`example`示例
- 删除无用导入
- 删除`apps`中db模块的`aiosqlite`导入与错误处理

### Fixed

- 修复本地化服务
- 修复`douyin`关注用户数据过滤器`_to_list`方法的排除字段
- 修复`douyin`数据过滤器时间戳类型

### Security

- 更新`rich`版本到`13.7.1`
- 更新`douyin`接口版本到`19.5.0`
@Johnserf-Seed Johnserf-Seed merged commit 731cf02 into main Apr 4, 2024
1 check passed
Copy link

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Worth considering though. View full project report here.

lyric_name = music_data_dict.get("title") + "_lyric"
lyric_url = music_data_dict.get("lyric_url")

if music_url != None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if music_url != None:
if music_url is not None:

None is a singleton data type, so should be compared using is not. More.


# 构建range请求头 (Build range request header)
range_headers = (
{"Range": "bytes={}-".format(start_byte)} if start_byte else {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f-string is easier to read, write, and less computationally expensive than legacy string formatting. More details.

response.raise_for_status()

if (
response.headers.get("Content-Length") != None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
response.headers.get("Content-Length") != None
response.headers.get("Content-Length") is not None

None is a singleton data type, so should be compared using is not. More details.

idx += 3
self.params = '%s&X-Bogus=%s' % (url_path, xb_)
self.params = "%s&X-Bogus=%s" % (url_path, xb_)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.params = "%s&X-Bogus=%s" % (url_path, xb_)
self.params = f"{url_path}&X-Bogus={xb_}"

f-string is easier to read, write, and less computationally expensive than legacy string formatting. More info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant