Skip to content

Instantly share code, notes, and snippets.

@dattaz
Created April 30, 2017 20:46
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 dattaz/92f52b2896a4c5b62ce3692fe63575e6 to your computer and use it in GitHub Desktop.
Save dattaz/92f52b2896a4c5b62ce3692fe63575e6 to your computer and use it in GitHub Desktop.
import json
import requests
import datetime
account = "NSAGov"
keyword = "mathtitude"
bridge_instance = "https://bridge.suumitsu.eu/"
#Get tweet in json from RSS bridges
url = bridge_instance + "?action=display&bridge=Twitter&u=" + account + "&format=Json"
json_content = requests.get(url=url)
tweets = json_content.json()
for tweet in tweets :
if keyword in tweet.get("title"):
print(tweet.get("fullname") + " : " + tweet.get("title") + " - " + datetime.datetime.fromtimestamp(float(tweet.get("timestamp"))).strftime('%Y-%m-%d %H:%M:%S') )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment