A Python script to quickly download many TikTok videos using yt-dlp.
Python
0
5 commits
updated Oct 5, 2026
A high-performance automated script for Windows designed to intercept and download videos from your TikTok "For You" Page (FYP) in original quality, watermark-free, utilizing your active session, and in the universally compatible H.264 (AVC) + AAC format.
Before getting started, make sure your computer meets the following requirements:
Your project directory (e.g., D:\tiktok extractor\) should be organized as follows:
tiktok extractor/
│
├── main.py # Main capture and download script
├── requirements.txt # Python dependencies list
├── update.bat # 1-click dependency installer/updater
├── login.py # One-time login helper script
├── config.json # Configuration file (auto-generated on first run)
├── videos.txt # Temporary file storing extracted URLs
└── perfil_navegador/ # Persistent folder storing your Chrome session
update.bat.pip package manager.yt-dlp, playwright, and curl_cffi.ALL DEPENDENCIES INSTALLED AND UPDATED SUCCESSFULLY!, press any key to close the window.To allow the program to access your personalized "For You" feed, it must use your active account. To prevent Google from blocking your login with the "This browser or app may not be secure" error, a native launch setup is used:
login.py in the project folder with the following content:import os
import subprocess
import sys
CARPETA_SESION = os.path.abspath("./perfil_navegador")
os.makedirs(CARPETA_SESION, exist_ok=True)
chrome_paths = [
os.path.expandvars(r"%ProgramFiles%\Google\Chrome\Application\chrome.exe"),
os.path.expandvars(r"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"),
os.path.expandvars(r"%LocalAppData%\Google\Chrome\Application\chrome.exe"),
]
chrome_exe = next((p for p in chrome_paths if os.path.exists(p)), None)
if not chrome_exe:
print("Error: Google Chrome was not found on your system.")
sys.exit(1)
print("Launching Google Chrome for session setup...")
print("1. Log in to Google and TikTok in the browser tabs that will open.")
print("2. Once your TikTok account is visible and active, simply CLOSE the Chrome window.")
process = subprocess.Popen([
chrome_exe,
f"--user-data-dir={CARPETA_SESION}",
"--no-first-run",
"https://accounts.google.com",
"https://www.tiktok.com/login"
])
process.wait()
print("Session successfully saved to ./perfil_navegador!")
python login.py
perfil_navegador, and you will not need to sign in again.config.json)The first time you run main.py, it will automatically create config.json. You can open it in Notepad to customize your settings:
{
"download_path": "D:\\tiktok extractor\\TikTok_Downloads",
"video_count": 10,
"concurrent_downloads": 6
}
download_path: The folder where downloaded videos will be stored (you can set any valid directory path).video_count: The number of videos you want to harvest from your feed per execution.concurrent_downloads: How many videos are downloaded simultaneously in parallel (recommended range: 4 to 8).Whenever you want to download videos:
python main.py
videos.txt upon completion and notify you in the console.Make sure you do not have another Google Chrome window open using the same profile folder (perfil_navegador) before launching the script.
No. yt-dlp extracts the clean, original-quality media streams directly from ByteDance/TikTok content delivery networks.
In main.py, find the following line:
page.goto("https://www.tiktok.com/foryou")
And replace it with the desired profile URL:
page.goto("https://www.tiktok.com/@username")
A Python script to quickly download many TikTok videos using yt-dlp.
Python
0
5 commits
updated Oct 5, 2026
A high-performance automated script for Windows designed to intercept and download videos from your TikTok "For You" Page (FYP) in original quality, watermark-free, utilizing your active session, and in the universally compatible H.264 (AVC) + AAC format.
Before getting started, make sure your computer meets the following requirements:
Your project directory (e.g., D:\tiktok extractor\) should be organized as follows:
tiktok extractor/
│
├── main.py # Main capture and download script
├── requirements.txt # Python dependencies list
├── update.bat # 1-click dependency installer/updater
├── login.py # One-time login helper script
├── config.json # Configuration file (auto-generated on first run)
├── videos.txt # Temporary file storing extracted URLs
└── perfil_navegador/ # Persistent folder storing your Chrome session
update.bat.pip package manager.yt-dlp, playwright, and curl_cffi.ALL DEPENDENCIES INSTALLED AND UPDATED SUCCESSFULLY!, press any key to close the window.To allow the program to access your personalized "For You" feed, it must use your active account. To prevent Google from blocking your login with the "This browser or app may not be secure" error, a native launch setup is used:
login.py in the project folder with the following content:import os
import subprocess
import sys
CARPETA_SESION = os.path.abspath("./perfil_navegador")
os.makedirs(CARPETA_SESION, exist_ok=True)
chrome_paths = [
os.path.expandvars(r"%ProgramFiles%\Google\Chrome\Application\chrome.exe"),
os.path.expandvars(r"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"),
os.path.expandvars(r"%LocalAppData%\Google\Chrome\Application\chrome.exe"),
]
chrome_exe = next((p for p in chrome_paths if os.path.exists(p)), None)
if not chrome_exe:
print("Error: Google Chrome was not found on your system.")
sys.exit(1)
print("Launching Google Chrome for session setup...")
print("1. Log in to Google and TikTok in the browser tabs that will open.")
print("2. Once your TikTok account is visible and active, simply CLOSE the Chrome window.")
process = subprocess.Popen([
chrome_exe,
f"--user-data-dir={CARPETA_SESION}",
"--no-first-run",
"https://accounts.google.com",
"https://www.tiktok.com/login"
])
process.wait()
print("Session successfully saved to ./perfil_navegador!")
python login.py
perfil_navegador, and you will not need to sign in again.config.json)The first time you run main.py, it will automatically create config.json. You can open it in Notepad to customize your settings:
{
"download_path": "D:\\tiktok extractor\\TikTok_Downloads",
"video_count": 10,
"concurrent_downloads": 6
}
download_path: The folder where downloaded videos will be stored (you can set any valid directory path).video_count: The number of videos you want to harvest from your feed per execution.concurrent_downloads: How many videos are downloaded simultaneously in parallel (recommended range: 4 to 8).Whenever you want to download videos:
python main.py
videos.txt upon completion and notify you in the console.Make sure you do not have another Google Chrome window open using the same profile folder (perfil_navegador) before launching the script.
No. yt-dlp extracts the clean, original-quality media streams directly from ByteDance/TikTok content delivery networks.
In main.py, find the following line:
page.goto("https://www.tiktok.com/foryou")
And replace it with the desired profile URL:
page.goto("https://www.tiktok.com/@username")