xpwizard
Junior Member
- Nov 6, 2010
- 198
- 123
I've decided to share some more code with the forum 
Twitter Email Scraper
Features:
- Scrapes Twitter search api for emails in real-time
- Ensures no duplicates are saved
- Saves emails into monthly log files based on the originating domain name (under 'logs')
- Outputs log file with total emails found during each run (located in 'system/log/twitter/')
Requirements:
- Curl enabled
- Cron enabled (optional, but required to fulfill the potential of the script)
** Cron every one minute for the best results
How to use:
- Edit the first line in 'settings.txt' to your search query (I've left mine in there)
- If you save to file, define a file name
- Logs will be saved into a subfolder named "logs"
Note:
- This script was made to be run via cron. While it can run manually it will not be as efficient/less emails will be collected
- If you do not have php-cli enabled, you can wget the script as your cron call
- This script is apart of a bigger scraping project which is why there are so many folders
- If there are no emails, the log file will not output anything. As can be seen below at '6:00pm'
Samples of files:
settings.txt
Gmail_com.txt:
09-01_log.txt:
Download:
Virustotal:
Result: 0/ 43 (0.0%)
**EDIT**
It seems a few members are unsure what this does...
This is a script that simply searches for the last 100 tweets (or the # since your last search) containing your search query.
From there it will look for any emails within those tweets and scrape them.
There is one flaw in this script that I forgot to mention. When you change the search query (in settings.txt), you have to delete the second line of text if it exists...
So you will only be left with the first line (no second line at all, no spaces, or anything).
Twitter Email Scraper
Features:
- Scrapes Twitter search api for emails in real-time
- Ensures no duplicates are saved
- Saves emails into monthly log files based on the originating domain name (under 'logs')
- Outputs log file with total emails found during each run (located in 'system/log/twitter/')
Requirements:
- Curl enabled
- Cron enabled (optional, but required to fulfill the potential of the script)
** Cron every one minute for the best results
How to use:
- Edit the first line in 'settings.txt' to your search query (I've left mine in there)
- If you save to file, define a file name
- Logs will be saved into a subfolder named "logs"
Note:
- This script was made to be run via cron. While it can run manually it will not be as efficient/less emails will be collected
- If you do not have php-cli enabled, you can wget the script as your cron call
- This script is apart of a bigger scraping project which is why there are so many folders
- If there are no emails, the log file will not output anything. As can be seen below at '6:00pm'
Samples of files:
settings.txt
Code:
"hotmail.com" OR "gmail.com" OR "yahoo.com" OR "aol.com" OR "live.com" OR "msn.com" OR "aim.com" -http
Gmail_com.txt:
Code:
09-01_log.txt:
Code:
####################### 5:55 PM 09 Jan 2012 #######################
5:55 PM - Total = 12 Emails added
####################### 5:56 PM 09 Jan 2012 #######################
5:56 PM - Total = 9 Emails added
####################### 5:57 PM 09 Jan 2012 #######################
5:57 PM - Total = 18 Emails added
####################### 5:58 PM 09 Jan 2012 #######################
5:58 PM - Total = 12 Emails added
####################### 5:59 PM 09 Jan 2012 #######################
5:59 PM - Total = 5 Emails added
####################### 6:00 PM 09 Jan 2012 #######################
####################### 6:01 PM 09 Jan 2012 #######################
6:01 PM - Total = 16 Emails added
...
Download:
Code:
http://www.mediafire.com/?lvo1pyy4yk5asoa
Virustotal:
Code:
http://www.virustotal.com/file-scan/report.html?id=ecd813d906f143bbea1f8d01a147b7ca37a05df6003ffc9448494e0f4c1bd886-1326160952
Result: 0/ 43 (0.0%)
**EDIT**
It seems a few members are unsure what this does...
This is a script that simply searches for the last 100 tweets (or the # since your last search) containing your search query.
From there it will look for any emails within those tweets and scrape them.
There is one flaw in this script that I forgot to mention. When you change the search query (in settings.txt), you have to delete the second line of text if it exists...
So you will only be left with the first line (no second line at all, no spaces, or anything).
Last edited: