Last active
July 1, 2017 06:32
-
-
Save acetwenty8/507a6806508929eb4f57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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/"/"/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/"/"/g' | python -mjson.tool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment