Git Product home page Git Product logo

groupme-tools's Introduction

groupme-tools

No Maintenance Intended

Tools to fetch the complete history of a GroupMe group chat and analyze it.

groupme-fetch.py allows you to grab the entire transcript for one of your groups and save it as JSON for backup and analysis. It is documented; run it with --help for help. It also allows you to fetch recent updates in the group to keep your JSON file up to date.

simple-transcript.py processes a JSON file into a human-readable text transcript.

The files in the stat folder are self-explanatory; they allow for learning interesting things about the transcript's content and the group's history.

Finding your access token

nb. there are better ways to do this now; see GroupMe API docs.

Log into GroupMe's web interface and use Chrome or Safari's inspector to monitor the network requests when you load one of your groups.

You'll notice a GET request to an endpoint https://v2.groupme.com/groups/GROUP_ID/messages.

One of the headers sent with that request, X-Access-Token, is your access token.

Finding your group ID

nb. there are better ways to do this now; see GroupMe API docs.

Again, in GroupMe's web interface, the group ID is the numeric ID included in the group's URL (https://web.groupme.com/groups/GROUP_ID).

Requirements/Dependencies/Python

This was written and tested on Python 2.7, because I didn't want to waste time getting my Homebrew installation to install things for Python 3. I suspect this script will break if you run it with Python 3, because Unicode.

The only other dependency is Requests. pip install requests. At the time of writing, the current version was 1.1.0.

Emoji

groupme-fetch.py will store emoji and other non-ASCII characters in the transcript JSON fine, as expected.

Stress testing/performance

These tools have been tested with a transcript containing ~16,000 messages on a 1.7GHz/4GB Macbook Air. It works fine.

Keep your transcript up to date

After your initial fetch with groupme-fetch.py, optionally using the oldest option to fetch older history. You should have a complete transcript up to the last time you fetched. Then...

Note the oldest or newest parameters are message IDs from your transcript JSON file.

python groupme-fetch.py GROUPID ACCESSTOKEN newest $(python newest-id.py transcript-GROUPID.json)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.