A re-implementation of Deen Freelon's pyktok
Project description
pickpock
This is a slightly cleaned up re-implementation of Deen Freelon's pyktok library for scraping TikTok metadata
I've removed heavy dependencies (numpy, pandas), modernized cookie handling (with request sessions) and modularized the code.
To scrape TikTok metadata, first provide a firefox or chrome cookie database and use the generic dispatch functions:
import pickpock
# the library always returns generators
results = pickpock.fetch("<some_url>")
# there are two convenience functions for writing either raw metadata as jsonlines
for video in pickpock.fetch("<some_url>"):
pickpock.write_json(video)
# or to write a csv similar to the original pyktok
for video in pickpock.fetch("<some_url>"):
pickpock.write_csv(video)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pickpock-0.1.0.tar.gz
(3.2 kB
view hashes)