Scraping GMAIL for contacts

In our previous posts we’ve looked at how to scrape both Yahoo! and AOL webmail for a list of contacts given a username and password. This technique can be critical in growing your user base by allowing your users to invite many friends in one quick and easy step. Our next site that we supported is GMail.

However, for GMail we did not use our JScrape API but rather just used the G4J API. It was extremely easy to use and to incorporate into our framework. I recommend downloading it and testing it, it should only take a few short lines of code, here is what I did:

GMConnector gm = new GMConnector(userID,passwd,1);
gm.connect();
GMContact [] data = gm.getContact(1, “”);