Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added automated web scraper script with README and requirements. #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Automated-Web-Scraper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Automated Web Scraper

This Python script automates the process of web scraping using the `requests` and `BeautifulSoup` libraries.

## Usage

1. Modify the script (`automated_web_scraper.py`) to set the URL you want to scrape and specify the data you want to extract.

2. Run the script using Python.

## Requirements

- Python 3.x
- `requests` library
- `BeautifulSoup` library

## Installation

1. Clone this repository or download the script (`automated_web_scraper.py`).

2. Install the required libraries using the `requirements.txt` file.

3. Modify the script and run it to perform automated web scraping.

## Author

sonicdashh

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
16 changes: 16 additions & 0 deletions Automated-Web-Scraper/automated-web-scraper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import requests
from bs4 import BeautifulSoup

# Specify the URL to scrape
url = "https://example.com"

# Send an HTTP request
response = requests.get(url)

# Parse the HTML content
soup = BeautifulSoup(response.text, "html.parser")

# Extract and process data (e.g., extract all headings)
headings = soup.find_all(["h1", "h2", "h3", "h4", "h5", "h6"])
for heading in headings:
print(heading.text.strip())
2 changes: 2 additions & 0 deletions Automated-Web-Scraper/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requests==2.26.0
beautifulsoup4==4.10.0