Command Line
The F2
configuration file is independent of CLI
command parameters and has the lowest priority
.
Temporary CLI Configuration
CLI
command parameters have the highest priority, allowing you to change the settings without modifying the configuration file. For example, you can use CLI
parameters to download all liked
posts from a Douyin user.
This means you can temporarily download User A's livestream, User B's posts, and User C's liked videos via the CLI
.
$ f2 dy -c A.yaml -M live -u https://live.douyin.com/xxxxxxxxx
$ f2 dy -c B.yaml -M post
$ f2 dy -c C.yaml -M like
Give it a try!
🚩 TODO
In future versions, operations will be simplified. You won’t need to specify the user’s livestream room ID to switch to the livestream download mode. For more CLI commands, please check the CLI Reference.
Important
- There are no restrictions on naming conventions. You can use
dy-A.yaml
,dy-B.yaml
,tk-A.yaml
,tk-B.yaml
to differentiate user configurations across different apps. - Configuration operations are universal. The example uses a
Douyin
configuration file, but the same process applies toTikTok
and otherF2
applications.
Advanced Usage
If you don’t want to create multiple configuration files, use the main configuration file. When using the main configuration file, there’s no need to specify -c
. Just set it in the application default/main config (app.yaml)
.
To download all posted
videos from a Douyin user, set mode: post
.
$ f2 dy
$ f2 dy
$ f2 dy
To download all liked
videos from a Douyin user, set mode: like
in the CLI
.
$ f2 dy -M like
$ f2 dy -M like
$ f2 dy -M like
To download a single
video from Douyin:
$ f2 dy -M one -u https://v.douyin.com/iRNBho6u/
$ f2 dy -M one -u https://v.douyin.com/iRNBho6u/
$ f2 dy -M one -u https://v.douyin.com/iRNBho6u/
F2 will intelligently recognize links in messy text and supports both short and long URLs.
🔗 Supported Link Formats
# DouYin
# 带有其他信息的链接
4.38 12/09 [email protected] zTL:/ 你别太帅了郑润泽# 现场版live # 音乐节 # 郑润泽 https://v.douyin.com/iR2nEj44/ 复制此链接,打开Dou音搜索,直接观看视频!
7.64 gOX:/ [email protected] 05/14 世界这本书 又多读了一页。冰岛????旅行记# 冰岛 https://v.douyin.com/iR2syBRn/ 复制此链接,打开Dou音搜索,直接观看视频!
# 短链
https://v.douyin.com/iRNBho6u/ # 视频
https://v.douyin.com/iR2syBRn/ # 图集
https://v.douyin.com/iRxM1Xut/ # 直播
# 完整链接
https://www.douyin.com/video/7298145681699622182 # 视频
https://www.douyin.com/note/7285559250619813155 # 图集
https://live.douyin.com/895627289314 # 直播
💡 Important Notes
- The
interval
parameter is global and applies to all modes. You can set-i
all inCLI
to download all posts. - In
CLI
mode, if the input text contains additional information, wrap it in double quotes""
👇
$ f2 dy -M one -u "7.64 gOX:/ [email protected] 05/14 世界这本书 又多读了一页。冰岛????旅行记# 冰岛 https://v.douyin.com/iR2syBRn/ 复制此链接,打开Dou音搜索,直接观看视!"