GithubHelp home page GithubHelp logo

superneat255 / emails_phones_scraping Goto Github PK

View Code? Open in Web Editor NEW

This project forked from genone22/emails_phones_scraping

0.0 0.0 0.0 14 KB

Extract emails and phone numbers from the list of url addresses

Python 100.00%

emails_phones_scraping's Introduction

This is a Python script for web scraping that extracts contact information (email and phone numbers) from a list of websites provided in a text file named web_urls.txt. The script is multithreaded, making it suitable for processing a large number of websites concurrently.

Prerequisites

Before running the script, make sure you have the following prerequisites installed:

Python 3.x
Required Python packages (install using pip install <package_name>):
    coloredlogs
    pandas
    beautifulsoup4
    requests
    openpyxl
    requests_random_user_agent

Usage/Examples

python main.py

Replace main.py with the actual name of the Python script.

The script will start processing the URLs in the web_urls.txt file concurrently, extracting email and phone number information. Progress and errors will be displayed in the terminal.

Once the scraping process is complete, the script will generate an Excel file named websites_info.xlsx containing the extracted contact information.

Configuration

You can adjust the number of concurrent threads by modifying the num_threads variable in the main() function. Increasing the number of threads may improve performance but consume more system resources.

Notes

This script uses multithreading to scrape multiple websites simultaneously. However, be aware that excessive concurrent requests may result in IP blocks or CAPTCHA challenges from websites.

The script is configured to ignore SSL certificate verification (via verify=False) when making HTTP requests. This is done to simplify the script but is not recommended for production use. Consider using a more secure approach in production environments.

The extracted contact information is saved in an Excel file named websites_info.xlsx. You can modify the output format or file name as needed in the main() function.

Disclaimer

Use this script responsibly and ensure that you have the legal right to scrape the websites you target. Web scraping may be subject to legal restrictions and terms of service agreements of the websites being scraped. Be respectful of website owners' policies and guidelines.

emails_phones_scraping's People

Contributors

genone22 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.