Git Product home page Git Product logo

easyweb-scrape's Introduction

easyweb-scrape

Web Scraping for Email and other contact information

Requires BeautifulSoup


Web scraping is a messy science. Most people stay clear from it for the following reasons.

  1. Websites constantly change.
  2. Every website is essentially different.
  3. Not standards. Wouldn't it be nice if the standard for contact was in XML.
  4. Degradation of DOM.
  5. Flash driven websites.
  6. Contact info embedded in images or other media.
  7. Extracting contact name (a person) and email: nearly impossible.
  • Names most often don't follow an email tag.
  • Not on the same line or same couple of lines.
  • Hard to distinguish name: example (dolphin, razor, Peter) words or names?

This script is designed to scrape a list of urls:

http://foo.com
http://bar.com 
http://hop.com
etc...
  1. Builds an array of all urls from a domain.
  2. Stay within the domain name.
  3. Search for email addresses.
  4. Creates csv of result.dat consisting of: URL,Email
  • just rename the file to result.csv.
  1. Creates error.dat consisting of domains it could not connect to.
  2. Script is extremely simple to follow and modify

Todo

  1. Perhaps add error file on second loop and write another file on links it could not scrape. List might get large.
  2. Create two methods and clean up code.
  3. explore additional unicode features for extracting email addresses that are not using @ at: character.
  4. What about searching for name @ foo .com
  5. DNS lookup for contact info (last resort)
  6. Speed up search by only searching links that contain /About /Contact /Info not all sites follow this convention.

easyweb-scrape's People

Contributors

thecount12 avatar

Watchers

James Cloos avatar FilipS avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.