-
Notifications
You must be signed in to change notification settings - Fork 118
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
[BUG]今天下午突然报错 #102
Comments
same,问题也复现在我这里 |
我试了下过去的EXE版本,是可以用的,所以应该是PY F2这边出现了什么问题,搜了一下实在不懂只能等了 |
问题原因抖音的作品接口更新了视频里的比特率列表, 手动修复
# 修复前
@property
def video_bit_rate(self):
bit_rate_data = self._get_list_attr_value("$.aweme_list[*].video.bit_rate")
return [
(
[aweme["bit_rate"]]
if isinstance(aweme, dict)
else (
[aweme[0]["bit_rate"]]
if len(aweme) == 1
else [item["bit_rate"] for item in aweme]
)
)
for aweme in bit_rate_data
]
# 修复后
@property
def video_bit_rate(self):
bit_rate_data = self._get_list_attr_value("$.aweme_list[*].video.bit_rate")
def extract_bit_rate(aweme):
if not aweme:
return []
if isinstance(aweme, dict):
return [aweme.get("bit_rate", 0)]
if isinstance(aweme, list):
return [item.get("bit_rate", 0) for item in aweme]
return []
return [extract_bit_rate(aweme) for aweme in bit_rate_data]
# 修复前
@property
def video_bit_rate(self):
bit_rate_data = self._get_list_attr_value(
"$.aweme_detail.video.bit_rate",
)
return [
(
[aweme["bit_rate"]]
if isinstance(aweme, dict)
else (
[aweme[0]["bit_rate"]]
if len(aweme) == 1
else [item["bit_rate"] for item in aweme]
)
)
for aweme in bit_rate_data
]
# 修复后
@property
def video_bit_rate(self):
bit_rate_data = self._get_list_attr_value("$.aweme_detail.video.bit_rate")
def extract_bit_rate(aweme):
if not aweme:
return []
if isinstance(aweme, dict):
return [aweme.get("bit_rate", 0)]
if isinstance(aweme, list):
return [item.get("bit_rate", 0) for item in aweme]
return []
return [extract_bit_rate(aweme) for aweme in bit_rate_data] |
非常感谢!!!请问这个commit 原本应该是更新代码文件的是嘛?:3 |
非常感谢,已经手动修改成功 |
你的问题是公开的,请注意删除个人敏感内容再上传INFO App: douyin
INFO 主配置路径:F:\douyin4\venv\lib\site-packages\f2\conf\app.yaml
INFO 自定义配置路径:F:\douyin4\venv\lib\site-packages\f2\conf\app.yaml
INFO Version 0.0.1.5
INFO 开始爬取用户:MS4wLjABAAAAwiqMUr1NyBcwRFIwFfxUwcX9IJq2sYGqbOTtYTlifng-8
Z9Yk_Tgeev21XVFLlIc 发布的作品
INFO 开始爬取第 0 页
Traceback (most recent call last):
File "C:\Users\15920\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\15920\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "F:\douyin4\venv\Scripts\f2.exe_main.py", line 7, in
sys.exit(main())
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "F:\douyin4\venv\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\cli.py", line 443, in douyin
ctx.invoke(set_cli_config, **kwargs)
File "F:\douyin4\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "F:\douyin4\venv\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "F:\douyin4\venv\lib\site-packages\f2\cli\cli_commands.py", line 135, in set_cli_config
asyncio.run(run_app(kwargs))
File "C:\Users\15920\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\15920\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "F:\douyin4\venv\lib\site-packages\f2\cli\cli_commands.py", line 144, in run_app
await app_module.main(kwargs)
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\handler.py", line 1484, in main
await mode_function_mapmode
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\handler.py", line 264, in handle_user_post
self.kwargs, aweme_data_list._to_list(), user_path
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\filter.py", line 345, in _to_list
attr_values = getattr(self, key)
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\filter.py", line 243, in video_bit_rate
return [
File "F:\douyin4\venv\lib\site-packages\f2\apps\douyin\filter.py", line 249, in
if len(aweme) == 1
TypeError: object of type 'NoneType' has no len()
详细描述错误
已经尝试包括更换COOKIE,重启路由器,重新安装最新版PY F2等操作,故障依旧存在
系统平台
Q:你在哪个平台(Win/Linux/Mac)上运行?你使用的是什么浏览器?你使用的是什么终端软件?你使用的F2是什么版本?
A: WIN10 X64 EDGE浏览器,F2最新版 WT
The text was updated successfully, but these errors were encountered: