Johnserf-Seed/f2: A Python Downloader for Douyin, TikTok, Twitter and Weibo
High-speed downloader for multiple platforms
At a glance
- What is it?
- f2 is an async Python library and CLI that fetches post data and media from several Chinese and Western social platforms through one interface. It is a developer tool first, a downloader second, and it expects you to configure cookies before it does anything useful.
- Who is it for?
- Adopt f2 if you are a Python developer who needs programmatic access to Douyin, TikTok, Twitter or Weibo post data and can maintain cookie configuration yourself. Do not adopt it if you want a graphical downloader, need BiliBili or NetEaseMusic today (both are listed as 0.0.1.8 work), or cannot accept that a platform change can break extraction until the maintainers ship a fix.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 34 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- Johnserf-Seed/f22,747 ★ · +70
| Repository | 2026-10-04 | 2026-11-22 |
|---|---|---|
| Johnserf-Seed/f2 | 2.7k | 2.7k |
70 Stars in the last 49 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What f2 actually does, and who it is built for
The README describes f2 as "a Python library that provides multi-platform work downloading and interface data processing," with support for Douyin, TikTok, Twitter and Weibo, and a stated intent to adapt to more platforms. The project name in pyproject.toml is f2, the description there is "Asynchronous based full-platform download tool," and the classifiers list Development Status 4 - Beta. That beta label matters: the README itself says many features in the preview version are incomplete and asks users to file issues.
The audience is narrower than the phrase "full-platform download tool" suggests. The keywords list includes async, websockets, crawler, downloader, bark, tiktok, douyin, twitter, x, weibo, bilibili, netease, http proxy and watermark, which points at developers building pipelines rather than people who want a desktop app. The API tables in the README name Python methods such as fetch_user_profile, fetch_one_video, fetch_user_post_videos, fetch_user_like_videos and fetch_user_collects_videos for Douyin, each tagged with whether login is required. If you want to pull a creator's post history into a database, or watch a live stream and forward its danmaku, f2 is aimed at you. If you want to paste a URL into a window and get an MP4, it is not.
The mechanism: async fetchers, a filter layer and a local database
f2 is asynchronous throughout. The dependency list in pyproject.toml includes httpx for HTTP, aiofiles for async file writes, aiosqlite for async SQLite access and m3u8 for HLS playlists, and the Framework classifier is AsyncIO. A fetch call therefore returns a coroutine you await, and downloads stream to disk without blocking the event loop.
The README's changelog for v0.0.1.5 describes a structural decision worth understanding before you write code against it: all fetch methods were unified to return a filter type, and a _to_raw method was added to convert a filter back into the raw interface data. That means the object you get from fetch_one_video is not the platform's JSON. It is a normalized wrapper, and the underlying payload is reachable only through _to_raw. The same release rebuilt the database to contain the original interface data, and the notes warn that old records need migrating or backing up. So the data flow is: request through an async client, parse into a filter, optionally persist raw records to SQLite, then either consume the filter or call _to_raw for the original fields.
Request signing is the other moving part. The v0.0.1.6 notes state that Douyin now uses the ab algorithm by default, and the v0.0.1.7-pw2 notes say the full ab algorithm has been open sourced with support for a custom UA. Earlier releases mention XBogus with custom UA support. These signatures are what let a request look like it came from a browser, and they are also the part most likely to break when a platform changes its front end.
Installing f2 from PyPI and running a first fetch
The README points installation at the f2.wiki install page, which splits into prerequisites, package manager installation and building from source. The package is published on PyPI as f2, and pyproject.toml requires Python 3.10 or newer. The simplest path is pip.
pip install f2After that, the README's quick start points to a "start and run" page. The project is configured through YAML files, with a main config file, an initialization config file and a custom config file described in the site-config docs. Cookies are configured there too, and for Douyin the README's account column shows that public posts can be fetched in guest mode, while your own private, collected or liked works need a logged-in cookie. The CLI section documents temporary configuration overrides, so you can pass settings for one run instead of editing the file. The README does not print a full command line in the repository copy, so the application subcommands are the ones documented per platform on the CLI pages for Bark, Douyin, TikTok, Twitter and Weibo.
One switch is named explicitly in the release notes: notification push is enabled by setting enable_bark to true in the F2 config file, and Bark itself is an iOS app you install from the App Store before configuring it. Expect the first run to fail on missing cookies rather than on missing code, and treat the config file, not the command line, as the place where credentials live.
Where f2 breaks, and when it is the wrong tool
The most concrete failure mode is documented rather than hypothetical. The v0.0.1.6 notes list a fix for a TikTok video address 403 error, with a link to an FAQ entry titled "tiktok 403 forbidden." A 403 on a media URL means the signed address expired or the signature no longer matches what the CDN expects. That class of bug recurs whenever a platform rotates its signing scheme, and no library can prevent it. Your pipeline needs to treat download failures as normal and retryable.
Version churn is the second risk. The most recent tagged release is v0.0.1.7 from 2024-12-31, while the last push to the repository was on 2026-09-12. The README's development branch badge points at v0.0.1.7-pw2, and several features described in the notes, including Bark support, the open sourced ab algorithm, danmaku forwarding and enable_bark, are attached to that pw2 line rather than to the tagged release. If you install from PyPI you may get the tag; if you want the newest behaviour you may need the branch. Decide which you are pinning.
Breaking changes are also explicit. The v0.0.1.5 notes say a filename that does not match the new template will raise an exception, the return types changed, and the database was rebuilt. The v0.0.1.6 notes say the config file format changed and old files need migrating, that timestamps default to UTC/GMT+08:00, and that douyin live stream filenames changed to flv while image sets went back to webp. Upgrading across these versions is not a drop-in. Finally, the README's Todo list puts BiliBili and NetEaseMusic support in 0.0.1.8, so despite the bilibili and netease keywords in pyproject.toml, those platforms are not available yet.
How f2 differs from yt-dlp
The obvious comparison is yt-dlp, and the difference is in what each one treats as the product. yt-dlp is a command line program whose output is a media file; you give it a URL and it extracts and downloads. f2 is a Python library whose output is structured data, with downloading as one of the things you can do with it. The README's API tables list methods like fetch_user_profile and fetch_user_collects_videos returning filter objects, plus a database that stores raw interface data. You are expected to write the Python that calls them.
That shows up in configuration too. yt-dlp is largely driven by flags on the command line; f2 puts cookies, paths and switches such as enable_bark into YAML config files managed through the site-config documentation, with CLI temporary overrides as a secondary path. And the platform lists are not identical. f2 covers Douyin, TikTok, Twitter, Weibo and Bark, with BiliBili and NetEaseMusic planned. If your target is a general video site, yt-dlp is the more direct answer. If your target is Douyin user data, including liked and collected works and live danmaku forwarding, f2 is built around that specific surface in a way a general extractor is not.
Maintenance, licence and the cost of keeping f2 running
The repository is not archived and the last push was on 2026-09-12, so the project is being worked on. That said, the release cadence is uneven: v0.0.1.5 landed 2024-04-04, v0.0.1.6 on 2024-06-28, and v0.0.1.7 on 2024-12-31, with the feature notes for the newest work attached to the v0.0.1.7-pw2 branch rather than a tag. Plan for the possibility that fixes you need live on a branch.
The upgrade cost is the real budget item. Each of the three recent releases carries a migration note: config format, filename template, return types, database contents, timestamp timezone and media container. If you pin a version and never move, you keep working until a platform changes its signing and your downloads start returning 403. If you track the project, you re-read the changelog and adjust config and code each time. Neither is free, and the README's own warning that the documentation lags behind the code means you should read CHANGELOG.md rather than trust the wiki alone.
Licensing is Apache-2.0, declared both in pyproject.toml and in the LICENSE file, with the classifier "License :: OSI Approved :: Apache Software License." Apache-2.0 permits commercial use and modification and includes a patent grant and a notice requirement. What the licence does not settle is the platforms' own terms of service, which govern whether you may download a given post at all. That is a question for your own counsel, not for the repository.
Editorial conclusion
Adopt f2 if you are a Python developer who needs programmatic access to Douyin, TikTok, Twitter or Weibo post data and can maintain cookie configuration yourself. Do not adopt it if you want a graphical downloader, need BiliBili or NetEaseMusic today (both are listed as 0.0.1.8 work), or cannot accept that a platform change can break extraction until the maintainers ship a fix. Before committing, verify three things: that your Python is 3.10 or newer, that the cookies you plan to supply still work against the current site, and whether the 0.0.1.7 release from 2024-12-31 or the newer commits on main are the version you want to pin.
Frequently asked questions
What Python version does Johnserf-Seed/f2 require?
pyproject.toml sets requires-python to >=3.10 and lists classifiers for Python 3.10 and 3.11. Installing on an older interpreter will fail the version check before anything else runs.
Does f2 need a login or cookie to download Douyin posts?
The README's Douyin tables mark public works, and other people's public pages, as downloadable in guest mode, while your own private, collected or liked works need a logged-in cookie. Cookies are configured through the config files described in the site-config documentation.
Which platforms does f2 support today?
The README lists Douyin, TikTok, Twitter, Weibo and Bark as supported, with separate API and CLI documentation pages for each. BiliBili and NetEaseMusic appear only in the Todo list as planned for version 0.0.1.8.
Why does f2 return a 403 error when downloading TikTok videos?
The v0.0.1.6 release notes list a fix for a TikTok video address 403 error and link to a FAQ page titled "tiktok 403 forbidden." A 403 on a media address means the signed URL is no longer accepted, so the practical response is to update to a version carrying the fix and retry.
Is f2 under active development?
The repository is not archived and the last push was on 2026-09-12. The most recent tagged release is v0.0.1.7 from 2024-12-31, and the newer feature notes are attached to the v0.0.1.7-pw2 branch.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/johnserf-seed-f2)Star history chart for your README
[](https://hysenlabs.com/projects/johnserf-seed-f2)Was this useful?