Skip to content

A simple command-line application that archives chat logs of pscp.tv broadcasts

License

Notifications You must be signed in to change notification settings

IgnatBeresnev/periscope-chat-downloader

Repository files navigation

Periscope Chat Downloader

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.

Getting started

Java

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.

Download the jar

You can download the downloader jar (executable) in a couple of ways:

Run the jar

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.

Example

You see an example of running the downloader, its log output and the output files it generates in the examples directory.

Output files

You can find an example of what this downloader outputs in examples/download/chatlogs.

Directories:

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 extract chat_token
  • accessChatPublic.json - some technical information about the chat of this broadcast, contains needed URLs and tokens
  • history-{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.

Root files

  • 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

Version

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 ###
##########################################################

About

A simple command-line application that archives chat logs of pscp.tv broadcasts

Topics

Resources

License

Stars

Watchers

Forks

Languages