Johnserf-Seed / f2

High-speed downloader for multiple platforms
https://johnserf-seed.github.io/f2/
Apache License 2.0
313 stars 61 forks source link

[FEATRUE / REQUEST]https://www.douyin.com/aweme/v1/web/aweme/detail/?为空的问题 #98

Open NightMoonIsland opened 1 month ago

NightMoonIsland commented 1 month ago

下载合集时,能不能有一个策略能让已经下载的视频尽量少调用这个接口,似乎这个接口时不时会限流

Johnserf-Seed commented 1 month ago

只有不是合集作品的链接才会调用这个接口

NightMoonIsland commented 1 month ago

只有不是合集作品的链接才会调用这个接口

一样,比如下载某个用户下的所有作品,如果已存在尽量少调用它

NightMoonIsland commented 1 month ago

只有不是合集作品的链接才会调用这个接口

合集也会用这个,因为要获得作品的发布时间

Johnserf-Seed commented 1 month ago

只有不是合集作品的链接才会调用这个接口

一样,比如下载某个用户下的所有作品,如果已存在尽量少调用它

如果通过aweme_id查询用户信息只能靠这个接口

Johnserf-Seed commented 1 month ago

只有不是合集作品的链接才会调用这个接口

合集也会用这个,因为要获得作品的发布时间

不需要,合集走合集接口

zhengjinzhj commented 1 month ago

这个接口是不是不能用了? 我在网页上重新登录拿的cookie,这个接口一样的返回空 image

zhengjinzhj commented 1 month ago

@Johnserf-Seed 这个接口现在不能用了吗?https://www.douyin.com/aweme/v1/web/aweme/detail/?

arloan commented 3 weeks ago

下载单个视频也同样错误。

$ ~/.local/bin/f2 dy -M one -u https://www.douyin.com/video/7382554584138419493 --auto-cookie safari
INFO     App: douyin                                                                                                                                                              
是否要使用命令行的参数更新配置文件?`/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/conf/app.yaml` [Y/n]: 
配置文件已更新!
INFO     主配置路径:/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/conf/app.yaml                                                                              
INFO     自定义配置路径:/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/conf/app.yaml                                                                          
INFO     Version 0.0.1.5                                                                                                                                                          
INFO     开始爬取作品:7382554584138419493                                                                                                                                        
WARNING  第 1 次响应内容为空, 状态码: 200,                                                                                                                                        
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&coo
         kie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=122.0.0.0&browser_online=true&engin
         e_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&msToken
         =jSwRnnOpkni1NavKG3zCoGmjwlUQxcFzGKw6X3cdvSEB2lr85n9YXtp1faGgef1IZxAy_Tr0yb9AXLQqmOIVSInOc0ab6IGdI5mRi59V1GYsoWxPKETAut-SjWxYhA==&aweme_id=7382554584138419493&X-Bogus=DF
         SzswVYYtxANHT3tWZ07M9WX7jn                                                                                                                                               
WARNING  第 2 次响应内容为空, 状态码: 200,                                                                                                                                        
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&coo
         kie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=122.0.0.0&browser_online=true&engin
         e_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&msToken
         =jSwRnnOpkni1NavKG3zCoGmjwlUQxcFzGKw6X3cdvSEB2lr85n9YXtp1faGgef1IZxAy_Tr0yb9AXLQqmOIVSInOc0ab6IGdI5mRi59V1GYsoWxPKETAut-SjWxYhA==&aweme_id=7382554584138419493&X-Bogus=DF
         SzswVYYtxANHT3tWZ07M9WX7jn                                                                                                                                               
WARNING  第 3 次响应内容为空, 状态码: 200,                                                                                                                                        
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&coo
         kie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=122.0.0.0&browser_online=true&engin
         e_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&msToken
         =jSwRnnOpkni1NavKG3zCoGmjwlUQxcFzGKw6X3cdvSEB2lr85n9YXtp1faGgef1IZxAy_Tr0yb9AXLQqmOIVSInOc0ab6IGdI5mRi59V1GYsoWxPKETAut-SjWxYhA==&aweme_id=7382554584138419493&X-Bogus=DF
         SzswVYYtxANHT3tWZ07M9WX7jn                                                                                                                                               
WARNING  第 4 次响应内容为空, 状态码: 200,                                                                                                                                        
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&coo
         kie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=122.0.0.0&browser_online=true&engin
         e_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&msToken
         =jSwRnnOpkni1NavKG3zCoGmjwlUQxcFzGKw6X3cdvSEB2lr85n9YXtp1faGgef1IZxAy_Tr0yb9AXLQqmOIVSInOc0ab6IGdI5mRi59V1GYsoWxPKETAut-SjWxYhA==&aweme_id=7382554584138419493&X-Bogus=DF
         SzswVYYtxANHT3tWZ07M9WX7jn                                                                                                                                               
WARNING  第 5 次响应内容为空, 状态码: 200,                                                                                                                                        
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190500&version_name=19.5.0&coo
         kie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=122.0.0.0&browser_online=true&engin
         e_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&msToken
         =jSwRnnOpkni1NavKG3zCoGmjwlUQxcFzGKw6X3cdvSEB2lr85n9YXtp1faGgef1IZxAy_Tr0yb9AXLQqmOIVSInOc0ab6IGdI5mRi59V1GYsoWxPKETAut-SjWxYhA==&aweme_id=7382554584138419493&X-Bogus=DF
         SzswVYYtxANHT3tWZ07M9WX7jn                                                                                                                                               
请前往QA文档 https://johnserf-seed.github.io/f2/question-answer/qa.html 查看相关帮助
ERROR    获取端点数据失败, 次数达到上限                                                                                                                                           
ERROR    无效响应类型。响应类型: <class 'NoneType'>                                                                                                                               

Traceback (most recent call last):
  File "/Users/anonymous/.local/bin/f2", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/apps/douyin/cli.py", line 443, in douyin
    ctx.invoke(set_cli_config, **kwargs)
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/cli/cli_commands.py", line 135, in set_cli_config
    asyncio.run(run_app(kwargs))
  File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/cli/cli_commands.py", line 144, in run_app
    await app_module.main(kwargs)
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/apps/douyin/handler.py", line 1484, in main
    await mode_function_map[mode](DouyinHandler(kwargs))
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/apps/douyin/handler.py", line 196, in handle_one_video
    user_path = await self.get_or_add_user_data(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/apps/douyin/handler.py", line 139, in get_or_add_user_data
    current_user_data = await self.handler_user_profile(sec_user_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/f2/apps/douyin/handler.py", line 86, in handler_user_profile
    params = UserProfile(sec_user_id=sec_user_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/anonymous/.local/pipx/venvs/f2/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for UserProfile
sec_user_id
  none is not an allowed value (type=type_error.none.not_allowed)
Johnserf-Seed commented 3 weeks ago

https://github.com/Johnserf-Seed/TikTokDownload/issues/727#issuecomment-2172570868