This Python script uses Selenium to scrape data from TikTok videos and saves the data to a CSV file.
- Install Python 3.
- Install the required packages by running
pip install selenium pandas
. - Download and install the appropriate version of the ChromeDriver for your Chrome browser: https://sites.google.com/a/chromium.org/chromedriver/downloads
- Update the
driver_path
variable in the script to point to the location of the ChromeDriver on your system.
- Run the script by running
python tiktok_scraper.py
in the terminal. - Enter a search query when prompted.
- The script will scrape the data for all the search results and save it to a CSV file named
tiktok_data.csv
.
The following data is scraped from each TikTok video:
- Video description
- Number of likes
- Number of comments
- User profile information (username, nickname, followers, following, likes)
View my Upwork profile | Send me an email [email protected] |
Chat on discord shz#1259 |
Chat with me on Skype live:.cid.d443850fdc6504ea |
Connect with me on LinkedIn |
This script is intended for educational purposes only. Use of this script may violate TikTok's terms of service. Use at your own risk.