twitter_media_AutoDownloader.js var Twit = require('twit') var http = require('https'); var fs = require('fs'); var mkdirp = require("mkdirp") var T = new Twit({ consumer_key: '', consumer_secret: '', access_token: '', access_token_secret: '', }) var stream = T.stream('user') stream.on('tweet', function (tweet) { if(tweet.extended_entities != null && tweet.extended_entities.media[0].type === 'phot