Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Quick and dirty script that uses selenium and a webdriver binary to scrape public TikTok profiles.

License

Notifications You must be signed in to change notification settings

slouchd/tiktok-scraper-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a quick and dirty script that uses selenium and a webdriver binary (either Firefox or Chrome) to scrape public TikTok profiles.

TikTok not so long ago changed the way you could scrape profiles using requests. So this is a newer more effective technique.

Installation

Firstly make sure you have either Firefox or Google Chrome installed on your device. It will try to detect if you have a webdriver installed already and if not remedy that for you. However, this sometimes fails.

Create a virtualenv if you wish to.

python3 -m venv .env

Install the requirements.txt generated from requirements.in (pip-compile).

python3 -m pip install -r requirements.txt

Usage

Refer to src/example_user_lookup.py to see how to use the class.

If it works correctly you should see a returned JSON object. This will contain the data of the user you have looked up. The format will look like:

{
    "username": "example", 
    "nickname": "example", 
    "uid": "123", 
    "secuid": "AAA234", 
    "description": "The official account for example", 
    "verified": true, 
    "private": false, 
    "avatarlarge": "https://...", 
    "avatarmedium": "https://...", 
    "avatarthumb": "https://...", 
    "followers": 2700, 
    "following": 1, 
    "videos": 100, 
    "hearts": 25600
}

License

MIT License

About

Quick and dirty script that uses selenium and a webdriver binary to scrape public TikTok profiles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages