-
Notifications
You must be signed in to change notification settings - Fork 100
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
[FEATRUE / REQUEST]抖音下载时遇到文件名过长或有特殊字符会报错停止,后续能否规避,遇到单条下载失败的跳过继续下载后面媒体文件。 #179
Comments
遇到类似的问题 |
如果是文件名称过长导致的失败。可通过解除Windows系统中文件名和目录路径的最大长度限制解决。 |
我把源码改成用视频id了,但是我不知道作者为什么不用id,想知道原因 |
我不知道你说的视频id是什么 |
抖音下载全部作品时遇到文件名过长或有特殊字符会报错停止,后续能否规避,遇到单条下载失败的跳过继续下载后面媒体文件。
例如抖音下载下面链接全部作品,每次都会卡在同一条上,报错后程序即刻终止,后续文件无法下载。https://www.douyin.com/user/MS4wLjABAAAAaQSQAWWPRAq96jzhfadyAZV4-KOjQjqH1eR-iNWhJys
具体报错内容如下:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Anaconda\envs\python3.11\Scripts\f2.exe_main.py", line 7, in
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\apps\douyin\cli.py", line 441, in douyin
ctx.invoke(set_cli_config, **kwargs)
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\core.py", line 783, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\cli\cli_commands.py", line 182, in set_cli_config
asyncio.run(run_app(kwargs))
File "C:\Anaconda\envs\python3.11\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\asyncio\runners.py", line 118, in run
return self.loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\cli\cli_commands.py", line 190, in run_app
await app_module.main(kwargs)
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\apps\douyin\handler.py", line 1849, in main
await mode_function_mapmode
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\apps\douyin\handler.py", line 257, in handle_user_post
await self.downloader.create_download_tasks(
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\apps\douyin\dl.py", line 140, in create_download_tasks
await self.execute_tasks()
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\dl\base_downloader.py", line 570, in execute_tasks
await asyncio.gather(*self.download_tasks)
File "C:\Anaconda\envs\python3.11\Lib\site-packages\f2\dl\base_downloader.py", line 170, in download_file
async with aiofiles.open(
File "C:\Anaconda\envs\python3.11\Lib\site-packages\aiofiles\base.py", line 78, in aenter
self.obj = await self.coro
^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\site-packages\aiofiles\threadpool_init.py", line 80, in open
f = yield from loop.run_in_executor(executor, cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Anaconda\envs\python3.11\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: '\\hy-nas\Data\douyin_f2\douyin_yaml\download\douyin\post\Ss_L\2024-09-05 18-40-18_每天有氧的时候都在后悔这b嘴怎么就这么馋为什么要吃成一个胖子什么肥一定要我本人亲自减我发誓我再也不吃了老天奶啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈要发疯了啊啊啊啊啊#精神状态belike......一个胖子什么肥一定要我本人亲自减我发誓我再也不吃了老天奶啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈要发疯了啊啊啊啊啊#精神状态belike#痛苦面具#今天你锻炼了吗#抽象艺术#健身打卡_video.tmp'
The text was updated successfully, but these errors were encountered: