mirror of
https://github.com/DiegoCaraballo/Email-extractor.git
synced 2024-09-20 06:46:01 +08:00
Fix .decode('utf-8')
This commit is contained in:
parent
ca70b86aa9
commit
dc65b03bf1
|
@ -688,7 +688,7 @@ def extractOnlyUrl(url):
|
|||
if(status != 200 or contentType == "audio/mpeg"):
|
||||
raise ValueError('Bad Url...')
|
||||
|
||||
html = conn.read().decode('utf-8')
|
||||
html = conn.read().decode(conn.headers.get_content_charset())
|
||||
|
||||
emails = re.findall(r'[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}', html)
|
||||
|
||||
|
@ -743,7 +743,7 @@ def extractUrl(url):
|
|||
if(status != 200 or contentType == "audio/mpeg"):
|
||||
raise ValueError('Bad Url...')
|
||||
|
||||
html = conn.read().decode('utf-8')
|
||||
html = conn.read().decode(conn.headers.get_content_charset())
|
||||
|
||||
emails = re.findall(r"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", html)
|
||||
print ("Searching in " + url)
|
||||
|
|
Loading…
Reference in a new issue