alirezamika / autoscraper

A Smart, Automatic, Fast and Lightweight Web Scraper for Python
MIT License
6.16k stars 648 forks source link

Trying to scrap email address from any given website. #65

Closed gpnaveen closed 2 years ago

gpnaveen commented 2 years ago

Trying to scrap email address from any given website.

It returns empty list.

How it can be used to scrap all the email gives on website.

alirezamika commented 2 years ago

what's the code you are using?

gpnaveen commented 2 years ago
from autoscraper import AutoScraper

url = 'https://stackoverflow.com/questions/2081586/web-scraping-with-python'

# We can add one or multiple candidates here.
# You can also put urls here to retrieve urls.
wanted_list = ["@"]

scraper = AutoScraper()
result = scraper.build(url, wanted_list)
print(result)
alirezamika commented 2 years ago

no need to use this package for this usecase. just use a regex to find emails in the html content.

lorey commented 2 years ago

Here's the regex: https://github.com/lorey/social-media-profiles-regexs#email