Is an unofficial Twitter client written in selenium and node js. Keep in mind that everything is not done for you. 😄 So you to join the parts/blocks of code to achieve whatever outcome you want.
Its more like a library where you are given classes(the blocks) and you have to join them in a certain way or configuration inorder to achieve your goal(a giant toy or robot or whatever)
With that said i am not reponsible if you get suspended from twitter. Be a good netizen and follow the rules. Noobs! be careful
-
Clone the project
git clone https://github.com/takumade/crow.git
-
Install node modules
cd crow && npm install
-
Do some coding and play npm run start
Before you can you can do anything you need to first get a twitter client. A twitter client is a logged in user
- Add your creds in
constants.ts
export const username = "username"
export const password = "password"
The constants file contains many options that you may want to play with
- Now obtain a client and .....play
import { TwitterClient } from "./classes/crow/twitter_client"
const getTweets = async () => {
try{
let client = new TwitterClient()
let result = await client.getClient()
if(result){
// Do your stuff here
}
}catch(e){
console.log(e)
}
}
1. Get the current trends
// Get Twitter client first
let trends = await client.getTrends()
2. Tweet something
// Get Twitter client first
await client.tweet("Hello World! how are you");
3. Like, Retweet and Reply a tweet
import { Tweet } from "./classes/crow/tweet"
...
// get client first
let tweet = new Tweet(client.driver, <tweetUrl>)
await tweet.like()
await tweet.retweet()
await tweet.reply("Sounds Awesome!")
4. Get user info
import User from "./classes/crow/user"
...
//get client first
let user = new User(client.driver, <username>)
let info = await user.getUserInfo()
5. Follow user
import User from "./classes/crow/user"
...
//get client first
let user = new User(client.driver, <username>)
let info = await user.follow()
TwitterClient
:: Deals mainly with logging you in and doing general stuff like getting tweets, trends
Tweet
:: Deals with a single tweet
User
:: Deals with a tweeter user
Browser
:: Has helper functions
Feature | Done | Is Working |
---|---|---|
Auth | ☑️ | ☑️ |
Get User | ☑️ | ☑️ |
Get User Followers | ☑️ | ☑️ |
Get User Following | ☑️ | ☑️ |
Follow User | ☑️ | ☑️ |
Unfollow User | ☑️ | ☑️ |
Get Trending | ☑️ | ☑️ |
Get Tweets | ☑️ | ☑️ |
Reply to a tweet | ☑️ | ☑️ |
Tweet a text message | ☑️ | ☑️ |
Like a tweet | ☑️ | ☑️ |
Delete a tweet | ☑️ | ☑️ |
Login with cookies | ☑️ | ☑️ |
Turn it into a package | ☑️ | ☑️ |
So you want to contribute? Ok you are welcome to do so, just dont something that can be simply done but the current code. I will be rejecting bad and unclear code.
Do you wish to sponsor this project so it can continue getting the attention it needs? Or you just want to buy it so it can be yours. Maybe you are twitter and you want this off the streets.
Send Me a Whatsapp and lets talk.