Last active
August 17, 2017 03:05
-
-
Save nilakshdas/ccf54ee1a2610279464a8851e992bb71 to your computer and use it in GitHub Desktop.
A python API to publish messages on a Sarahah profile.
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 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I must say, a True masterpiece.