Skip to content

Instantly share code, notes, and snippets.

@acetwenty8
Last active July 1, 2017 06:32
Show Gist options
  • Save acetwenty8/507a6806508929eb4f57 to your computer and use it in GitHub Desktop.
Save acetwenty8/507a6806508929eb4f57 to your computer and use it in GitHub Desktop.
#PeriscopeProfileJson.sh
#Returns User Profile Json from Web Profile
#Version 1.0: Initial Release
#Version 1.1: Fixed quoting characters, optimize perl statements
#Version 1.2: Update parsing for changes in profile page
#replace myuser with the user you want to query
#line breaks added for readability
USR=myuser; curl -sq https://www.periscope.tv/$USR \
| tail -n +2 | perl -pe 's,.*data-store="({.*})"><.*,$1,g' \
| sed -e 's/&quot;/"/g' \
| python -mjson.tool
#one-liner
USR=myuser; curl -sq https://www.periscope.tv/$USR | tail -n +2 | perl -pe 's,.*data-store="({.*})"><.*,$1,g' | sed -e 's/&quot;/"/g' | python -mjson.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment