-
Notifications
You must be signed in to change notification settings - Fork 91
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
Conversation
收藏作品(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
并使用black格式化
## [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`
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 {} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
[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
粉丝用户接口方法(可以获取用户主页数据吗 包括简介粉丝那些[QUESTION] #59)douyin
关注用户接口方法(可以获取用户主页数据吗 包括简介粉丝那些[QUESTION] #59)douyin
,tiktok
数据过滤器的原始字段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
函数返回为过滤器类型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