Member-only story
How To Scrape Number Of TikTok Comments Using Python!
TikTok is an amazing social media platform, there’s so much data on that platform is crazy, so let’s take a look at how we can scrape the number of comments from any TikTok post. In later tutorials i’ll show you how to scrape actual comments from TikTok. Let’s get started!
Basic introduction you could probably skip that I copied from my other article
First things first, we will need to have Python installed, read my article here to make sure you have Python and some IDE installed. Next, I wrote a article on using Selenium in Python, Selenium is a web scraping package that allows us to mimic a web browser using Python, it might be best to read that article for more of an understanding on web scraping, but it’s not a necessity, you can read that article here.
Let’s get started!
Now that we have our Python environment setup, let’s open up a blank Python script. Let’s import the Selenium package that you hopefully preinstalled from the previous paragraph (just pip install selenium). Once installed, import the following packages:
#IMPORT THESE PACKAGES
import selenium
from selenium import webdriver
#OPTIONAL PACKAGE, BUY MAYBE NEEDED
from webdriver_manager.chrome import ChromeDriverManager