Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelcolenso/9ad9bff77ac241aa878a65a5509affe9 to your computer and use it in GitHub Desktop.
Save michaelcolenso/9ad9bff77ac241aa878a65a5509affe9 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