You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

email-scraper

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-scraper - pypi Package Compare versions

Comparing version
0.2
to
0.3
+2
-2
email_scraper.egg-info/PKG-INFO
Metadata-Version: 1.1
Name: email-scraper
Version: 0.2
Version: 0.3
Summary: Simple utility to extract email addresses from HTML, including obfuscated email addresses

@@ -18,3 +18,3 @@ Home-page: https://github.com/kichik/email-scraper

.. _PyPI: https://pypi.python.org/pypi/email-scraper/
.. _PyPI: https://pypi.org/pypi/email-scraper/

@@ -21,0 +21,0 @@ .. image:: https://travis-ci.org/kichik/email-scraper.svg?branch=master

README.rst
setup.cfg
setup.py

@@ -3,0 +4,0 @@ email_scraper/__init__.py

@@ -12,7 +12,26 @@ import base64

HIDDEN_AT_SYM = (" (at) ", " [at] ", " (@) ", " [@] ", " @ ")
HIDDEN_DOT_SYM = (" (dot) ", " [dot] ", " (.) ", " [.] ", " . ")
HIDDEN_REGEX = [
'(\w+({0})\w+({1})\w+)'.format(
at.replace("(", r"\(").replace(")", r"\)").replace("[", r"\[").replace("]", r"\]"),
dot.replace("(", r"\(").replace(")", r"\)").replace("[", r"\[").replace("]", r"\]"),
)
for at, dot in zip(HIDDEN_AT_SYM, HIDDEN_DOT_SYM)
]
def extract_emails(text):
return re.findall(EMAIL_REGEX, text)
def unhide_email(hidden_email):
for at_sym in HIDDEN_AT_SYM:
hidden_email = hidden_email.replace(at_sym, "@")
for dot_sym in HIDDEN_DOT_SYM:
hidden_email = hidden_email.replace(dot_sym, ".")
return hidden_email
hidden = []
for expr in HIDDEN_REGEX:
hidden += [unhide_email(i[0]) for i in re.findall(expr, text)]
return re.findall(EMAIL_REGEX, text) + hidden
def deobfuscate_html(html):

@@ -19,0 +38,0 @@ def unescape(html_text):

Metadata-Version: 1.1
Name: email-scraper
Version: 0.2
Version: 0.3
Summary: Simple utility to extract email addresses from HTML, including obfuscated email addresses

@@ -18,3 +18,3 @@ Home-page: https://github.com/kichik/email-scraper

.. _PyPI: https://pypi.python.org/pypi/email-scraper/
.. _PyPI: https://pypi.org/pypi/email-scraper/

@@ -21,0 +21,0 @@ .. image:: https://travis-ci.org/kichik/email-scraper.svg?branch=master

@@ -10,3 +10,3 @@ ####################################################

.. _PyPI: https://pypi.python.org/pypi/email-scraper/
.. _PyPI: https://pypi.org/pypi/email-scraper/

@@ -13,0 +13,0 @@ .. image:: https://travis-ci.org/kichik/email-scraper.svg?branch=master

@@ -0,1 +1,4 @@

[bdist_wheel]
universal = 1
[egg_info]

@@ -2,0 +5,0 @@ tag_build =