📜  从网站 python 代码示例中抓取列表中的电子邮件

📅  最后修改于: 2022-03-11 14:47:03.800000             🧑  作者: Mango

代码示例1
#email regex found on stackoverflow
email_regex= "([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)"
#to put all mails in a list from a string that refers to an html text code 
import re
import request
url = requests.get("PUT URL HERE")
html_text = url.text
emails = re.findall(email_regex, html_text)