Skip to content

Instantly share code, notes, and snippets.

@heffo42
Last active July 7, 2019 19:06
Show Gist options
  • Save heffo42/0532433cd444170fe8d48db79e139922 to your computer and use it in GitHub Desktop.
Save heffo42/0532433cd444170fe8d48db79e139922 to your computer and use it in GitHub Desktop.
def main():
client = MongoClient('mongodb://mongodb:27017', username='<username>', password='<password>', authSource='admin')
tweetCol = client['twitter']['tweets']
todoCol = client['twitter']['queriesTodo']
currentQuery = todoCol.find_one_and_delete({})
while currentQuery != None:
executeQuery(currentQuery["qWords"], currentQuery["since"], currentQuery["until"], tweetCol)
currentQuery = todoCol.find_one_and_delete({})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment