Last active
November 13, 2016 05:30
-
-
Save blha303/96bc4099684e0f3e6f783c51dc77b654 to your computer and use it in GitHub Desktop.
Randomises an emoji at the end of a twitter user name
This file contains hidden or 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
#!/usr/bin/env python | |
import tweepy | |
import json | |
import random | |
from emoji import unicode_codes | |
emoji = [e.encode('utf-8') for e in unicode_codes.EMOJI_UNICODE.values() if len(e.encode('utf-8')) == 4] | |
with open(".twitter_config.json") as f: | |
config = json.load(f) | |
auth = tweepy.OAuthHandler(config["ckey"], config["csec"]) | |
auth.set_access_token(config["utok"], config["usec"]) | |
api = tweepy.API(auth) | |
api.update_profile("Steven Smith " + random.choice(emoji)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment