gotcha-email

Gets email addresses based on urls.

Usage no npm install needed!

<script type="module">
  import gotchaEmail from 'https://cdn.skypack.dev/gotcha-email';
</script>

README

GotchaEmail

A simple and intuitive way to search for email addresses on websites.

Many thanks to the creator @ibrod83 and contributors of nodejs-web-scraper.

with the help of the following object tree search package object-scan made by @simlu.

To install run:

npm i gotcha-email

Functionality

Searching for email addresses

const gotchaEmail = new GotchaEmail(url);

Instantiates the GotchaEmail class with a url. Note: The url can be an empty string but when you try to retrieve email addresses from a website none will be found, because the program doesnt not know which website to search.

Getting the email addresses from the url

const emailAddresses = await gotchaEmail.getEmailsFromUrl();

will return an array of email addresses that were found on the root page or at any page that can be navigated to by using the link on the root page. Remember that it is asynchronous!

Changing the url that should be searched

gotchaEmail.setUrl(url);

will allow you to change the url/website that the search will be performed on after instantiating the object with the first url.