This commit is contained in:
Connor 2017-07-30 18:08:20 -07:00 committed by GitHub
parent 1815a0b996
commit 075418af21

View File

@ -3,8 +3,20 @@ set -e
# super quickly hacked together script
# for listing your twitch following from the command-line.
# KNOWN ISSUES: stops printing at the first = character per field.
# this should be an easy fix but i'm lazy.
# REQUIREMENTS:
# editing this script.
# downloading a python script.
# python 2 or 3.
# a web browser
# curl
# GNU sort
# GNU awk
# KNOWN ISSUES:
# stops printing at the first = character per field.
# this should be an easy fix but i'm lazy.
# output is not always sorted by viewer count.
# TODO:
# fix known issues.
@ -16,9 +28,20 @@ set -e
# fill these in with values extracted from your browser's
# "copy as cURL" feature.
# 1. open a new tab in Chromium or Firefox; these instructions apply to either.
# 2. open the web inspector (ctrl+shift+I) and click on the network tab.
# 3. go to https://www.twitch.tv/directory/following/live
# make sure this is with the network tab already open!
# if it isn't, open it up and just refresh the page.
# 4. type "followed" in the filter of the network tab.
# 5. right click on the first result and click copy as cURL.
# in Chromium, it's in a submenu as "copy as cURL (bash)"
# 6. paste into a text editor and extract the following header values:
# (each header is specified by a -H flag)
cookie="cookie: [fill me in!]"
client_id="client-id: [fill me in!]"
# note: technically, you only need the "persistent" cookie.
cookie="cookie: [stuff goes here]"
client_id="client-id: [stuff goes here]"
json2() {
# download this from https://github.com/vi/json2/blob/master/json2