Douyin Prohibited Word Detection
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 copy and provide safe replacement solutions.
Video restricted? Copy taken down? It might be caused by just one or two words. Paste your copy here to quickly find out where you've violated rules and how to revise it safely.
With simple input operations, you can:
- 🔍 Automatically identify Douyin prohibited words and locate risk points by boldening them in the original text
- 💡 Obtain context-aware intelligent replacement suggestions + reasons for replacement
- ✏️ Generate a publishable version with replacements in one click, ready to copy and use
It applies to scenarios where compliance of Douyin copy needs to be ensured, such as short video directors, e-commerce operators, live stream planners, brand marketing teams, etc.
Features
🎯 Core Functions
- 🔍 Prohibited Word Marking: Hit words in the original text are directly boldened, allowing you to spot risk points at a glance
- 💡 Intelligent Replacement Suggestions: Each prohibited word is paired with a context-aware replacement word + reason for replacement, helping you "revise smoothly" instead of mechanical replacement
- ✏️ Optimized Copy Generation: Directly output a publishable version after replacement, with replacement words boldened for easy identification, ready to copy and use
- 📎 Automatic File Delivery: Automatically generate a plain text optimized copy file, which can be downloaded and saved with a click
- 📏 Batch Detection for Long Copy: Automatically reminds when the copy exceeds 3000 words, supports batch detection and automatic result merging
✨ Highlight Features
- 📥 Multiple Input Forms: Supports direct copy pasting, uploading TXT/DOC/DOCX files, uploading images to extract text, and pasting web links
- ⚡ One-stop Processing: Text extraction + prohibited word detection completed in one go, no need to call scripts multiple times
- 🌐 Dynamic Webpage Support: Webpage detection uses Playwright headless browser to render JS pages, also supports fallback to static pages
- 🔤 English False Match Filtering: Built-in filtering for English word false matches, won't misjudge normal English word fragments as prohibited words
- 🔄 Automatic Network Retry: Automatically retries up to 3 times when encountering network fluctuations, no manual intervention required
One-click Installation
Prerequisites
- Python 3.8+
- Registered RedFox Hub account and obtained API Key (format )
Installation Steps
bash
# 1. Install Python dependencies
pip install python-docx==1.1.0 beautifulsoup4==4.12.3 playwright==1.58.0
# 2. Install Playwright browser (required for webpage detection)
playwright install chromium
Authentication
Obtain API Key
- Visit RedFox Hub Official Website to learn about service details
- Go to Registration Page to register an account
- New registered users will receive free credits and can start using the API service immediately
- After registering and logging in, obtain the API Key in the personal center, formatted as
Configure API Key
Configure the API Key as the environment variable
:
Method 1: Temporary Setting (valid for current terminal session)
bash
export REDFOX_API_KEY=ak_xxxxxxxx
Method 2: Permanent Setting (recommended)
bash
# Bash users
echo 'export REDFOX_API_KEY=ak_xxxxxxxx' >> ~/.bashrc
source ~/.bashrc
# Zsh users
echo 'export REDFOX_API_KEY=ak_xxxxxxxx' >> ~/.zshrc
source ~/.zshrc
| Variable Name | Required | Description |
|---|
| Yes | RedFox API access key, formatted as , automatically attached via request header by the script |
Usage Guide
Basic Usage
1. Directly Paste Copy
The simplest way is to directly paste your Douyin copy:
User: Help me check if there are any prohibited words in this Douyin script: This whitening miracle is really effective, it lightened my skin tone by one shade in just three days
After detection, it will automatically output three sections: Detection Results → Revision Suggestions → Optimized Copy, and automatically generate a downloadable plain text file.
2. Upload Files
Supports TXT, DOC, DOCX files, just upload them to automatically extract text and detect:
User: [Upload script.docx] Help me check this document
The script automatically extracts file content → checks word count → calls detection API → outputs results.
3. Upload Images
Upload video screenshots or subtitle screenshots, automatically extract text from the image for detection (only extracts text, does not analyze image content):
User: [Upload subtitle screenshot.png] Detect if there are any prohibited words in the text of this image
4. Paste Links
Directly paste the webpage address, automatically crawl the page text content for detection:
User: Help me detect this webpage
https://example.com/article
Advanced Usage: Batch Detection for Extra-long Copy
When the copy exceeds 3000 words, the system will automatically pause and ask:
- Reply 1: Only detect the first 3000 characters
- Reply 2: Detect all content in batches and automatically merge results after completion
- Reply 3: Cancel
When the copy exceeds 10000 words, the system will suggest manual batch processing and will not perform detection.
Command Quick Reference
| Input Form | Assistant Action |
|---|
| Plain Text | Calculate word count → word count threshold → → three-section output → write file |
| Upload TXT/DOC/DOCX | --file=path --extract-only
to check word count → detect according to rules → three-section output → write file |
| Upload Image | Only extract text from image → calculate word count → --content="extracted text"
→ three-section output → write file |
| Paste | to check word count → detect according to rules → three-section output → write file |
| Extra-long Copy (3000~10000 words) | Send inquiry, continue only after receiving 1/2/3 |
| Extra-long Copy (>10000 words) | Directly suggest manual batch processing and do not perform detection |
,
,
are mutually exclusive, only one can be passed per call. The platform is fixed as Douyin, no need to specify.
Output Format Description
When detection is successful, the output will include three fixed sections (fixed order, no addition or reduction):
| Section | Content |
|---|
| 🔍 Prohibited Word Detection Results | Detection platform, number of prohibited words, types of prohibited words |
| 💡 Revision Suggestions | Table of prohibited word → replacement word → reason for replacement |
| ✏️ Suggested Optimized Copy | Complete copy after replacement, with replacement parts boldened |
If no prohibited words are detected, only output "No prohibited words detected, copy content is compliant✅", and do not output the latter two sections.
Important: After outputting the three sections, the plain text optimized copy will be automatically written to
./Douyin_Optimized_Copy_{random 6-digit number}.txt
and sent to the user as a file card, which can be directly clicked to download.
Usage Scenarios
Scenario 1: Self-check before publishing short video scripts
Role: Short video director/creator
Requirement: Check limit words and prohibited promotional terms in voiceover scripts and subtitle copy before publishing
Usage Method:
- Paste the completed script copy
- View prohibited word markings and replacement suggestions
- Download the optimized safe version
Expected Benefit: Avoid video restriction or takedown due to prohibited words, publish with confidence
Scenario 2: Batch screening of e-commerce product copy
Role: E-commerce operator
Requirement: Batch compliance detection of product detail page and activity page copy before going online
Usage Method:
- Upload a DOCX document containing multiple product copies
- The system automatically detects long documents in batches
- Obtain all replaced compliant versions
Expected Benefit: Batch screening, avoid product takedown penalties due to copy violations
Scenario 3: Compliance screening of live stream scripts
Role: Live stream script planner
Requirement: Quickly screen live stream lines and promotional scripts before going online
Usage Method:
- Directly paste the live stream script
- Get prohibited word positions and replacement suggestions in one click
- Adjust the script according to suggestions
Expected Benefit: Ensure live stream script compliance, reduce live stream risks
Scenario 4: Spot check of brand landing page copy
Role: Brand/marketing team
Requirement: Compliance spot check of landing page and H5 activity page copy before publishing
Usage Method:
- Paste the landing page URL
- The system automatically crawls the page text content
- Detect copy compliance
Expected Benefit: Complete page copy review quickly, avoid problems after public release
Project Architecture
Directory Structure
douyin-prohibited-word/
├── SKILL.md # Skill documentation (this file)
├── references/
│ └── core_workflow.md # Complete execution procedures (output templates, rules, detailed steps)
├── scripts/
│ └── check_sensitive_words.py # Core detection script
└── _meta.json # Metadata configuration
Technology Stack
| Component | Technology |
|---|
| Runtime Environment | Python 3.8+ |
| HTTP Request | requests (Python native HTTP library, automatic retry) |
| Document Parsing | python-docx (DOC/DOCX) |
| Webpage Extraction | Playwright (JS dynamic pages) + BeautifulSoup4 (static page fallback) |
| Detection Platform | Douyin (hard-coded) |
Core Module Description
| Module | File | Responsibility |
|---|
| Text Extraction | — / | Extract text content from files and webpages |
| Prohibited Word Detection | — | Call prohibited word detection API, return marked HTML + prohibited word list |
| English False Match Filtering | | Automatically filter false marking of substrings inside English words (e.g., "ass" in "Glasswing") |
| Execution Procedures | references/core_workflow.md
| Complete output templates, execution rules, extra-long content processing rules, exception handling scripts |
Frequently Asked Questions
Installation-related Questions
Q1: What should I do if the installation prompts missing dependency libraries?
A: Install the missing dependencies using the following command:
bash
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: Webpage detection requires Playwright to render JS pages. If Playwright is unavailable, the script will automatically fall back to static page extraction, which does not affect other functions.
Usage-related Questions
Q3: What's the maximum content that can be detected at one time?
A: The single detection limit is 3000 characters. For 3000~10000 characters, batch detection and automatic result merging are supported. For content exceeding 10000 characters, manual batch processing is recommended.
Q4: What file formats are supported?
A: Supports text-type files such as TXT, DOC, DOCX, CSV, MD, as well as common image formats (extract text from images). PDF is not supported temporarily, please convert it to image or text file before uploading.
Q5: Will data be transmitted externally? How to ensure privacy?
A: The copy will be sent to the detection service via 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). Occasional network fluctuations will trigger automatic retries. If retries fail multiple times, please try again later or contact technical support.
Q7: Are English words misjudged as prohibited words?
A: English false match filtering is built-in. The script will automatically identify and filter false marking of substrings inside English words (e.g., "ass" in "Glasswing"), no additional processing is required.
Q8: What should I do if file or webpage extraction fails?
A: Please check if the file format is correct and if the website is accessible. PDF files are not supported, please convert them to image or text format first.
Get Help
- Complete execution procedures, output templates, and execution rules are detailed in
references/core_workflow.md
Trigger Conditions
This Skill will be activated if any of the following conditions are met:
- User mentions "Douyin prohibited words", "Douyin sensitive words", "Douyin review", "restriction words", "script compliance", "voiceover copy compliance"
- User requests to detect the safety of Douyin short video scripts, live stream scripts, subtitle copy, product details, etc.
- User uploads files/images/links and mentions Douyin-related detection needs
Execution Rules
Before calling the script and formatting the output,
must read and strictly follow the full text of references/core_workflow.md
. Core principles:
- Forge no results —— Only rely on the JSON returned by the script, do not fabricate prohibited words or replacement suggestions
- Do not output raw JSON —— Must parse it and fill it into the output template
- No unnecessary greetings —— Only output the three sections (🔍Detection Results, 💡Revision Suggestions, ✏️Optimized Copy), no opening/closing remarks
- Must pause for batch/word count exceeding limits —— Stop immediately after sending the prompt, wait for the user's clear reply of 1/2/3 before continuing
- Images are for text only —— Forbid obtaining any non-text information such as visual style, layout, color, characters of the image
- Must deliver files —— After outputting the three sections, must write the plain text optimized copy to
./Douyin_Optimized_Copy_{random 6-digit number}.txt
and send it to the user as a card, forbidding omission