Scrap all emails with eMacros from a website

This page is to explain how to scrap all emails from many pages.
Lets take this website as example: www.immostreet.com

This a french website with a plenty of email I would like to scrap using iMacros.

First install iMacros for Firefox https://addons.mozilla.org/fr/firefox/addon/imacros-for-firefox/

Then Create a new Macro in Javascript.

 

The code is here:

 

// settings
var pageBegin = 1;
var pageEnd = 10;
var user = "alan";

//var folderName = "/Users/alan/GoogleDrive/Projets/GooPlus/Projetsencours/agence_immo";
var folderName = "*";
var fileName = pageBegin+"_to_"+pageEnd+"_"+user+"_email_immos.txt";
var urlToGo = "http://www.immostreet.com/Agency/Search?place=%C3%8Ele-de-France&place_id=4832011&currentPage=";



//code
for (var page = pageBegin; page < pageEnd; page++) {
  var macro = "CODE:";
  macro += "URL GOTO=" + urlToGo+page+"\n";
  iimPlay(macro);

  for (var i = 1; i < 11; i++) {
    var macro = "CODE:";
         macro += "TAG POS="+i+" TYPE=A ATTR=CLASS:mailto&&TXT:* EXTRACT=TXT"+"\n";
         macro += "SAVEAS TYPE=EXTRACT FOLDER="+folderName+" FILE=" + fileName;
    iimPlay(macro);
  }
}

The iMacro is set as javaScript

Demo:

0 réponses

Répondre

Se joindre à la discussion ?
Vous êtes libre de contribuer !

Laisser un commentaire