SON#51
SON#51

Finding Email Patterns

import re
import requests
from bs4 import BeautifulSoup

# 크롤링할 URL
url = 'https://www.naver.com/'

# HTML 가져오기
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')

# HTML에서 텍스트 추출
text = soup.get_text()

# 정규 표현식 패턴: 이메일 주소 찾기
email_pattern = r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'

# 이메일 주소 찾기
emails = re.findall(email_pattern, text)

# 추출한 이메일 주소 출력
for email in emails:
    print(f"찾은 이메일 주소: {email}")

I searched for my email while logged in, but why can't I find it?

Comment
No comment