Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leny/twitter-scraper
A simple scraper to gather users' stats from twitter profile.
https://github.com/leny/twitter-scraper
Last synced: 7 days ago
JSON representation
A simple scraper to gather users' stats from twitter profile.
- Host: GitHub
- URL: https://github.com/leny/twitter-scraper
- Owner: leny
- License: mit
- Created: 2019-01-09T22:18:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T04:33:11.000Z (over 3 years ago)
- Last Synced: 2024-09-25T19:40:13.285Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 527 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @leny/twitter-scraper
[![NPM version](http://img.shields.io/npm/v/%40leny%2Ftwitter-scraper.svg)](https://www.npmjs.org/package/%40leny%2Ftwitter-scraper) ![Downloads counter](http://img.shields.io/npm/dm/%40leny%2Ftwitter-scraper.svg)
> A simple scraper to gather users' stats from twitter profile.
* * *
## Usage
### Installation
To use **@leny/twitter-scraper**, you must at first install it.
npm install --save @leny/twitter-scraper
### Usage
Simply import and call the function with the twitter username you want to scrap stats.
```javascript
import scraper from "@leny/twitter-scraper";
(async () => {
const {
tweets,
following,
followers,
favorites,
} = await scraper("leny_be");
})();
```The function returns and object with four properties, which are numbers or `null`, if the parsing fails.
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style.
## License
Copyright ©2019 Leny
Licensed under the MIT license.