Comments (5)
我也是这个问题
1.Douyin 2.TikTok: [1/2]: 1
INFO 主配置: conf/app.yaml
INFO 自定义配置: None
Traceback (most recent call last):
File "D:\Program Files\f2\TikTokTool.py", line 51, in
clisint(selected) - 1
File "D:\Program Files\f2\venv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\cli.py", line 429, in douyin
ctx.invoke(set_cli_config, **kwargs)
File "D:\Program Files\f2\venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\cli\cli_commands.py", line 134, in set_cli_config
asyncio.run(run_app(kwargs))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\cli\cli_commands.py", line 142, in run_app
await app_module.main(kwargs)
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\handler.py", line 865, in main
await mode_function_mapmode
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\handler.py", line 159, in handle_one_video
aweme_data = await fetch_one_video(aweme_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\handler.py", line 196, in fetch_one_video
return video._to_dict()
^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\filter.py", line 745, in _to_dict
return {
^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\filter.py", line 746, in
prop_name: getattr(self, prop_name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\apps\douyin\filter.py", line 538, in mix_create_time
return timestamp_2_str(
^^^^^^^^^^^^^^^^
File "D:\Program Files\f2\venv\Lib\site-packages\f2\utils\utils.py", line 79, in timestamp_2_str
return datetime.datetime.fromtimestamp(float(timestamp)).strftime(format)
^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: 'None'
from tiktokdownload.
from tiktokdownload.
确实单独下载一个链接的时候会报错 ValueError: could not convert string to float: 'None'
f2 dy -u https://www.douyin.com/video/7322134363515129099 -M one
from tiktokdownload.
#638 (comment)
找到f2包下的utils.py文件 ,形如 ...\venv\Lib\site-packages\f2\utils\utils.py
找到名为 timestamp_2_str 的函数->替换成下面的->保存->重新运行,应该就好了
def timestamp_2_str(
timestamp: Union[str, int, float], format: str = "%Y-%m-%d %H-%M-%S"
) -> str:
"""
将 UNIX 时间戳转换为格式化字符串 (Convert a UNIX timestamp to a formatted string)
Args:
timestamp (int): 要转换的 UNIX 时间戳 (The UNIX timestamp to be converted)
format (str, optional): 返回的日期时间字符串的格式。
默认为 '%Y-%m-%d %H-%M-%S'。
(The format for the returned date-time string
Defaults to '%Y-%m-%d %H-%M-%S')
Returns:
str: 格式化的日期时间字符串 (The formatted date-time string)
"""
print("timestamp is :",timestamp)
if timestamp is None:
return ""
if timestamp == "None":
return ""
return datetime.datetime.fromtimestamp(float(timestamp)).strftime(format)
from tiktokdownload.
临时解决方案 Johnserf-Seed/f2#23 (comment)
from tiktokdownload.
Related Issues (20)
- [BUG]日志文件不正常 HOT 1
- [BUG]CODE429这个问题现在有什么有效的解决办法吗 HOT 25
- 安装 分
- 安装 f2 遇到的问题 HOT 7
- [BUG] f2 一直提示 WARNING 第 3 次响应内容为空, 状态码: 200, HOT 1
- [BUG]f2下载用户发布的作品不全 HOT 4
- [BUG] f2的命名中 {id} 貌似不支持了 HOT 2
- [BUG]只下载得了部分视频,不能下载全部的,重新下载还是,最多下载16个 HOT 4
- [BUG]下载tiktok时提示代理环境有问题 HOT 12
- ValueError: Unknown scheme for proxy URL URL('nulls') HOT 1
- [BUG] ERROR TS文件下载失败: range() arg 3 must not be zero HOT 1
- [BUG]下载自己收藏的视频报错了 HOT 2
- [BUG]下载一直反复刷一个视频
- [BUG] f2 下载页面暂停打印信息了,但是后台依旧在下载 HOT 1
- [BUG] FileNotFoundError: [Errno 2] No such file or directory: HOT 2
- 请问这里面的功能怎么使用 HOT 1
- 看样子,开始摆烂了
- [Feature] 控制台 -n 选项都有什么字段可选?我没找到相关文档或说明
- v1.5版本更改yaml文件中path路径参数后不生效,仍下载到默认C:\Users\用户\Download文件夹[BUG] HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiktokdownload.