
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign hits npm.
@tcortega/twitter-scraper
Advanced tools
Twitter Scraper & Media Downloader. Scrape info from any tweet.
Scrape and download useful information from Twitter.
This is not an official API support. This is just a scraper which uses Twitter's web API to scrape media and related meta information.
yarn test
yarn build
twitter-scraper requires Node.js v10+ to run.
Install from NPM
npm i -g @tcortega/twitter-scraper
Install from YARN
yarn global add @tcortega/twitter-scraper
.getTweetMeta(tweetUrl) // Scrape tweet metadata from a specific tweet (Promise).
const { TwitterScraper } = require("@tcortega/twitter-scraper");
// Tweet Metadata by tweet url.
(async () => {
try {
const twtScraper = await TwitterScraper.create();
const tweetMeta = await twtScraper.getTweetMeta("https://twitter.com/Twitter/status/1390396166496522247");
console.log(tweetMeta);
} catch (error) {
console.log(error);
}
})();
Example output for the methods: getTweetMeta
// Note that everything inside media_url is usually sorted by the bitrate descendingly
{
id: '1379101721343975426',
created_at: 'Mon Apr 05 16:00:47 +0000 2021',
description: 'Hey #DisabilityTwitter, thank you so much for your feedback about captioning our videos. We hear you, we see you, we’ve added captions to this @TwitterSpaces announcement. What do you think? We’ll continue to level up our captioning process moving forward. #UntilWeAllBelong https://t.co/E3EK7MZmgR',
isMedia: true,
favorite_count: 2759,
retweet_count: 489,
reply_count: 1188,
quote_count: 111,
isVideo: true,
media_url: [
{
bitrate: 2176000,
content_type: 'video/mp4',
url: 'https://video.twimg.com/ext_tw_video/1379100778439270410/pu/vid/1280x720/iUvXD6H13QiZF7mp.mp4?tag=12'
},
{
bitrate: 832000,
content_type: 'video/mp4',
url: 'https://video.twimg.com/ext_tw_video/1379100778439270410/pu/vid/640x360/ilHR1Y8Zl6yRIXOi.mp4?tag=12'
},
{
bitrate: 256000,
content_type: 'video/mp4',
url: 'https://video.twimg.com/ext_tw_video/1379100778439270410/pu/vid/480x270/KFG8GZ4tSTtjwwuk.mp4?tag=12'
}
]
}
FAQs
Twitter Scraper & Media Downloader. Scrape info from any tweet.
We found that @tcortega/twitter-scraper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign hits npm.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.