Created
February 11, 2019 22:24
-
-
Save spiiin/4211bf148bfc0b03d73f36e3e5b59e17 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
from beem.comment import Comment | |
from beem.account import Account | |
c = Comment("@pinkwonder/water-combo-and-gold-sea-genie-giweaway") | |
replies = c.get_all_replies() | |
participants = [] | |
for reply in replies: | |
body = reply["body"] | |
if body.find("https://steemmonsters.com?battle=")!=-1: | |
participants.append("@"+reply["author"]) | |
print("Participants:") | |
for p in participants: | |
print(" ", p) | |
from random import choice | |
randomWinner = choice(participants) | |
print("Winner is:", randomWinner) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment