Coder Social home page Coder Social logo

python_java-word-cloud's Introduction

python-bs4-web-scraping

Overview

This project involves web scraping multiple websites using BeautifulSoup (bs4) to extract the most common words and their frequencies. The collected data is then processed, translated using Deepl, and analyzed to find common words among different websites. The results are presented in various CSV files, providing insights into word frequency and commonalities across different web pages.

Setup

  1. Clone the repository:

    git clone https://github.com/KeremDUZENLI/python-bs4-web-scraping.git
  2. Navigate to the project directory:

    cd python-bs4-web-scraping
  3. Install the required dependencies:

    pip install requests
    pip install beautifulsoup4
    pip install nltk
    python -m nltk.downloader all
    pip install --upgrade deepl
  4. Set up your environment variables:

    Create a .env file with the following content:

    DEEPL_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xx
    

    Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xx with your Deepl API key.

Usage

  1. Run the main script to scrape websites, process data, and generate CSV files:

    python main.py

    This will execute the entire pipeline, including web scraping, translation, and common word analysis.

  2. Explore the generated CSV files in the csv directory for detailed information on word frequency and commonalities.

Project Structure

  • main.py: Main script to execute the entire pipeline.
  • tool/: Directory containing utility functions for directory setup and environment variable retrieval.
  • web/: Directory containing web scraping and translation functions.
  • csv/: Directory to store the generated CSV files.
  • README.md: Project documentation.

Dependencies

  • requests: For making HTTP requests.
  • bs4 (Beautiful Soup): For parsing HTML content.
  • nltk (Natural Language Toolkit): For natural language processing tasks.
  • deepl: For translating text using Deepl API.

python_java-word-cloud's People

Contributors

keremduzenli avatar

Watchers

 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.