A simple command-line application that lets you download chat logs of past periscope broadcasts.
Accepts a list of broadcast URLs as input, and outputs JSON API responses as provided by Periscope, without post-processing.
To run the downloader, you will need Java 8 (or a more recent version). Any Java distribution should work, but it's been tested with Eclipse Temurin only.
If you don't have any Java version installed locally, I suggest using sdkman.io.
You can download the downloader jar (executable) in a couple of ways:
- Download a pre-built jar from the Releases page. Latest version: periscope-chat-downloader.jar.
- Download a pre-built jar from the most recent GitHub Actions artifacts
- Build one locally by running
./gradlew clean shadowJar
in the root of the cloned project, and run it from the generatedbuild/libs
.
Here's how you can run the chat downloader:
java -jar periscope-chat-downloader.jar broadcasts.txt chatlogs
The first argument must be the file that contains a list of broadcast URLs that you want to download chat history for.
Example (as file):
https://www.pscp.tv/ByronBernstein/1lPKqwmwQvAJb
https://www.pscp.tv/ByronBernstein/1gqxvOrDWmnKB
The second argument must be the path to the output directory. The directory must not exist.
The paths can be both absolute and relative.
You see an example of running the downloader, its log output and the output files it generates in the examples directory.
You can find an example of what this downloader outputs in examples/download/chatlogs.
Each directory represents one broadcast, and the name of the directory is the id of that broadcast.
Within each directory you will find the following files:
accessVideoPublic.json
- some general information about the video, this was needed to extractchat_token
accessChatPublic.json
- some technical information about the chat of this broadcast, contains needed URLs and tokenshistory-{n}.json
- the chat logs themselves, where each file contains up to 1000 entries. Files are saved as returned by the Periscope Chat API, without post-processing, and in exactly the same batches and order as if you watched the whole broadcast from start to finish.
- input.txt - list of URLs that were provided to the downloader
- success.txt - list of URLs that were successfully processed and dumped
- failed.txt - list of URLs the processing of which failed in one way or another
If you're not sure which version of the downloader you have, you can run it with -v
:
ignat@workstation> java -jar periscope-chat-downloader.jar -v
##########################################################
### Periscope chat downloader version 1.0.0 ###
### github.com/IgnatBeresnev/periscope-chat-downloader ###
##########################################################