Last active
March 19, 2021 18:18
-
-
Save vncsna/c40088ff215ad2dbe6b45e83ac854159 to your computer and use it in GitHub Desktop.
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
function post_tweet(tweet){ | |
twitter.post( | |
'statuses/update', | |
{'status': tweet} | |
) | |
} | |
function post_phrase(){ | |
let phrases = require('./scraping/pensador-phrases-2020-12-28.json') | |
let keys = Object.keys(phrases) | |
let k = Math.floor(Math.random() * keys.length) | |
let phrase = phrases[keys[k]].phrase | |
let author = phrases[keys[k]].author | |
console.log(phrase + ' - ' + author) | |
post_tweet(phrase + ' - ' + author) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment