An open API service indexing awesome lists of open source software.

https://github.com/johnserf-seed/f2

High-speed downloader for multiple platforms
https://github.com/johnserf-seed/f2

api bark bilibili douyin downloader pypi tiktok tools twitter weibo

Last synced: 11 days ago
JSON representation

High-speed downloader for multiple platforms

Awesome Lists containing this project

README

        


Logo

[![Downloads](https://pepy.tech/badge/f2/month)](https://pepy.tech/project/f2)
[![PyPI version](https://badge.fury.io/py/f2.svg)](https://badge.fury.io/py/f2)
[![Dev Branch](https://badgen.net/badge/branch/v0.0.1.7-pw2/blue)](https://github.com/Johnserf-Seed/f2/tree/v0.0.1.7-pw2)
[![Discord](https://img.shields.io/discord/1146473603450282004?label=Discord)](https://discord.gg/3PhtPmgHf8)
[![codecov](https://codecov.io/gh/Johnserf-Seed/f2/graph/badge.svg?token=T9DH4QPZSS)](https://codecov.io/gh/Johnserf-Seed/f2)
[![TikHub](https://img.shields.io/badge/%E8%B5%9E%E5%8A%A9%E5%95%86-TikHub-orange?style=flat-square&logo=tiktok)](https://beta-web.tikhub.io/users/signup?referral_code=6hLcGD94)
[![APACHE-2.0](https://img.shields.io/github/license/johnserf-seed/f2)](https://github.com/Johnserf-Seed/f2/blob/main/LICENSE)

[đŸ‡¨đŸ‡ŗ įŽ€äŊ“中文 readme](https://github.com/Johnserf-Seed/f2/blob/main/README.md) â€ĸ [đŸ‡Ŧ🇧 English readme](https://github.com/Johnserf-Seed/f2/blob/main/README.en.md)

`F2` is a [`Python` library](https://pypi.org/project/f2/) that provides multi-platform content downloading and API data processing. It supports platforms like `DouYin`、`TikTok`、`Twitter`、`WeiBo`, and is easily adaptable to more platforms.

## 🚀 Quick Start

### âš™ī¸ Installation

- [Prerequisites](https://f2.wiki/install#%E5%BF%85%E5%A4%87%E6%9D%A1%E4%BB%B6)
- [Package Manager Installation](https://f2.wiki/install#%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E5%AE%89%E8%A3%85)
- [Compiled Installation](https://f2.wiki/install#%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85)

### ⚡ Quick Use

- [Startup and Execution](https://f2.wiki/quick-start#%E5%90%AF%E5%8A%A8%E5%92%8C%E8%BF%90%E8%A1%8C)
- [What's the Next Step?](https://f2.wiki/quick-start#%E4%B8%8B%E4%B8%80%E6%AD%A5%E6%98%AF%E4%BB%80%E4%B9%88)

### 📋 Configuration File

- [Main Configuration File](https://f2.wiki/site-config#%E4%B8%BB%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)
- [Initialize Configuration File](https://f2.wiki/site-config#%E5%88%9D%E5%A7%8B%E5%8C%96%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)
- [Custom Configuration File](https://f2.wiki/site-config#%E8%87%AA%E5%AE%9A%E4%B9%89%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)
- [Cookie Configuration](https://f2.wiki/site-config#%E9%85%8D%E7%BD%AEcookie)
- [Configuration File Location](https://f2.wiki/site-config#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E4%BD%8D%E7%BD%AE)
- [What's the Next Step?](https://f2.wiki/site-config#%E4%B8%8B%E4%B8%80%E6%AD%A5%E6%98%AF%E4%BB%80%E4%B9%88)

### đŸ’ģ Command Line

- [CLI Temporary Configuration](https://f2.wiki/cli#cli%E4%B8%B4%E6%97%B6%E9%85%8D%E7%BD%AE)
- [Expansion](https://f2.wiki/cli#%E6%8B%93%E5%B1%95)
- [App CLI](https://f2.wiki/cli#%E5%BA%94%E7%94%A8%E5%91%BD%E4%BB%A4%E8%A1%8C)

### 📚 Advanced Usage

- [DouYin Bulk Collection of Live Streams](https://f2.wiki/advance-guide#%E6%89%B9%E9%87%8F%E9%87%87%E9%9B%86%E7%9B%B4%E6%92%AD%E6%B5%81)
- [DouYin Live Danmaku Forwarding](https://f2.wiki/advance-guide#%E7%9B%B4%E6%92%AD%E5%BC%B9%E5%B9%95%E8%BD%AC%E5%8F%91)
- The documentation is still being updated...

## 🧐 FAQ

- [Frequently Asked Questions](https://f2.wiki/faq)

## 👏 Team

- [Team Introduction](https://f2.wiki/team)

### 📘 Developer Guide

- [A Must-Read for Developers](https://f2.wiki/guide/what-is-f2)

### 📝 API Examples

- [Usage Example](https://f2.wiki/guide/api-examples)

### 🧩 Calling Examples

- [Bark](https://f2.wiki/guide/apps/bark/)
- [DouYin](https://f2.wiki/guide/apps/douyin/)
- [TikTok](https://f2.wiki/guide/apps/tiktok/)
- [Twitter](https://f2.wiki/guide/apps/twitter/)
- [WeiBo](https://f2.wiki/guide/apps/weibo/)

### đŸ–Ĩī¸ Command Line Guide

- [Bark](https://f2.wiki/guide/apps/bark/cli)
- [DouYin](https://f2.wiki/guide/apps/douyin/cli)
- [TikTok](https://f2.wiki/guide/apps/tiktok/cli)
- [Twitter](https://f2.wiki/guide/apps/twitter/cli)
- [WeiBo](https://f2.wiki/guide/apps/weibo/cli)

## ✨ New Changes

When downloading or upgrading to a different version of `F2`, please note the following critical version updates.

đŸ› ī¸ v0.0.1.7-pw2

- 🚀 **New Bark App Support**
Please go to the App Store to download [Bark](https://apps.apple.com/cn/app/id1403753865), and complete the relevant configuration in the [F2 configuration file](https://f2.wiki/site-config#%E4%B8%BB%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6).
- đŸ›Ąī¸ **Open `ab` Algorithm**
The full version of the open-source `ab` algorithm is now available, supporting custom `UA`. Please ensure the custom `UA` conforms to the standard.
- 📡 **New Live Stream Bullet Screen Forwarding Feature**
Supports `douyin` and `tiktok` live stream bullet screen forwarding. Please follow the [WSS Configuration Guide](https://f2.wiki/guide/what-is-f2#wss%E9%85%8D%E7%BD%AE) for parameter setup.
- 🔔 **Enable Notification Push**
To enable application notifications, set the `enable_bark` parameter to `true` in the [F2 configuration file](https://f2.wiki/site-config#%E4%B8%BB%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6).
- 📄 **More Change Details**
Please see the full [ChangeLog](https://github.com/Johnserf-Seed/f2/blob/main/CHANGELOG.md#0017---2024-12-31).

📌 v0.0.1.6-pw2

- đŸ› ī¸ **Configuration File Format Updated**
If you are using an old configuration file, please pay attention to the migration.
- 🌍 **Time Zone Standardized**
The default time zone for all timestamps is set to `UTC/GMT+08:00`.
- 📁 **File Format Adjustments**
- `douyin` live stream filenames are now adjusted to `flv`.
- The gallery format has been reverted to `webp`.
- 🔄 **Bug Fixes**
Fixed the `tiktok` video address `403` error.
👉 [Learn more solutions](https://f2.wiki/faq#tiktok-403-forbidden)
- đŸ›Ąī¸ **Algorithm Optimization**
`douyin` now uses the `ab` algorithm by default for requests. (The full version of the `ab` algorithm will be open-sourced soon)
- 📄 **More Change Details**
👉 [View ChangeLog](https://github.com/Johnserf-Seed/f2/blob/main/CHANGELOG.md#0016---2024-05-04)

📡 v0.0.1.5-pw2

- đŸ›Ąī¸ **Custom UA Support**
The `XBogus` parameter now supports custom `UA`. Please ensure the `UA` conforms to the standard.
- 📊 **Database Rebuild**
The rebuilt database contains the raw data from the API.
👉 If you need to keep old records, please pay attention to migration or backup.
- 🔄 **Unified Return Type**
The return type for all `fetch` methods has been unified to the filter type. Please pay attention to the changes.
- đŸ› ī¸ **New Feature**
A new `_to_raw` method has been added to convert filters to raw API data.
- 📝 **Filename Template Update**
If the filename does not meet the new standard, an exception will be thrown. Please check and adjust accordingly.
- 🔗 **Link Parsing Fix**
Fixed the issue with `douyin` collection page links not being parsed.
👉 [Learn more](#æŠ–éŸŗåˆé›†äŊœå“)
- 📄 **More Change Details**
👉 [View ChangeLog](https://github.com/Johnserf-Seed/f2/blob/main/CHANGELOG.md#0015---2024-04-04)

## 📑 Documentation

The goal of `F2` is to provide a simple and easy-to-use interface that allows users to quickly retrieve content data.
In the `preview` version, many features are not fully developed. If you encounter any issues, please submit an `issue` in the `F2` project.
The [project documentation](https://f2.wiki/) is still being improved and may be delayed. Please stay tuned.

## đŸ—“ī¸ Todo

- Support for `BiliBili` & `NetEaseMusic` will be added in version `0.0.1.8`.
- More `API` and `CLI` features will be maintained in version `0.0.1.8`.
- Optimized the `F2` CLI experience.
- Added `Socket` proxy support.
- Added support for `Cookie` pool, `Proxy` pool, `User-Agent` pool, etc.
- Added the `F2` WebAPI version.
- [More plans](https://github.com/Johnserf-Seed/f2/discussions/203)

## 🐛 Updates

[ChangeLog](https://github.com/Johnserf-Seed/f2/blob/main/CHANGELOG.md)

## 💡 Applications & Features

Feature status: đŸŸĸ Represents implemented, 🟡 Represents being implemented, 🟤 Represents temporarily not implemented, đŸ”ĩ Represents future implementation, 🔴 Represents deprecation.
Account status: âšĒ Represents unknown, đŸŸŖ Represents login required (ignores own account privacy settings), âšĢ Represents not login required (visible to guests only).

For the complete list of features, please refer to the [API Documentation](https://f2.wiki/guide/api-examples).

📠 Bark

|Feature|Account Status|Interface|Feature Status|
|---|---|---|---|
|Send Notification (GET)|âšĒ|`fetch_bark_notification`|đŸŸĸ|
|Send Notification (POST)|âšĒ|`post_bark_notification`|đŸŸĸ|
|Send Encrypted Notification|âšĒ|`cipher_bark_notification`|đŸŸĸ|

|Utility|Class Name|Interface|Feature Status|
|---|---|---|---|
|Manage Client Configuration|`ClientConfManager`|-|đŸŸĸ|
|Generate Random Numeric Bytes|-|`generate_numeric_bytes`|đŸŸĸ|

đŸŽļ DouYin

- đŸŸŖ Indicates that login is required to download works that are only visible to oneself, favorited works, works in collection folders, or liked works. (After login, ignores own privacy settings and obtains personalized content)
- âšĢ Indicates that login is not required to download public works, works in collection folders, liked works, etc. (Only downloads works visible to others and pages)

| Feature | Account Status | API | Status |
| --- | --- | --- | --- |
| User Information | đŸŸŖâšĢ | `fetch_user_profile` | đŸŸĸ |
| Single Video (Video, Album, Daily) | đŸŸŖâšĢ | `fetch_one_video` | đŸŸĸ |
|Live Gallery|đŸŸŖâšĢ|`fetch_one_video`|đŸŸĸ|
| Homepage Videos | đŸŸŖâšĢ | `fetch_user_post_videos` | đŸŸĸ |
| Liked Videos | đŸŸŖâšĢ | `fetch_user_like_videos` | đŸŸĸ |
| Collection Folder Videos | đŸŸŖâšĢ | `fetch_user_collects_videos` | đŸŸĸ |
| Collected Videos | đŸŸŖ | `fetch_user_collection_videos` | đŸŸĸ |
| Collected Music | đŸŸŖ | `fetch_user_music_collection` | đŸŸĸ |
| Collected Playlist | đŸŸŖ | `fetch_user_mix_collection` | đŸ”ĩ |
| Collected Series | đŸŸŖ | `fetch_user_series_collection` | 🟤 |
| Playlist Videos | âšĢ | `fetch_user_mix_videos` | đŸŸĸ |
| Recommended Videos | đŸŸŖâšĢ | `fetch_user_feed_videos` | đŸŸĸ |
| Related Videos | âšĢ | `fetch_related_videos` | đŸŸĸ |
| Live Room Information (Stream Download) | âšĢ | `fetch_user_live_videos`, `fetch_user_live_videos_by_room_id` | đŸŸĸ |
| Live Room Load | âšĢ | `fetch_live_im` | đŸŸĸ |
| Live Room Danmaku | âšĢ | `fetch_live_danmaku` | đŸŸĸ |
| Query User Basic Information|đŸŸŖâšĢ|`fetch_query_user`|đŸŸĸ|
| Followed Users Live | đŸŸŖâšĢ | `fetch_user_following_lives` | đŸŸĸ |
| Followed Users Information | đŸŸŖâšĢ | `fetch_user_following` | đŸŸĸ |
| Followers Information | đŸŸŖâšĢ | `fetch_user_follower` | đŸŸĸ |
| Followed Users Videos | đŸŸŖâšĢ | `fetch_user_following_videos` | 🟤 |
| Followers Videos | đŸŸŖâšĢ | `fetch_user_follower_videos` | 🟤 |
| Friends' Videos | đŸŸŖ | `fetch_friend_feed_videos` | đŸŸĸ |
|Increase Play Count|đŸŸŖâšĢ|`fetch_post_stats`|đŸŸĸ|
| Search Videos | âšĢ | `fetch_search_videos` | đŸ”ĩ |
| Search Users | âšĢ | `fetch_search_users` | đŸ”ĩ |
| Search Live | âšĢ | `fetch_search_lives` | đŸ”ĩ |
| Search Suggestions | âšĢ | `fetch_search_suggest` | 🟤 |
| Douyin Hot Search | âšĢ | `fetch_hot_search` | 🟤 |
| Video Comments | đŸŸŖâšĢ | `fetch_video_comments` | đŸ”ĩ |
| Watch History | đŸŸŖ | `fetch_user_history_read` | 🟤 |
| Watch Later | đŸŸŖ | `fetch_user_watch_later` | 🟤 |
| ... | ... | ... | ... |

|Utility|Class Name|Interface|Feature Status|
|---|---|---|---|
|Manage Client Configuration|`ClientConfManager`| |đŸŸĸ|
|Generate Real msToken|`TokenManager`|`gen_real_msToken`|đŸŸĸ|
|Generate Fake msToken|`TokenManager`|`gen_false_msToken`|đŸŸĸ|
|Generate ttwid|`TokenManager`|`gen_ttwid`|đŸŸĸ|
|Generate webid|`TokenManager`|`gen_webid`|đŸŸĸ|
|Generate verify_fp|`VerifyFpManager`|`gen_verify_fp`|đŸŸĸ|
|Generate s_v_web_id|`VerifyFpManager`|`gen_s_v_web_id`|đŸŸĸ|
|Generate Live Webcast Signature|`DouyinWebcastSignature`|`get_signature`|đŸŸĸ|
|Use Interface Address to Generate Xb Parameters|`XBogusManager`|`str_2_endpoint`|đŸŸĸ|
|Use Interface Model to Generate Xb Parameters|`XBogusManager`|`model_2_endpoint`|đŸŸĸ|
|Use Interface Address to Generate Ab Parameters|`ABogusManager`|`str_2_endpoint`|đŸŸĸ|
|Use Interface Model to Generate Ab Parameters|`ABogusManager`|`model_2_endpoint`|đŸŸĸ|
|Extract Single User ID|`SecUserIdFetcher`|`get_sec_user_id`|đŸŸĸ|
|Extract List of User IDs|`SecUserIdFetcher`|`get_all_sec_user_id`|đŸŸĸ|
|Extract Single Content ID|`AwemeIdFetcher`|`get_aweme_id`|đŸŸĸ|
|Extract List of Content IDs|`AwemeIdFetcher`|`get_all_aweme_id`|đŸŸĸ|
|Extract Single Collection ID|`MixIdFetcher`|`get_mix_id`|đŸŸĸ|
|Extract List of Collection IDs|`MixIdFetcher`|`get_all_mix_id`|đŸŸĸ|
|Extract Single Webcast ID|`WebCastIdFetcher`|`get_webcast_id`|đŸŸĸ|
|Extract List of Webcast IDs|`WebCastIdFetcher`|`get_all_webcast_id`|đŸŸĸ|
|Global File Name Formatter|-|`format_file_name`|đŸŸĸ|
|Create User Directory|-|`create_user_folder`|đŸŸĸ|
|Rename User Directory|-|`rename_user_folder`|đŸŸĸ|
|Create or Rename User Directory|-|`create_or_rename_user_folder`|đŸŸĸ|
|Convert JSON Lyrics to LRC Lyrics|-|`json_2_lrc`|đŸŸĸ|

đŸŽļ TikTok

- đŸŸŖ Indicates that login is required to download works that are only visible to oneself, favorited works, works in collection folders, or liked works. (After login, ignores own privacy settings and obtains personalized content)
- âšĢ Indicates that login is not required to download public works, works in collection folders, liked works, etc. (Only downloads works visible to others and pages)

| Feature | Account Status | Interface | Feature Status |
| --- | --- | --- | --- |
| User Information | đŸŸŖâšĢ | `fetch_user_profile` | đŸŸĸ |
| Single Work | đŸŸŖâšĢ | `fetch_one_video` | đŸŸĸ |
| Home Page Works | đŸŸŖâšĢ | `fetch_user_post_videos` | đŸŸĸ |
| Liked Works | đŸŸŖâšĢ | `fetch_user_like_videos` | đŸŸĸ |
| Favorite Works | đŸŸŖâšĢ | `fetch_user_collect_videos` | đŸŸĸ |
| Playlist | đŸŸŖâšĢ | `fetch_play_list` | đŸŸĸ |
| Playlist Works | đŸŸŖâšĢ | `fetch_user_mix_videos` | đŸŸĸ |
| Post Search|đŸŸŖâšĢ|`fetch_search_videos`|đŸŸĸ|
| Live Room Information (Stream Download) |âšĢ|`fetch_user_live_videos`|đŸŸĸ|
|Live Room Danmaku Load|âšĢ|`fetch_live_im`|đŸŸĸ|
|Live Room Danmaku|âšĢ|`fetch_live_danmaku`|đŸŸĸ|
| Check If The webcast Is Alive|đŸŸŖâšĢ|`fetch_check_live_alive`|đŸŸĸ|
| ... | ... | ... | ... |

|Utility|Class Name|Interface|Feature Status|
|---|---|---|---|
|Manage Client Configuration|`ClientConfManager`| |đŸŸĸ|
|Generate Real msToken|`TokenManager`|`gen_real_msToken`|đŸŸĸ|
|Generate Fake msToken|`TokenManager`|`gen_false_msToken`|đŸŸĸ|
|Generate ttwid|`TokenManager`|`gen_ttwid`|đŸŸĸ|
|Generate odin_tt|`TokenManager`|`gen_odin_tt`|đŸŸĸ|
|Use Interface Address to Generate Xb Parameters|`XBogusManager`|`str_2_endpoint`|đŸŸĸ|
|Use Interface Model to Generate Xb Parameters|`XBogusManager`|`model_2_endpoint`|đŸŸĸ|
|Extract Single User ID|`SecUserIdFetcher`|`get_secuid`|đŸŸĸ|
|Extract List of User IDs|`SecUserIdFetcher`|`get_all_secuid`|đŸŸĸ|
|Extract Single User Unique ID|`SecUserIdFetcher`|`get_uniqueid`|đŸŸĸ|
|Extract List of User Unique IDs|`SecUserIdFetcher`|`get_all_uniqueid`|đŸŸĸ|
|Extract List of User IDs|`SecUserIdFetcher`|`get_all_secUid`|đŸŸĸ|
|Extract Single Content ID|`AwemeIdFetcher`|`get_aweme_id`|đŸŸĸ|
|Extract List of Content IDs|`AwemeIdFetcher`|`get_all_aweme_id`|đŸŸĸ|
|Generate Device ID|`DeviceIdManager`|`gen_device_id`|đŸŸĸ|
|Generate Device ID List|`DeviceIdManager`|`gen_device_ids`|đŸŸĸ|
|Global File Name Formatter|-|`format_file_name`|đŸŸĸ|
|Create User Directory|-|`create_user_folder`|đŸŸĸ|
|Rename User Directory|-|`rename_user_folder`|đŸŸĸ|
|Create or Rename User Directory|-|`create_or_rename_user_folder`|đŸŸĸ|

đŸĻ Twitter

|Feature|Account Status|Interface|Feature Status|
|---|---|---|---|
|Tweet Detail|đŸŸŖâšĢ|`fetch_tweet_detail`|đŸŸĸ|
|User Profile|đŸŸŖâšĢ|`fetch_user_profile`|đŸŸĸ|
|Home Tweets|đŸŸŖâšĢ|`fetch_post_tweet`|đŸŸĸ|
|Liked Tweets|đŸŸŖ|`fetch_like_tweet`|đŸŸĸ|
|Bookmarked Tweets|đŸŸŖ|`fetch_bookmark_tweet`|đŸŸĸ|

|Utility|Class Name|Interface|Feature Status|
|---|---|---|---|
|Manage Client Configuration|`ClientConfManager`| |đŸŸĸ|
|Extract User Unique ID|`UniqueIdFetcher`|`get_unique_id`|đŸŸĸ|
|Extract List of User Unique IDs|`UniqueIdFetcher`|`get_all_unique_ids`|đŸŸĸ|
|Extract Tweet ID|`TweetIdFetcher`|`get_tweet_id`|đŸŸĸ|
|Extract List of Tweet IDs|`TweetIdFetcher`|`get_all_tweet_ids`|đŸŸĸ|
|Global File Name Formatter|-|`format_file_name`|đŸŸĸ|
|Create User Directory|-|`create_user_folder`|đŸŸĸ|
|Rename User Directory|-|`rename_user_folder`|đŸŸĸ|
|Create or Rename User Directory|-|`create_or_rename_user_folder`|đŸŸĸ|
|Extract Tweet Text|-|`extract_desc`|đŸŸĸ|

📱 WeiBo

|Feature|Account Status|Interface|Feature Status|
|---|---|---|---|
|User Info|đŸŸŖâšĢ|`fetch_user_info`|đŸŸĸ|
|User Detail|đŸŸŖâšĢ|`fetch_user_detail`|đŸŸĸ|
|Home Weibo|đŸŸŖâšĢ|`fetch_user_weibo`|đŸŸĸ|
|Weibo Detail|đŸŸŖâšĢ|`fetch_weibo_detail`|đŸŸĸ|

|Utility|Class Name|Interface|Feature Status|
|---|---|---|---|
|Manage Client Configuration|`ClientConfManager`| |đŸŸĸ|
|Generate Visitor Cookie|`VisitorManager`|`gen_visitor`|đŸŸĸ|
|Extract Weibo ID|`WeiboIdFetcher`|`get_weibo_id`|đŸŸĸ|
|Extract List of Weibo IDs|`WeiboIdFetcher`|`get_all_weibo_id`|đŸŸĸ|
|Extract Weibo User ID|`WeiboUidFetcher`|`get_weibo_uid`|đŸŸĸ|
|Extract List of Weibo User IDs|`WeiboUidFetcher`|`get_all_weibo_uid`|đŸŸĸ|
|Extract Weibo User Nickname|`WeiboScreenNameFetcher`|`get_weibo_screen_name`|đŸŸĸ|
|Extract List of Weibo User Nicknames|`WeiboScreenNameFetcher`|`get_all_weibo_screen_name`|đŸŸĸ|
|Global File Name Formatter|-|`format_file_name`|đŸŸĸ|
|Create User Directory|-|`create_user_folder`|đŸŸĸ|
|Rename User Directory|-|`rename_user_folder`|đŸŸĸ|
|Create or Rename User Directory|-|`create_or_rename_user_folder`|đŸŸĸ|
|Extract Weibo Text|-|`extract_desc`|đŸŸĸ|

## 📸 Screenshots

đŸŽŦ Bark

### Send Notification (GET)

### Send Notification (POST)

### Send Encrypted Notification

đŸŽŦ DouYin

### Douyin Single Video

### Douyin Home Page Videos

### Douyin Liked Videos

### Douyin Bookmarked Videos

### Douyin Favorites Videos

### Douyin Favorite Sounds

### Douyin Playlist Videos

Supports parsing any video link in a playlist

Playlist Link Parsing

### Douyin Live Recording

Single Live Recording

Batch Live Recording

### Douyin Recommendations

### Douyin Friend's Videos

### Douyin Live Danmaku

đŸŽŦ TikTok

### TikTok Single Video

### TikTok Home Page Videos

### TikTok Liked Videos

### TikTok Bookmarked Videos

### TikTok Playlist Videos

### TikTok Video Search

### TikTok Live Danmaku


ps. Too lazy to record, using Douyin's danmaku, the effect is the same.

đŸŽŦ Twitter

### x Single Tweet

### x Home Page Tweets

### x Liked Tweets

### x Bookmarked Tweets

đŸŽŦ WeiBo

### WeiBo Single Weibo

### WeiBo Home Page Weibo

## đŸ“Ļ Structures

📁 Project Catalogs

```bash
.
|___.coverage
|___.github
| |___dependabot.yml
| |___ISSUE_TEMPLATE
| | |___ask-question.md
| | |___bug-report.md
| | |___feature_request.md
| |___workflows
| | |___Codecov.yml
| | |___deploy.yml
| | |___issue_similarity.yml
|___.gitignore
|___.vscode
| |___launch.json
| |___settings.json
|___babel.cfg
|___CHANGELOG.md
|___CNAME
|___CODE_OF_CONDUCT.md
|___CONTRIBUTING.en.md
|___CONTRIBUTING.md
|___CONTRIBUTORS.en.md
|___CONTRIBUTORS.md
|___coverage.xml
|___docs
| |___.vitepress
| | |___config.mts
| | |___theme
| | | |___index.ts
| | | |___Layout.vue
| | | |___styles
| | | | |___vars.css
| |___advance-guide.md
| |___cli.md
| |___en
| | |___advance-guide.md
| | |___api-examples.md
| | |___cli.md
| | |___guide
| | | |___api-examples.md
| | | |___apps
| | | | |___bark
| | | | | |___cli.md
| | | | | |___index.md
| | | | |___douyin
| | | | | |___cli.md
| | | | | |___index.md
| | | | |___f2
| | | | | |___cli.md
| | | | | |___index.md
| | | | |___tiktok
| | | | | |___cli.md
| | | | | |___index.md
| | | | |___twitter
| | | | | |___cli.md
| | | | | |___index.md
| | | | |___weibo
| | | | | |___cli.md
| | | | | |___index.md
| | | |___what-is-f2.md
| | |___index.md
| | |___install.md
| | |___markdown-examples.md
| | |___question-answer
| | | |___qa.md
| | |___quick-start.md
| | |___site-config.md
| | |___snippets
| | | |___bark
| | | | |___ciphertext.sh
| | | | |___client-config.py
| | | | |___generate-bytes.py
| | | | |___notification.py
| | | |___douyin
| | | | |___abogus.py
| | | | |___aweme-id.py
| | | | |___aweme-related.py
| | | | |___client-config.py
| | | | |___format-file-name.py
| | | | |___json-2-lrc.py
| | | | |___mix-id.py
| | | | |___one-video.py
| | | | |___post-stats.py
| | | | |___query-user.py
| | | | |___sec-user-id.py
| | | | |___support-link.md
| | | | |___token-manager.py
| | | | |___user-collection.py
| | | | |___user-collects.py
| | | | |___user-feed.py
| | | | |___user-folder.py
| | | | |___user-follow-live.py
| | | | |___user-follower.py
| | | | |___user-following.py
| | | | |___user-friend.py
| | | | |___user-get-add.py
| | | | |___user-like.py
| | | | |___user-live-im-fetch.py
| | | | |___user-live-room-id.py
| | | | |___user-live.py
| | | | |___user-mix.py
| | | | |___user-post.py
| | | | |___user-profile.py
| | | | |___video-get-add.py
| | | | |___webcast-id.py
| | | | |___webcast-signature.py
| | | | |___xbogus.py
| | | |___QA.md
| | | |___set-debug.py
| | | |___tiktok
| | | | |___aweme-id.py
| | | | |___check-live-alive.py
| | | | |___client-config.py
| | | | |___device-id.py
| | | | |___format-file-name.py
| | | | |___one-video.py
| | | | |___sec-uid.py
| | | | |___token-manager.py
| | | | |___unique-id.py
| | | | |___user-collect.py
| | | | |___user-folder.py
| | | | |___user-get-add.py
| | | | |___user-like.py
| | | | |___user-live-im-fetch.py
| | | | |___user-mix.py
| | | | |___user-playlist.py
| | | | |___user-post.py
| | | | |___user-profile.py
| | | | |___video-get-add.py
| | | | |___xbogus.py
| | | |___twitter
| | | | |___client-config.py
| | | | |___extract-desc.py
| | | | |___format-file-name.py
| | | | |___one-tweet.py
| | | | |___tweet-ids.py
| | | | |___user-bookmark.py
| | | | |___user-folder.py
| | | | |___user-get-add.py
| | | | |___user-like.py
| | | | |___user-profile.py
| | | | |___user-tweet.py
| | | | |___user-unique-ids.py
| | | |___weibo
| | | | |___client-config.py
| | | | |___extract-desc.py
| | | | |___extract-uid.py
| | | | |___format-file-name.py
| | | | |___one-weibo.py
| | | | |___user-detail.py
| | | | |___user-folder.py
| | | | |___user-get-add.py
| | | | |___user-profile-by-name.py
| | | | |___user-profile.py
| | | | |___user-weibo.py
| | | | |___visitor-cookie.py
| | | | |___weibo-id.py
| | | | |___weibo-screen-name.py
| | | | |___weibo-uid.py
| | |___team.md
| |___faq.md
| |___guide
| | |___api-examples.md
| | |___apps
| | | |___bark
| | | | |___cli.md
| | | | |___index.md
| | | |___douyin
| | | | |___cli.md
| | | | |___index.md
| | | |___f2
| | | | |___cli.md
| | | | |___index.md
| | | |___tiktok
| | | | |___cli.md
| | | | |___index.md
| | | |___twitter
| | | | |___cli.md
| | | | |___index.md
| | | |___weibo
| | | | |___cli.md
| | | | |___index.md
| | |___what-is-f2.md
| |___index.md
| |___install.md
| |___package.json
| |___public
| | |___bark
| | | |___bark-ciphertext-setting.jpg
| | | |___bark-ciphertext.jpg
| | | |___bark-key.jpg
| | | |___bark-token.jpg
| | |___douyin
| | | |___batch-lives.png
| | | |___cli-start-2.png
| | | |___cli-start.png
| | | |___code-start-2.png
| | | |___code-start.png
| | | |___log-2-console.png
| | | |___pytest-ok.png
| | | |___set-debug.png
| | | |___wss-connect.png
| | |___f2-help.png
| | |___f2-logo-with-no-shadow.png
| | |___f2-logo-with-shadow-mini.png
| | |[email protected]
| | |[email protected]
| | |[email protected]
| | |[email protected]
| | |[email protected]
| | |[email protected]
| | |___f2-logo-with-shadow.png
| | |___f2-logo.ico
| |___quick-start.md
| |___site-config.md
| |___snippets
| | |___bark
| | | |___ciphertext.sh
| | | |___client-config.py
| | | |___generate-bytes.py
| | | |___notification.py
| | |___douyin
| | | |___abogus.py
| | | |___aweme-id.py
| | | |___aweme-related.py
| | | |___batch-lives.py
| | | |___client-config.py
| | | |___format-file-name.py
| | | |___json-2-lrc.py
| | | |___mix-id.py
| | | |___one-video.py
| | | |___post-stats.py
| | | |___query-user.py
| | | |___sec-user-id.py
| | | |___support-link.md
| | | |___token-manager.py
| | | |___user-collection.py
| | | |___user-collects.py
| | | |___user-feed.py
| | | |___user-folder.py
| | | |___user-follow-live.py
| | | |___user-follower.py
| | | |___user-following.py
| | | |___user-friend.py
| | | |___user-get-add.py
| | | |___user-like.py
| | | |___user-live-im-fetch.py
| | | |___user-live-room-id.py
| | | |___user-live.py
| | | |___user-mix.py
| | | |___user-post.py
| | | |___user-profile.py
| | | |___video-get-add.py
| | | |___webcast-id.py
| | | |___webcast-signature.py
| | | |___xbogus.py
| | |___set-debug.py
| | |___tiktok
| | | |___aweme-id.py
| | | |___check-live-alive.py
| | | |___client-config.py
| | | |___device-id.py
| | | |___format-file-name.py
| | | |___one-video.py
| | | |___sec-uid.py
| | | |___token-manager.py
| | | |___unique-id.py
| | | |___user-collect.py
| | | |___user-folder.py
| | | |___user-get-add.py
| | | |___user-like.py
| | | |___user-live-im-fetch.py
| | | |___user-mix.py
| | | |___user-playlist.py
| | | |___user-post.py
| | | |___user-profile.py
| | | |___video-get-add.py
| | | |___xbogus.py
| | |___twitter
| | | |___client-config.py
| | | |___extract-desc.py
| | | |___format-file-name.py
| | | |___one-tweet.py
| | | |___tweet-ids.py
| | | |___user-bookmark.py
| | | |___user-folder.py
| | | |___user-get-add.py
| | | |___user-like.py
| | | |___user-profile.py
| | | |___user-tweet.py
| | | |___user-unique-ids.py
| | |___weibo
| | | |___client-config.py
| | | |___extract-desc.py
| | | |___extract-uid.py
| | | |___format-file-name.py
| | | |___one-weibo.py
| | | |___user-detail.py
| | | |___user-folder.py
| | | |___user-get-add.py
| | | |___user-profile-by-name.py
| | | |___user-profile.py
| | | |___user-weibo.py
| | | |___visitor-cookie.py
| | | |___weibo-id.py
| | | |___weibo-screen-name.py
| | | |___weibo-uid.py
| |___team.md
|___f2
| |___apps
| | |___bark
| | | |___api.py
| | | |___cli.py
| | | |___crawler.py
| | | |___filter.py
| | | |___handler.py
| | | |___help.py
| | | |___model.py
| | | |___test
| | | | |___test_bark_crawler.py
| | | |___utils.py
| | |___douyin
| | | |___algorithm
| | | | |___webcast_signature.js
| | | | |___webcast_signature.py
| | | |___api.py
| | | |___cli.py
| | | |___crawler.py
| | | |___db.py
| | | |___dl.py
| | | |___filter.py
| | | |___handler.py
| | | |___help.py
| | | |___model.py
| | | |___proto
| | | | |___douyin_webcast.proto
| | | | |___douyin_webcast_pb2.py
| | | |___test
| | | | |___test_douyin_apps_model.py
| | | | |___test_douyin_aweme_id.py
| | | | |___test_douyin_crawler.py
| | | | |___test_douyin_handler.py
| | | | |___test_douyin_lrc.py
| | | | |___test_douyin_room_id.py
| | | | |___test_douyin_sec_user_id.py
| | | | |___test_douyin_token.py
| | | | |___test_douyin_webcast_id.py
| | | | |___test_douyin_webcast_signature.py
| | | |___utils.py
| | |___tiktok
| | | |___api.py
| | | |___cli.py
| | | |___crawler.py
| | | |___db.py
| | | |___dl.py
| | | |___filter.py
| | | |___handler.py
| | | |___help.py
| | | |___model.py
| | | |___proto
| | | | |___tiktok_webcast.proto
| | | | |___tiktok_webcast_pb2.py
| | | |___test
| | | | |___test_tiktok_aweme_id.py
| | | | |___test_tiktok_crawler.py
| | | | |___test_tiktok_device_id.py
| | | | |___test_tiktok_sec_user_id_fetcher.py
| | | | |___test_tiktok_token.py
| | | |___utils.py
| | |___twitter
| | | |___api.py
| | | |___cli.py
| | | |___crawler.py
| | | |___db.py
| | | |___dl.py
| | | |___filter.py
| | | |___handler.py
| | | |___help.py
| | | |___model.py
| | | |___test
| | | | |___test_model.py
| | | | |___test_tweet_desc.py
| | | | |___test_tweet_id.py
| | | | |___test_unique_id.py
| | | |___utils.py
| | |___weibo
| | | |___api.py
| | | |___cli.py
| | | |___crawler.py
| | | |___db.py
| | | |___dl.py
| | | |___filter.py
| | | |___handler.py
| | | |___help.py
| | | |___model.py
| | | |___test
| | | | |___test_gen_visitor.py
| | | | |___test_handler.py
| | | | |___test_weibo_desc.py
| | | | |___test_weibo_id.py
| | | | |___test_weibo_screen_name.py
| | | | |___test_weibo_uid.py
| | | |___utils.py
| | |_____apps__.py
| | |_____init__.py
| |___cli
| | |___cli_commands.py
| | |___cli_console.py
| | |_____init__.py
| |___conf
| | |___app.yaml
| | |___conf.yaml
| | |___defaults.yaml
| | |___test.yaml
| |___crawlers
| | |___base_crawler.py
| |___db
| | |___base_db.py
| |___dl
| | |___base_downloader.py
| |___exceptions
| | |___api_exceptions.py
| | |___conf_exceptions.py
| | |___db_exceptions.py
| | |___file_exceptions.py
| | |_____init__.py
| |___helps.py
| |___i18n
| | |___translator.py
| |___languages
| | |___en_US
| | | |___LC_MESSAGES
| | | | |___en_US.mo
| | |___zh_CN
| | | |___LC_MESSAGES
| | | | |___zh_CN.mo
| |___log
| | |___logger.py
| |___utils
| | |___abogus.py
| | |___conf_manager.py
| | |___decorators.py
| | |___json_filter.py
| | |___utils.py
| | |___xbogus.py
| | |____dl.py
| | |____signal.py
| | |____singleton.py
| | |_____init__.py
| |_____init__.py
| |_____main__.py
|___LICENSE
|___make_pot.bat
|___make_pot.sh
|___pnpm-lock.yaml
|___pyproject.toml
|___pytest.ini
|___README.en.md
|___README.md
|___SECURITY.md
|___tests
| |___data
| | |___douyin
| | | |___webcast
| | | | |___dict
| | | | | |___WebcastGiftMessage.json
| | | | | |___WebcastLiveShoppingMessage.json
| | | | | |___WebcastProductChangeMessage.json
| | | | | |___WebcastRoomUserSeqMessage.json
| | | | | |___WebcastSocialMessage.json
| | | | | |___WebcastStatsMessage.json
| | | | | |___WebcastUpdateFanTicketMessage.json
| | |___tiktok
| | | |___webcast
| | | | |___dict
| | | | | |___WebcastChatMessage.json
| | | | | |___WebcastGiftMessage.json
| | | | | |___WebcastLikeMessage.json
| | | | | |___WebcastLinkMicFanTicketMethod.json
| | | | | |___WebcastMemberMessage.json
| | | | | |___WebcastRoomStreamAdaptationMessage.json
| | | | | |___WebcastRoomUserSeqMessage.json
| | | | | |___WebcastSocialMessage.json
| | | | | |___WebcastStatsMessage.json
| | | | |___protobuf
| | | | | |___WebcastOecLiveShoppingMessage_0.bin
| | | | | |___WebcastOecLiveShoppingMessage_1.bin
| | | | | |___WebcastOecLiveShoppingMessage_2.bin
| |___package-lock.json
| |___test_abogus.py
| |___test_aes.py
| |___test_cli_commands.py
| |___test_cli_console.py
| |___test_desc_limit.py
| |___test_dl.py
| |___test_excetions.py
| |___test_gzip.py
| |___test_i18n.py
| |___test_json_filter.py
| |___test_logger.py
| |___test_py_version.py
| |___test_rsa.py
| |___test_signal.py
| |___test_singleton.py
| |___test_timestamp.py
| |___test_utils.py
| |___test_xbogus.py
```

## 💰 Sponsor

[TikHub](https://tikhub.io/) is a provider of premium data interface services. You can get free credits by signing up daily. You can use my signup invite link: [https://beta-web.tikhub.io/users/signup?referral_code=6hLcGD94](https://beta-web.tikhub.io/users/signup?referral_code=6hLcGD94) or Invitation code: `6hLcGD94` to get `$2` credit by signing up and recharging.

[TikHub](https://tikhub.io/) offers the following services:

- Rich data interface
- Sign up daily to get free credits
- High quality API service
- Official website: https://tikhub.io/
- Project address: https://github.com/TikHubIO/
## 👨‍đŸ’ģ Contribute

If you're interested in contributing code to `F2`, please refer to the [contributing guide](https://github.com/Johnserf-Seed/f2/blob/main/CONTRIBUTING.md).

## 🙏 Acknowledgements

- [Windows Terminal](https://aka.ms/terminal)
- [Python](https://www.python.org/)
- [Nvm](https://github.com/nvm-sh/nvm)
- [Node.js](https://nodejs.org/)
- [Babel](https://babel.pocoo.org/)
- [click](https://github.com/pallets/click)
- [rich](https://github.com/Textualize/rich)
- [httpx](https://github.com/encode/httpx)
- [aiofiles](https://github.com/Tinche/aiofiles)
- [aiosqlite](https://github.com/omnilib/aiosqlite)
- [jsonpath-ng](https://github.com/h2non/jsonpath-ng)
- [importlib_resources](https://github.com/python/importlib_resources)
- [m3u8](https://github.com/globocom/m3u8)
- [pyyaml](https://github.com/yaml/pyyaml)
- [pytest](https://github.com/pytest-dev/pytest)
- [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio)
- [browser_cookie3](https://github.com/borisbabic/browser_cookie3)
- [pydantic](https://github.com/samuelcolvin/pydantic)
- [vitepress](https://github.com/vuejs/vitepress)
- [websockets](https://github.com/python-websockets/websockets)
- [websockets_proxy](https://github.com/racinette/websockets_proxy)
- [protobuf](https://github.com/protocolbuffers/protobuf)
- [PyExecJS](https://github.com/doloopwhile/PyExecJS)
- [gmssl](https://github.com/duanhongyi/gmssl)
- [cryptography](https://github.com/pyca/cryptography)

Without these libraries and programs, `F2` would not have been able to achieve its functionality. We sincerely thank them for their contributions and efforts.

## âš–ī¸ Terms & Disclaimers

- **Please strictly follow web scraping guidelines and do not use this project for any illegal activities.**
- **Do not sell, share, encrypt, upload, research, or disseminate any personal information.**
- **This project and its related code are for learning and research purposes only and do not constitute any explicit or implied guarantees.**
- **Users are responsible for any risks and losses resulting from the use of this project and its code.**
- **Please comply with the Apache-2.0 open-source license, and do not remove or modify any copyright information in the code.**
- **If users wish to commercialize this project, they must specify the project repository address and not remove or modify any copyright information.**
- **By using this project and its code, users agree to comply with the above regulations.**

## 📜 License

[Apache-2.0 license](https://www.apache.org/licenses/LICENSE-2.0.html)

Copyright (c) 2023 JohnserfSeed

## 📧 Contact

For inquiries related to `F2`, you can contact me using the following methods. Please be patient, and I will reply as soon as possible.

- Mail: [[email protected]](mailto:[email protected]) (preferred)
- Discord: [F2](https://discord.gg/3PhtPmgHf8)