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 details)
Built Distribution
File details
Details for the file pickpock-0.1.5.tar.gz
.
File metadata
- Download URL: pickpock-0.1.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e420191158e3058f038390b728ae68127c0724ac6282c97f742a9c97aab38228 |
|
MD5 | 60b5066a3cf171684228b992b359a43c |
|
BLAKE2b-256 | 7a6c5d03d793f6200eef08f2d378d220fe45c9f13316f8ec8bd38ff98ef46c7c |
File details
Details for the file pickpock-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: pickpock-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 212816bd3af970967e9dd943de4fb652a51a57a107df69ef797d6daf4c4cf19e |
|
MD5 | beb3a46855f6cf1d4f895f99d2453151 |
|
BLAKE2b-256 | ed451abab587b3f844ca2acfe2983f0baf17918ebeae80dda4390acb26ecdc69 |