Overview
Douyin Prohibited Word Detection is an intelligent compliance detection tool designed specifically for Douyin content creators and operators, helping you quickly identify prohibited words in your copy and provide safe replacement solutions.
Your video getting throttled or your copy taken down? It may be caused by just one or two words. Throw your copy in, and it will quickly tell you where the pitfalls are and how to revise it safely.
Through simple input operations, you can:
- 🔍 Automatically identify Douyin prohibited words, with the original text bolded to locate risk points
- 💡 Get context-aware intelligent replacement suggestions + reasons for replacement
- ✏️ Generate a publishable version after replacement with one click, ready to use with copy and paste
Suitable for short video directors, e-commerce operators, livestream planners, brand marketing, and other scenarios that need to ensure Douyin copy is published compliantly.
Features
🎯 Core Features
- 🔍 Prohibited Word Marking: matched words in the original text are directlybolded, so you can see risk points at a glance
- 💡 Intelligent Replacement Suggestions: each prohibited word is paired with a context-aware replacement word + reason for replacement, helping you "make it read smoothly" rather than mechanically replacing
- ✏️ Optimized Copy Generation: directly outputs a publishable version after replacement, with replacement wordsboldedand marked, ready to use with copy and paste
- 📎 Automatic File Delivery: automatically generates a plain text optimized copy file, click to download and save
- 📏 Batch Detection for Long Copy: automatically reminds when exceeding 3000 characters, supports batch detection and automatic merging of results
✨ Highlights
- 📥 Multiple Input Forms: supports directly pasting copy, uploading TXT/DOC/DOCX files, uploading images to extract text, and pasting web page links
- ⚡ One-Stop Processing: text extraction + prohibited word detection completed in one go, no need to call scripts multiple times
- 🌐 Dynamic Web Page Support: web page detection uses the Playwright headless browser to render JS pages, and also supports static page fallback
- 🔤 English False Match Filtering: built-in filtering for false matches of English words, so normal English word fragments will not be misjudged as prohibited words
- 🔄 Automatic Network Retry: automatically retries up to 3 times when network fluctuations occur, with no manual intervention needed
One-Click Installation
Prerequisites
- Python 3.8+
- Have registered a 红狐Hub account and obtained an API Key (format
ak_xxxxxxxx)
Installation Steps
# 1. 安装 Python 依赖
pip install python-docx==1.1.0 beautifulsoup4==4.12.3 playwright==1.58.0
# 2. 安装 Playwright 浏览器(网页检测需要)
playwright install chromium
Authentication
Get API Key
- Visit the 红狐Hub official website to learn about service details
- Go to the registration page to register an account
- Newly registered users will receive free credits, and can immediately start using the API service
- After registering and logging in, obtain the API Key in the personal center, with the format
ak_xxxxxxxx
Configure API Key
Configure the API Key as the environment variable REDFOX_API_KEY:
Method 1: Temporary setting (valid for the current terminal session)
export REDFOX_API_KEY=ak_xxxxxxxx
Method 2: Permanent setting (recommended)
# Bash 用户
echo 'export REDFOX_API_KEY=ak_xxxxxxxx' >> ~/.bashrc
source ~/.bashrc
# Zsh 用户
echo 'export REDFOX_API_KEY=ak_xxxxxxxx' >> ~/.zshrc
source ~/.zshrc
| Variable name | Required | Description |
|---|---|---|
REDFOX_API_KEY |
Yes | RedFox API access key, format ak_xxxxxxxx, the script automatically adds it via the X-API-KEY request header |
Usage Guide
Basic Usage
1. Paste the copy directly
The simplest way to use it, just paste the Douyin copy directly:
User: Help me check whether this Douyin script contains prohibited words: This whitening miracle product is really too effective, after three days of use I became one shade whiter
After the check is complete, three sections are automatically output: Check Results → Revision Suggestions → Optimized Copy, and a downloadable plain text file is automatically generated.
2. Upload a file
Supports TXT, DOC, and DOCX files; just upload to automatically extract the text and check it:
User: [Upload script.docx] Help me check this document
The script automatically extracts the file content → word count check → calls the detection API → outputs the results.
3. Upload an image
Upload a video screenshot or subtitle screenshot to automatically extract the text in the image for detection (only extracts text, does not analyze image content):
User: [Upload subtitle screenshot.png] Check whether the text in the image contains prohibited words
4. Paste a link
Paste a web address directly to automatically scrape the page text content for detection:
User: Help me check this webpage https://example.com/article
Advanced Usage: Batch detection for extra-long copy
When the copy exceeds 3000 characters, the system automatically pauses and asks:
- Reply 1: Check only the first 3000 characters
- Reply 2: Check all content in batches, and automatically merge the results when done
- Reply 3: Cancel
When the copy exceeds 10000 characters, the system will prompt that manual batching is recommended and will not perform detection.
Command Quick Reference
| Input form | Assistant action |
|---|---|
| Plain text | Calculate word count → word count gate → --content="..." → three-section output → write file |
| Upload TXT/DOC/DOCX | --file=path --extract-only Check word count → detect according to rules → three-section output → write file |
| Upload image | Only extract text from the image → calculate word count → --content="提取文字" → three-section output → write file |
Paste https://... |
--url=... --extract-only Check word count → detect according to rules → three-section output → write file |
| Extra-long copy (3000~10000) | Send the inquiry message,continue only after receiving 1/2/3 |
| Extra-long copy (>10000) | Directly prompt that manual batching is recommended, do not perform detection |
--content、--file、--url The three are mutually exclusive; pass only one per call. The platform is fixed to Douyin and does not need to be specified.
Output Format Description
On successful detection, the output always contains three sections (fixed order, no additions or removals):
| Section | Content |
|---|---|
| 🔍 Prohibited word detection results | Detection platform, number of prohibited words, types of prohibited words |
| 💡 Revision suggestions | Prohibited words → Replacement words → Reason for replacement table |
| ✏️ Suggested optimized copy | The complete copy after replacement, with replacements shown in bold |
When no prohibited words are detected, only output "No prohibited words detected, the copy content is compliant ✅", and do not output the latter two sections.
Important: After the three sections are output, the plain-text optimized copy will automatically be written to ./抖音_优化文案_{随机6位数字}.txt and sent to the user as a file card, which can be clicked to download directly.
Use cases
Use case 1: Self-check before publishing short video scripts
Role: Short video director/creator
Needs: Check for extreme words and prohibited promotional terms before publishing spoken scripts and subtitle copy
How to use:
- Paste the completed script copy here
- View prohibited word markers and replacement suggestions
- Download the optimized safe version
Expected benefits: Avoid video throttling or takedown due to prohibited words, and publish with peace of mind
Use case 2: Batch mine-sweeping for e-commerce product copy
Role: E-commerce operations
Needs: Batch compliance checks before listing product detail page and campaign page copy
How to use:
- Upload a DOCX document containing multiple product copy entries
- The system automatically checks long documents in batches
- Obtain the compliant version with all replacements applied
Expected benefits: Batch screening to avoid product takedown penalties due to copy violations
Use case 3: Compliance screening of livestream scripts
Role: Livestream script planner
Needs: Quickly screen livestream room lines and promotional scripts before launch
How to use:
- Directly paste the livestream script
- Get the locations of prohibited words and replacement suggestions with one click
- Adjust the script according to the suggestions
Expected benefits: Ensure livestream script compliance and reduce livestream risks
Use case 4: Spot-checking brand landing page copy
Role: Brand/marketing team
Needs: Spot-check copy compliance before publishing landing pages and H5 campaign pages
How to use:
- Paste the landing page URL
- The system automatically scrapes the page text content
- Check copy compliance
Expected benefits: Quickly complete page copy review and avoid problems after external publication
Project architecture
Directory structure
douyin-prohibited-word/
├── SKILL.md # Skill 说明文档(本文件)
├── references/
│ └── core_workflow.md # 完整执行规程(输出模板、铁律、详细步骤)
├── scripts/
│ └── check_sensitive_words.py # 核心检测脚本
└── _meta.json # 元数据配置
Tech stack
| Component | Technology |
|---|---|
| Runtime environment | Python 3.8+ |
| HTTP requests | requests (Python native HTTP library, automatic retries) |
| Document parsing | python-docx(DOC/DOCX) |
| Web page extraction | Playwright (JS dynamic pages) + BeautifulSoup4 (static page fallback) |
| Detection platform | Douyin (hardcoded) |
Core module descriptions
| Module | File | Responsibility |
|---|---|---|
| Text extraction | check_sensitive_words.py — extract_from_file() / extract_from_web() |
Extract text content from files and web pages |
| Prohibited word detection | check_sensitive_words.py — check_sensitive_words() |
Call the prohibited word detection API, returning the marked HTML + prohibited word list |
| English false-match filtering | check_sensitive_words.py |
Automatically filter false flags of substrings inside English words (such as "ass" in "Glasswing") |
| Execution procedure | references/core_workflow.md |
Complete output template, execution iron rules, rules for handling overly long content, exception handling wording |
FAQ
Installation-related questions
Q1: What should I do if it prompts that dependency libraries are missing during installation?
A: Install the missing dependencies with the following command:
pip install python-docx==1.1.0 beautifulsoup4==4.12.3 playwright==1.58.0
playwright install chromium
Q2: What should I do if Playwright installation fails?
A: Web page detection requires Playwright to render JS pages. If Playwright is unavailable, the script will automatically fall back to static page extraction, without affecting the use of other features.
Usage-related questions
Q3: What is the maximum amount of content that can be detected at one time?
A: The upper limit for a single detection is 3000 characters. For 3000~10000 characters, batch detection with automatic merging is supported; for more than 10000 characters, manual batching is recommended.
Q4: Which file formats are supported?
A: Supports text-type files such as TXT, DOC, DOCX, CSV, and MD, as well as common image formats (extracting text from images).PDF is not currently supported, please convert it to an image or text file before uploading.
Q5: Will data be transmitted externally? How is privacy protected?
A: The copy will be sent to the detection service over an encrypted HTTPS connection for matching and will not be stored locally.
Troubleshooting
Q6: What should I do if the detection service returns an exception?
A: The script has a built-in automatic retry mechanism (up to 3 times), and occasional network fluctuations will be retried automatically. If it still fails after multiple retries, please try again later or contact technical support.
Q7: An English word was incorrectly flagged as a prohibited word?
A: English false-match filtering is already built in. The script will automatically identify and filter false flags of substrings inside English words (such as "ass" in "Glasswing"), with no additional handling required.
Q8: File or web page extraction failed?
A: Please check whether the file format is correct and whether the URL can be accessed normally. PDF files are not supported; please first convert them to image or text format.
Get help
- For the complete execution procedure, output template, and execution iron rules, see
references/core_workflow.md
Trigger conditions
This Skill is activated when any of the following is met:
- The user mentions "Douyin prohibited words", "Douyin sensitive words", "Douyin review", "throttling words", "script compliance", or "spoken script compliance"
- The user requests detection of the safety of content such as Douyin short video scripts, livestream sales pitches, subtitle copy, and product details
- The user uploads a file/image/link and mentions Douyin-related detection needs
Execution iron rules
Before calling the script and formatting the output,you must first read and strictly follow references/core_workflow.md the full text. Core principles:
- Do not fabricate results — only the JSON returned by the script shall be used as the standard; do not invent prohibited words or replacement suggestions
- Do not output raw JSON — it must be parsed and then filled into the output template
- Do not include unnecessary pleasantries — output only three sections (🔍Detection Results, 💡Revision Suggestions, ✏️Optimized Copy), with no opening/closing remarks
- Batching/character limit exceeded must pause — Stop immediately after issuing the prompt, and wait for the user to explicitly reply 1/2/3 before continuing
- Images are limited to text only — It is prohibited to obtain any non-text information from images, such as visual style, layout, color, people, etc.
- A file must be delivered — After the three sections are output, the plain-text optimized copy must be written to
./抖音_优化文案_{随机6位数字}.txtand sent to the user in card form; omission is prohibited. A: English false-match filtering is already built in. The script will automatically identify and filter false matches of substrings inside English words (such as "ass" in "Glasswing"), with no additional handling required.
Q8: File or webpage extraction failed?
A: Please check whether the file format is correct and whether the URL can be accessed normally. PDF files are not supported; please convert them to image or text format first.
Get help
- For the complete execution procedure, output template, and execution iron rules, see
references/core_workflow.md
Trigger conditions
This Skill is activated when any of the following is met:
- The user mentions "Douyin prohibited words," "Douyin sensitive words," "Douyin review," "throttling words," "script compliance," or "spoken-copy compliance"
- The user requests safety detection of content such as Douyin short video scripts, livestream talking points, subtitle copy, and product details
- The user uploads a file/image/link and mentions a Douyin-related detection need
Execution iron rules
Before calling the script or formatting the output,you must first read and strictly follow references/core_workflow.md the full text. Core principles:
- Fabricating results is prohibited — Only the JSON returned by the script shall be used as the basis; prohibited words or replacement suggestions must not be invented
- Outputting raw JSON is prohibited — It must be parsed and then filled into the output template
- Extra pleasantries are prohibited — Output only the three sections (🔍Detection results, 💡Revision suggestions, ✏️Optimized copy), with no opening or closing remarks
- Batching/character limit exceeded must pause — Stop immediately after issuing the prompt, and wait for the user to explicitly reply 1/2/3 before continuing
- Images are limited to text only — It is prohibited to obtain any non-text information from images, such as visual style, layout, color, people, etc.
- A file must be delivered — After the three sections are output, the plain-text optimized copy must be written to
./抖音_优化文案_{随机6位数字}.txtand sent to the user in card form; omission is prohibited.