https://github.com/marabesi/social-crawler
Easy way to find emails from social networks
https://github.com/marabesi/social-crawler
crawler emails php social-crawler social-network
Last synced: 4 months ago
JSON representation
Easy way to find emails from social networks
- Host: GitHub
- URL: https://github.com/marabesi/social-crawler
- Owner: marabesi
- License: mit
- Created: 2016-01-10T22:31:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-05-20T06:45:23.000Z (about 7 years ago)
- Last Synced: 2025-04-29T04:42:52.694Z (about 1 year ago)
- Topics: crawler, emails, php, social-crawler, social-network
- Language: PHP
- Size: 596 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.codacy.com/app/matheus-marabesi/social-crawler?utm_source=github.com&utm_medium=referral&utm_content=marabesi/social-crawler&utm_campaign=badger)
[](https://travis-ci.org/marabesi/social-crawler)
# Social Crawler
Find emails from socials network !
## Dependency
* Google URL
* Monolog
## Find e-mails from Gmail in Instagram
Define which email you're going to find and where you want to search, in out example we're going to find
email from gmail in **Instagram**
``` php
$factory = new \SocialCrawler\Domain\Factory();
$email = $factory->create(\SocialCrawler\Domain\Gmail::GMAIL);
$source = new \SocialCrawler\Domain\Source\Instagram();
```
Then just execute the search with **GoogleUrl**
``` php
$engine = new \GoogleUrl();
$search = new \SocialCrawler\Domain\Container($engine, $source);
$result = $search->retrieveDataFromSource($email, $page)
->getResultSet();
```
As a last step iterate over the result to get the emails
``` php
foreach ($result as $object) {
try {
print $email->find($object->getTitle()) . '
';
} catch (\Exception $exception) {
//print "Couldn't find email in the object in the title ({$object->getTitle()})
";
} finally {
try {
print $email->find($object->getSnippet()) . '
';
} catch (\Exception $exception) {
//print "Couldn't find email in the object in the snippet ({$object->getSnippet()})
";
}
}
}
```