1.4.3 • Published 5 years ago

twitter-extract-widgets v1.4.3

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

twitter-extract-widgets

npm (scoped) npm bundle size (minified) npm downloads npm licence

Extract information from Twitter Widgets

Install

$ npm install twitter-extract-widgets

Usage

Node

const extract = require("twitter-extract-widgets");

// minimal config
var config = { profiles: ['BarackObama'] }
extract(config).then(twitts => console.log(twitts))

Browser

<script type="text/javascript" src="twitter-extract-widgets"></script>
<script type="text/javascript">
    var config = { profiles: ['BarackObama'] }
    extract(config).then(tweets => console.log(tweets))
</script>

Configuration

config = {
    profiles: ['BarackObama', 'realDonaldTrump', 'HillaryClinton'], // twitter user name
    showAuthor: true,
    showRetwitts: false,
    showMedia: true,
    noOfTwitts: 26,
}

// return format
{ BarackObama:
    [   {   isRetwitt: false,
            id: '1098659030204116992',
            body:
            'It’s up to all of us as citizens to make sure that the rules of democracy are fair—everywhere'
            'because the next decade of our nation\'s progress is on the line. Join me and @allontheline'
            'in the fight against gerrymandering: http://allontheline.org .',
            time: 'Feb 21, 2019',
            timestamp: '2019-02-21T19:01:39+0000',
            link: 'https://twitter.com/BarackObama/status/1098659030204116992',
            author:
                {   name: 'Barack Obama',
                    username: '@BarackObama',
                    link: 'https://twitter.com/BarackObama',
                    img: 'https://pbs.twimg.com/profile_images/822547732376207360/5g0FC8XX_bigger.jpg' },
            media: [ 'https://pbs.twimg.com/media/Dz8fnh5WwAY4WB1?format=jpg&name=large' ] },
        {...}   ]   }
1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago