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

[Not A BUG] 好像没法解析视频了?更新到最新版且替换了cookie #491

Open
blue-cat opened this issue Oct 24, 2024 · 18 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@blue-cat
Copy link

发生错误的平台?

抖音

发生错误的端点?

API-V1/Web APP
我本地部署的没法解析,使用博主的wtf的网页也解析不了

提交的输入值?

如:短视频链接

是否有再次尝试?

是,很长时间了

你有查看本项目的自述文件或接口文档吗?

有,并且很确定该问题是程序导致的。提示错误:
{"detail":{"code":400,"message":"An error occurred.","support":"Please contact us on Github: https://github.com/Evil0ctal/Douyin_TikTok_Download_API","time":"2024-09-30 01:46:16","router":"/api/hybrid/video_data","params":{"url":"https://v.douyin.com/CeiH5oqt/"}}}

@blue-cat blue-cat added the BUG Something isn't working label Oct 24, 2024
@blue-cat blue-cat changed the title [BUG] 好像没法解析视频了? [BUG] 好像没法解析视频了?更新到最新版且替换了cookie Oct 24, 2024
@a5582323
Copy link

你不是一个人,我昨天试了八十遍,cookie换了8遍

@Evil0ctal
Copy link
Owner

image

@Evil0ctal
Copy link
Owner

我这边好像没办法复现你们的问题,你们使用的是登录后的Cookie吗?

@a5582323
Copy link

我这边好像没办法复现你们的问题,你们使用的是登录后的Cookie吗?

是登录后的cookie

@Evil0ctal
Copy link
Owner

那有点奇怪了,你看看能不能请求别的接口,如评论,个人主页视频之类的。

@a5582323
Copy link

a5582323 commented Oct 25, 2024

那有点奇怪了,你看看能不能请求别的接口,如评论,个人主页视频之类的。

image
这个接口是OK的,评论接口也是OK的

@a5582323
Copy link

经测试,我本机生成的cookie在本机能正常返回,扔到服务器上就不行了

@blue-cat
Copy link
Author

重新试了下,用登陆后的cookie还是不行,我一直用的服务器。
以前也是一样的方式拿的cookie是没问题的。
期待作者看看这个问题

@Evil0ctal
Copy link
Owner

我还是没办法复现出这个问题,我使用本机获取cookie之后放到服务器上也是一切正常的,你们放到服务器上之后是否对项目进行了重启操作?

@lxj0123
Copy link

lxj0123 commented Nov 5, 2024

登录之后获取的cookie有些接口可以解析,有些不行。

@Evil0ctal
Copy link
Owner

登录之后获取的cookie有些接口可以解析,有些不行。

哪些不行呢?

@iJarmin
Copy link

iJarmin commented Nov 7, 2024

同样遇到了问题,附完整报错信息

         zFgf3qJLzMj%3D%3D
程序出现异常,请检查错误信息。
ERROR    无效响应类型。响应类型: <class 'NoneType'>
程序出现异常,请检查错误信息。
INFO:     Shutting down
INFO:     connection closed
INFO:     Finished server process [14104]
ERROR:    Traceback (most recent call last):
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1986, in _run_once
    handle._run()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\server.py", line 68, in serve
    with self.capture_signals():
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 144, in __exit__
    next(self.gen)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\server.py", line 328, in capture_signals
    signal.raise_signal(captured_signal)
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 157, in _on_sigint
    raise KeyboardInterrupt()
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\starlette\routing.py", line 741, in lifespan
    await receive()
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\lifespan\on.py", line 137, in receive
    return await self.receive_queue.get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\queues.py", line 158, in get
    await getter
asyncio.exceptions.CancelledError

Process SpawnProcess-1:
Traceback (most recent call last):
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\_subprocess.py", line 78, in subprocess_started
    target(sockets=sockets)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1986, in _run_once
    handle._run()
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\server.py", line 68, in serve
    with self.capture_signals():
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 144, in __exit__
    next(self.gen)
  File "C:\Users\luca\Downloads\Douyin_TikTok_Download_API-4.0.9\venv\Lib\site-packages\uvicorn\server.py", line 328, in capture_signals
    signal.raise_signal(captured_signal)
  File "C:\Users\luca\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 157, in _on_sigint
    raise KeyboardInterrupt()
KeyboardInterrupt
INFO:     Stopping reloader process [27612]

@Evil0ctal
Copy link
Owner

更换Cookie并且不要修改默认config文件中的其他字段,尤其是User Agent

@jiliangC
Copy link

更换Cookie并且不要修改默认config文件中的其他字段,尤其是User Agent

我也是遇到上面的问题,只修改Cookie其他没动,抖音不能,b站可以

@Evil0ctal
Copy link
Owner

我还是没有办法复现出来

@iHunterDev
Copy link

我目前也遇到了同样的问题,看运行日志是能够正常请求,但是返回为空。

INFO:     10.0.1.4:48060 - "GET / HTTP/1.1" 200 OK
WARNING  第 1 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
WARNING  第 2 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
WARNING  第 3 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
程序出现异常,请检查错误信息。
ERROR    无效响应类型。响应类型: <class 'NoneType'> 

@iHunterDev
Copy link

我目前也遇到了同样的问题,看运行日志是能够正常请求,但是返回为空。

INFO:     10.0.1.4:48060 - "GET / HTTP/1.1" 200 OK
WARNING  第 1 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
WARNING  第 2 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
WARNING  第 3 次响应内容为空, 状态码: 200,                                      
         URL:https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=w
         ebapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=190
         500&version_name=19.5.0&cookie_enabled=true&screen_width=1920&screen_he
         ight=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Fi
         refox&browser_version=124.0&browser_online=true&engine_name=Gecko&engin
         e_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&devic
         e_memory=8&platform=PC&msToken=&aweme_id=7440749140633472296&a_bogus=xJ
         RZQ5LkDigTgV6h5A%2FLfY3q63jVYmQo0SVkMD2flaDOAg39HMOx9exoSmGvukyjNG%2FpI
         eEjy4hbT3ohrQ2y0Hwf9W0L%2F25ksDSkKl5Q5xSSs1X9eghgJ04qmkt5SMx2RvB-rOXmqh
         ZHKRbp09oHmhK4b1dzFgf3qJLzUj%3D%3D                                     
程序出现异常,请检查错误信息。
ERROR    无效响应类型。响应类型: <class 'NoneType'> 

后续:目前我的已经恢复了,暂时的观察情况来看的话,疑似请求量太多了,风控了,休息一下过一段时间就又能访问了,我在中途也尝试换了 Cookie,换了 Cookie 也没有直接生效,还是时间问题。

@Evil0ctal
Copy link
Owner

大概率是你们的Cookie风控了,今天替换了一下演示站点的抖音网页Cookie,目前一切工作正常,见下图:

image

@Evil0ctal Evil0ctal added help wanted Extra attention is needed and removed BUG Something isn't working labels Nov 28, 2024
@Evil0ctal Evil0ctal changed the title [BUG] 好像没法解析视频了?更新到最新版且替换了cookie [Not A BUG] 好像没法解析视频了?更新到最新版且替换了cookie Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants