Skip to main content

Whichtok

Contributor Covenant

Whichtok is a library to construct social graphs from TikTok data. The library is currently a WIP, and contributions are greatly appreciated.

Installation

Install Whichtok and its dependencies with the package manager pip:

pip3 install whichtok TikTokApi python-igraph cairocffi

Whichtok uses TikTok-Api to scrape video and user data from TikTok and igraph for graph construction and manipulation. cairocffi is a dependency of igraph necessary for graph visualizations.

Why Whichtok?

Social media platforms such as Instagram and Twitter match people to content using a social graph. Users follow other users to view and interact with their posts and may adjust who follow to tailor their feed to their interests. Unlike other platforms, however, TikTok matches content to users using an interest graph.

TikTok does allow users to follow other users, but its primary feature is not a following feed. Instead, TikTok uses its For You page to learn what content users are interested in and deliver similar content to user feeds. Through the For You page, TikTok constructs an interest graph without ever requiring explicit user direction. The algorithm is trained using signals such as whether a user likes a video or how much time a user spends watching it before swiping to the next one. The longer a user spends on TikTok, the more personalized the algorithm’s recommendations become, as the algorithm literally responds to the desires of their subconscious. Eugene Wei describes the effects of the TikTok For You page in more detail in this blog post.

TikTok is able to pinpoint user preferences and deliver relevant content with such precision and accuracy that its algorithm has gained an air of mystique (compounded by a lack of popular understanding of its inner workings and lack of clarity and transparency on the part of TikTok—see shadowbanning practices that have recently come to light). Anyhow, TikTok's unique FYP has won the app a massive following, and it is home to many subcultures or niches, entered via the FYP and governed by its influence. All fall under the umbrella term ‘alt TikTok’ and even prize themselves as obscure, oddly specific, and even elusive.

Whichtok enables developers to examine such communities. By constructing and analyzing social graphs from user interactions, we can begin to ask questions like how does a social media platform based on interests group people into subcultures? What niches exist? To what extent does TikTok isolate different communities? How do users from different communities interact? What does ‘membership’ in different communities look like? Does TikTok’s partitioning of users into subcultures limit and constrict discourse or simply help people find a shared space?

How does it work?

Whichtok scrapes data from TikTok users and constructs a corresponding graph. Graph functionalities are still under development, but each user will be represented as a node. The weight of an edge between two users will be determined by the amount that the users interact with each other and the amount that they interact with the same or similar content (approximating the extent to which they ‘share space’ on TikTok). Applying network analysis algorithms to this social graph can allow us to investigate TikTok’s social landscape.

Contributions

CONTRIBUTING.md contains contribution guidelines and the tasks and features which I'm currently working on.

License

MIT

Release files for whichtok 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whichtok 0.0.3
File Size Uploaded
whichtok-0.0.3.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whichtok 0.0.3
File Interpreter ABI Platform
whichtok-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / whichtok-0.0.3.tar.gz

Download URL whichtok-0.0.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f11dac7cbdcd1a89efef6e9543dbf48a9d6f94ed2908e38807b36c35eac2550a
BLAKE2b-256 checksum
How to use checksums
335bd2d06184fb8748c4f8156c00c4168537eae4584d72049ced66dfe5656eea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release files / whichtok-0.0.3-py3-none-any.whl

Download URL whichtok-0.0.3-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f903ee034a4b0d7f21a67f2a477a041e4c34769bc2d86ceae22d8cec001e927a
BLAKE2b-256 checksum
How to use checksums
37595cd53881d4f6fd22b7e4995aa542a9179335e9bccf007a72cb4d737699e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page