Skip to content

Instantly share code, notes, and snippets.

@nilakshdas
Last active August 17, 2017 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilakshdas/ccf54ee1a2610279464a8851e992bb71 to your computer and use it in GitHub Desktop.
Save nilakshdas/ccf54ee1a2610279464a8851e992bb71 to your computer and use it in GitHub Desktop.
A python API to publish messages on a Sarahah profile.
from ghost import Ghost # http://jeanphix.me/Ghost.py/
def post_to_sarahah(id, message):
ghost = Ghost()
with ghost.start() as session:
session.open('http://%s.sarahah.com' % str(id))
session.set_field_value('textarea[id=Text]', str(message))
session.evaluate('SendMessage();', expect_loading=True)
@prashantdce19
Copy link

I must say, a True masterpiece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment