Code Monkey home page Code Monkey logo

scrape-schools-contact-emails's Introduction

School Contact Scraper

Description

This Python application uses Selenium, running in a Dockerized environment, to scrape school websites for contact information. It iterates over a predefined list of places, accesses a school listing website for each, collects URLs for individual schools, and scrapes each school's website for contact details like email addresses.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Docker and Docker Compose are installed on your machine.
  • Basic knowledge of Docker and containerization.

Setup

To set up the School Contact Scraper, follow these steps:

  1. Clone the repository to your local machine.
  2. Navigate to the cloned directory.

Running the Application

To run the application, execute the following command in the terminal:

docker-compose up --build

This command builds the Docker images and starts the containers as defined in your docker-compose.yml file. Specifically, it sets up a Selenium Hub, a Chrome node, and your application in separate containers.

Files and Directories

The project structure includes the following files and directories:

  • docker-compose.yml: Defines the multi-container Docker applications.
  • Dockerfile: Instructions for building the application's Docker image.
  • requirements.txt: Lists the Python dependencies for the application.
  • scrape.py: The main Python script for scraping websites.
  • school_emails.csv: File where scraped email addresses are stored.
  • wait-for-it.sh: A script for controlling the order of service startup in Docker Compose.

Stopping the Application

To stop the application and remove the containers, networks, and volumes created by docker-compose up, run:

docker-compose down

Additional Notes

  • Ensure that the ports defined in docker-compose.yml are available on your machine.
  • The application's behavior can be modified by changing the list of places in scrape.py.

Contributing

For any contributions or suggestions, please open an issue or submit a pull request.

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.