dev-master
9999999-dev https://github.com/alexroan/twitter-scraperScrapes tweets from a user's profile
MIT
The Requires
by Alex Roan
twitter scraping scraper scrape tweets webscraping
Wallogit.com
2017 © Pedro Peláez
Scrapes tweets from a user's profile
Grab tweets from a user's public profile without api credentials, (*1)
composer require alexroan/twitter-scraper, (*2)
//get feed
$feed = Twitter_Scraper::get_feed('alexroan');
//loop through posts
foreach($feed as $tweet){
//tweet id
$id = $tweet->id;
//username of tweeter
$username = $tweet->username;
//bool whether retweet or not
$is_retweet = $tweet->is_retweet;
//body text of tweet
$text = $tweet->text;
//time tweeted
$time = $tweet->time;
//any media in tweet
$media = $tweet->media;
//number of replies
$reply = $tweet->reply;
//number of retweets
$retweet = $tweet->retweet;
//number of favourites
$favourite = $tweet->favourite;
}
Scrapes tweets from a user's profile
MIT
twitter scraping scraper scrape tweets webscraping