An OSINT-focused tool designed to extract and analyze data from archived TikTok pages saved in the MHTML format.
MHTok processes MHTML files to extract metadata like video descriptions, video urls, author names, views, hashtags, and it compiles this information into clean CSV datasets.
- Local-First Processing: All data processing happens offline - no external API calls or network requests
- MHTML Parsing: Extracts HTML content from MHTML archive files
- Metadata Extraction:
- Video ID and URL
- Author source (profile owner) and post creator (video author)
- Description
- View counts
- Hashtags
- Music information
- Repost detection with creator attribution
- Multiple Export Formats: CSV and JSON export options
- Data Filtering: Search and filter extracted data by author or content
- Batch Processing: Process multiple MHTML files at once
- User-Friendly Interface: Drag-and-drop file upload with Streamlit
- Python 3.8 or higher
- pip package manager
- Clone or download this repository:
cd mhtok-app- Install dependencies:
pip install -r requirements.txt- Install a browser extension like "Save as MHTML" or use your browser's built-in save feature
- Navigate to a TikTok video or profile page
- Save the page as MHTML format
Supported Page Types:
- User profile pages (e.g.,
https://www.tiktok.com/@username)
- Start the Streamlit application:
streamlit run app.py- Your browser will open automatically to
http://localhost:8501
- Drag and drop your MHTML files into the upload area
- Click "Process Files" to extract the data
- Review the extracted metadata in the data table
- Use filters to search or narrow down results
- Export your data as CSV or JSON
| Field | Description |
|---|---|
video_id |
Unique TikTok video identifier |
video_url |
Full URL to the video |
author_source |
Profile owner (person whose profile was captured) |
post_creator |
Video creator (extracted from video URL) |
description |
Video caption/description |
views |
View count (parsed from HTML) |
hashtags |
Comma-separated list of hashtags |
music |
Background music/sound title |
is_repost |
Boolean flag indicating if video is a repost |
source_file |
Original MHTML filename |
author_source vs post_creator:
- For regular posts:
author_source==post_creator(same person) - For reposts:
author_source!=post_creator(different people)author_source: Who reposted it (profile owner)post_creator: Who originally created it (from video URL)
- Static Content Only: MHTML captures only what was visible when the page was saved
- Unavailable Fields: Likes, comments, shares, and timestamps are not available
- Data Freshness: Data is only as current as when the MHTML was saved
- Page Changes: TikTok's HTML structure may change, requiring updates to the extractor
- Some fields may not be available on all TikTok pages
- Private or restricted content may have limited metadata
- Older MHTML files may use different HTML structures
# Update pip
pip install --upgrade pip
# Install with verbose output
pip install -r requirements.txt -v