Esempio n. 1
0
def test_gets_emails_from_html_realworld():
    html = full_page.FULL_PAGE
    soup = BeautifulSoup(html, 'html.parser')
    html_txt = soup.get_text()
    emails = extract_from_text(EMAIL_REGEX, html_txt)
    return emails
Esempio n. 2
0
 def extract_email_text(self, html):
     for email in extract_from_text(EMAIL_REGEX, html):
         yield email
Esempio n. 3
0
def test_gets_emails_from_html_text_simple():
    html = html_pages.PAGE_ONE
    soup = BeautifulSoup(html, 'html.parser')
    html_txt = soup.get_text()
    emails = extract_from_text(EMAIL_REGEX, html_txt)
    assert len(emails) == 2