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
def get_text(data): | |
try: | |
text = data['extended_tweet']['full_text'] | |
except: | |
try: | |
text = data['full_text'] | |
except: | |
try: | |
text = data['text'] | |
except: |
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
def parse_modes(modes): | |
modestring = modes.pop(0) | |
modifier = None | |
retval = [] | |
for char in modestring: | |
if char in ['+','-']: | |
modifier = char | |
elif char in ['b','q','e','I','o','v']: |