as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a web crawler to extract emails from a website.
user
import requests 
from bs4 import beautifulsoup

def crawler(url):
    # request the page from the given url
    resp = requests.get(url)
    # create the beautifulsoup object
    soup = beautifulsoup(resp.text, 'html.parser')
    
    # find all email addresses on the page
    emails = [a.attrs.get('href') for a in soup.select('a[href^=mailto:]')]
    
    return emails
assistant