Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from steem import Steem
- s = Steem(nodes=["https://api.steemit.com"])
- def newest_post(username):
- limit = 100
- account_history = s.get_account_history(username,index_from=-1,limit=limit)
- try:
- for i in range(limit+1):
- operation = account_history[limit-i]
- if (operation[1]["op"][0] == "comment"):
- if (operation[1]["op"][1]["title"]!= ""):
- return operation[1]["op"][1]["permlink"]
- except IndexError:
- return None
- print(newest_post("wil1liam"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement