Skip to main content

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.5.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

pickpock-0.1.5-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page