A nodejs package to scrape user's profile data from twitter automatically.
npm install twitter-profile-scraperTwitter-Profile-Scraper is a nodejs package to scrape user profile data on twitter using browser automation.
It currently runs only on windows.
sh
npm install twitter-profile-scraper
`$3
In this example we first import package, then we login with cookies and scrape data.
`sh
var twitter=require("twitter-profile-scraper");function get_data(response){
var data=response["body"]
console.log("data",data)
//data={"Joined": "Joined", "Info": "Info", "DOB": "DOB", "Following": "Following", "Website": "Website", "Followers": "Followers", "Location": "Location", "Twitter_Id": "Twitter_Id", "Name": "Name", "TweetsCount": "TweetsCount"}
}
function profile(){
twitter.get_user('profile_url',get_data)
}
twitter.login_cookie(cookie_list,profile)
`#### DataKund
datakund is needed for browser automation. As soon as this package is imported in code, automated browser will open up.
$3
`sh
var twitter=require("twitter-profile-scraper");
`$3
`sh
twitter.login(username,password)
`$3
`sh
twitter.login_cookie(list_of_cookies)
`$3
`sh
twitter.get_user('profile_url',get_data)
``