Skip to main content

Toolkit for Dissenter

Project description

Ressenter

Ressenter is a command line tool to pull content from Dissenter.com, a browser-based social network operated by Gab.com. (We will not reward either of these domains with hyperlinks.)

This tool does not require any authentication with Dissenter; all the data it pulls is available publicly.

Currently, this tool can:

  • Reliably pull all comments made on Dissenter within the last seven days
  • Pull the current 'top' comments
  • Pull the current 'controversial' comments
  • Pull the current trending URLs
  • Pull all the comments for a particular URL
  • Pull all the comments made by a particular user

Robustness

This tool was made by reverse engineering Dissenter's API. (To be fair, it wasn't that hard.) Because we have no insight into Dissenter's internals, there's no guarantee that this tool provides an exhaustive or reliable archive of Dissenter content.

For example, we don't know whether comments become inaccessible after some period of time, or whether there is a limit on how many comments we can pull from any particular user.

Usage

Usage: ressenter [OPTIONS] COMMAND [ARGS]...

Options:
  --format [jsonl|csv]  output format
  --help                Show this message and exit.

Commands:
  comments  Pull all the most recent comments
  trending  Pull the current trending URLs
  url       Pull comments for a particular URL.
  user      Pull all the comments of a particular user

Ressenter can output data to jsonl and csv (the default is jsonl). Just pass the --format option before the subcommand (e.g., ressenter --format=csv comments). All data is currently written to stdout; to save output to a file, use pipes (e.g., ressenter comments > comments.jsonl).

comments

Usage: ressenter comments [OPTIONS]

  Pull all the most recent comments

Options:
  --sort [latest|controversial|top]
                                  comment sort order
  --after-id TEXT                 pull no earlier than this comment ID
  --after-time TEXT               pull no comments posted earlier than this
                                  time

  --max INTEGER                   maximum number of comments to pull
  --help                          Show this message and exit.

trending

Usage: ressenter trending [OPTIONS]

  Pull the current trending URLs

Options:
  --help  Show this message and exit.

url

Usage: ressenter url [OPTIONS] URL

  Pull comments for a particular URL. Note that several comment metadata
  items (such as upvotes, downvotes, and comments) are not available when
  pulling comments from a URL.

Options:
  --sort [latest|controversial|top]
                                  comment sort order
  --after-id TEXT                 pull no earlier than this comment ID
  --after-time TEXT               pull no comments posted earlier than this
                                  time

  --max INTEGER                   maximum number of comments to pull
  --help                          Show this message and exit.

user

Usage: ressenter user [OPTIONS] USER

  Pull all the comments of a particular user, identified by their UID

Options:
  --sort [latest|controversial|top]
                                  comment sort order
  --after-id TEXT                 pull no earlier than this comment ID
  --after-time TEXT               pull no comments posted earlier than this
                                  time

  --max INTEGER                   maximum number of comments to pull
  --help                          Show this message and exit.

Playbook

Here are some common use cases:

Pull all the most recent comments

ressenter comments

Pull all the recent top comments

ressenter comments --sort=top

Pull all the recent controversial comments

ressenter comments --sort=controversial

Pull all comments made in the past hour

ressenter comments --after-time "one hour ago"

Pull all the current trending URLs

ressenter trending

Pull all of the comments for a particular URL

ressenter url https://www.facebook.com

Module Usage

To use Ressenter as a Python module, just import it and setup a listener—a function that will be called on every result. You may also want to disable the standard output. For example:

import ressenter

results = []

ressenter.disable_standard_output()
ressenter.result_listeners.append(results.append)
ressenter.result_listeners.append(lambda k: print(f"Output: {k}"))
ressenter.comments()

print(f"Found {len(results)} results!")

All the commands are imported at the top-level namespace (e.g., ressenter.comments, ressenter.trending, ressenter.url, ressenter.user) and support the same arguments as their command-line equivalents. Consult the source code and the command-level docs for more information about the specific parameters supported.

Development

To run Ressenter locally, perform the following steps:

  1. Install dependencies with pipenv install
  2. Activate the virtual environment with pipenv shell
  3. Run the tool using main.py -- for example, ./main.py comments

Packaging and Publishing

  1. Make sure you have access to PyPI credentials with permission for the ressenter repository.
  2. Clear the dist/ folder (rm dist/*).
  3. Package everything with python setup.py sdist bdist_wheel.
  4. Check the packaging with twine check dist/*.
  5. Upload with twine upload dist/*.

Troubleshooting

If you work at the Stanford Internet Observatory, ping Miles McCain on Slack or via email to get help with Ressenter. To report bugs or submit feature requests, please open an issue.

Desired Features

There are a few features that this tool currently lacks, but that we'd like to add. We haven't yet found reliable ways to extract this data. (If you have, please let us know!)

  • Find the most recent URLs commented on
  • Iterate through all the URLs with comments
  • Iterate through all comments, instead of just those made in the past seven days

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

ressenter-0.0.11.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

ressenter-0.0.11-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file ressenter-0.0.11.tar.gz.

File metadata

  • Download URL: ressenter-0.0.11.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.5

File hashes

Hashes for ressenter-0.0.11.tar.gz
Algorithm Hash digest
SHA256 345bcdb87d85defb782be499151e27d840554df502a9d57cf09b62374ca2299a
MD5 cd56742e2ee84fc41c89f5567ac70eb5
BLAKE2b-256 c0f64dbb4bb08cb6a38e4a1a62c0f9079048dda051901a5327f3d6816757ba18

See more details on using hashes here.

File details

Details for the file ressenter-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: ressenter-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.5

File hashes

Hashes for ressenter-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 654131d438c90327dff4cc97e586299c41553b8f5feb76560af327a3f8b967fe
MD5 1debe4114138f8f32fb76420e4154d52
BLAKE2b-256 4505e15ba3e20548b3416421838f5ee98daefdf95d77a0e9c6a1ea80130159fb

See more details on using hashes here.

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