cbanbury / social-handle-scraper
Automatically grab social media handles from website
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.23
2020-06-03 16:14 UTC
Requires
- chrome-php/chrome: ^0.6.0
- layershifter/tld-extract: ^2.0
Requires (Dev)
- phpunit/phpunit: ^8
README
Automatically grab social media handles from website. Attempts to avoid other social media buttons etc on site (.e.g. sharing buttons, YouTube links, website builders)
Will use wget first to grab page content.
Installation
Requires wget
as an executable to scrape pages, on Ubuntu:
sudo apt install wget chromium-browser
## Example
use CBanbury\SocialHandleScraper\HandleScraper;
$url = 'example.com'; $scraper = new HandleScraper($url); $handles = $scraper->getHandles()
--> [ 'facebook' => 'example', 'twitter' => 'twitexample', 'instagram' => 'instahandle', 'title' => 'Page Title' ]