r/redditscripting • u/wrzoki DJ • Apr 08 '17
Get Karma from Windows Command Line
Two Microsoft Powershell commands to fetch the point score of a post.
$postUri="https://www.reddit.com/r/dataisbeautiful/comments/63g7eb/24_hour_score_history_of_a_3k_vote/dftti3j/"
Invoke-Webrequest -UserAgent "user:UserName" -Uri ($postUri+".json") | ConvertFrom-Json | %{$_.data.children[0].data} | % {(get-Date).toString() + ",Score," + $_.score + ",Comments," + $_.num_comments + ",UpvoteRatio," + $_.upvote_ratio}
Sceen shot of example output.
2
Upvotes
View all comments
Show parent comment
1
u/wrzoki DJ Apr 11 '17
It's "built in" in the sense that it uses the Windows Powershell scripting language, and the script's source is what you see in the original post above.