
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
scrape-twitter
Advanced tools
scrape-twitter
🐦 Access Twitter data without an API key
This module provides command line interfaces to scrape: profiles, timelines, connections, likes, search and conversations.
It also exposes both streams and a promise returning function to help accessing Twitter in your own applications.
Real-time firehoses can be created using the companion module monitor-head-stream
.
isReplyToId
$ scrape-twitter profile sebinsua
# ...
$ scrape-twitter timeline nouswaves
# ...
This command requires a valid login. It will check for the following environment variables: TWITTER_USERNAME
, TWITTER_PASSWORD
, TWITTER_KDT
. But can also pick these up from a dotenv
file at the path ~/.scrape-twitter
. The first time you login you will be asked to store the TWITTER_KDT
- this is used by Twitter to recognise your device.
$ scrape-twitter likes sebinsua
# ...
This command also requires a valid login.
$ scrape-twitter connections sebinsua --type=following
# ...
$ scrape-twitter conversation ctbeiser 691766715835924484
# ...
$ scrape-twitter search --query "from:afoolswisdom motivation" --type latest
# ...
$ scrape-twitter list nouswaves list
# ...
jq
, coreutils/gshuf
and terminal-notifier
For example, a MOTD-like script might contain:
scrape-twitter search --query="from:afoolswisdom knowledge" | jq -r '.[].text' | gshuf -n 1 | terminal-notifier -title "Knowledge (MOTD)"
With yarn
:
yarn global add scrape-twitter
With npm
:
npm install -g scrape-twitter
new TimelineStream(username: string, { retweets: boolean, replies: boolean, count: ?number })
Create a ReadableStream<Tweet>
for the timeline of a username
.
new LikeStream(username: string, { count: ?number, env: process.env })
Create a ReadableStream<Tweet>
for the likes of a username
.
new ConnectionStream(username: string, type: 'following' | 'followers', process.env)
Create a ReadableStream<UserConnection>
for the connections of a username
.
new ConversationStream(username: string, id: string, { count: ?number })
Create a ReadableStream<Tweet>
for the conversation that belongs to a username
and tweet id
.
new ThreadedConversationStream(id: string)
Create a ReadableStream<Tweet>
for the thread that belongs to a tweet id
.
new TweetStream(query: string, type: 'top' | 'latest', { count: ?number })
Create a ReadableStream<Tweet>
for the tweets that match a query
and type
.
new ListStream(username: string, list: string, { count: ?number })
Create a ReadableStream<Tweet>
for the username
's list
.
getUserProfile(username: string)
Get a Promise<UserProfile>
for a particular username
.
FAQs
Access Twitter data without an API key.
The npm package scrape-twitter receives a total of 15 weekly downloads. As such, scrape-twitter popularity was classified as not popular.
We found that scrape-twitter 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.