Last active
March 19, 2021 18:18
-
-
Save vncsna/c383e9c0387632815f691500c24ed874 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
.get( | |
'statuses/user_timeline', | |
{screen_name: 'vncsna', | |
count: 200, | |
exclude_replies: true} | |
) | |
.then(result => { | |
tweets = result.data | |
for (let tweet of tweets) { | |
created_at = new Date(tweet.created_at).getTime() | |
elapsed_time = (Date.now() - created_at) / 8.64e+7 | |
elapsed_time = elapsed_time / 42 | |
if (tweet.text.includes('RT') && | |
Math.random() < elapsed_time ** 4.0 + .02) { | |
console.log(tweet.text) | |
rogerio_skylab(tweet.id_str) | |
} | |
} | |
}) | |
.catch(error => { | |
console.log(error) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment