Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 1 month ago
JSON representation

Easy way to find emails from social networks

Awesome Lists containing this project

README

        

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b551c6697f3647948421f59603d05f5f)](https://www.codacy.com/app/matheus-marabesi/social-crawler?utm_source=github.com&utm_medium=referral&utm_content=marabesi/social-crawler&utm_campaign=badger)
[![Build Status](https://travis-ci.org/marabesi/social-crawler.svg?branch=master)](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()})
";
}
}
}
```