Created
November 9, 2016 06:30
-
-
Save ldante86/104e6f29a1bcc7b4f115f094b610cafd to your computer and use it in GitHub Desktop.
get reddit karma numbers for user
This file contains hidden or 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
#!/bin/bash - | |
reddit_user="$1" | |
echo | |
echo "karma for /u/${reddit_user}" | |
echo | |
page=$(lynx -source "https://www.reddit.com/user/${reddit_user}/") | |
echo -n "post karma: " | |
echo "$page"| grep -io "<span class=\"karma\">*[0-9,]*" | sed 's/.*>//' | |
echo -n "comment karma: " | |
echo "$page"| grep -io "<span class=\"karma comment-karma\">*[0-9,]*" | sed 's/.*>//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment