https://github.com/hatixntsoa/web.scraper
A Simple Web Scraper made with Python
https://github.com/hatixntsoa/web.scraper
pypi python web-scraper
Last synced: 25 days ago
JSON representation
A Simple Web Scraper made with Python
- Host: GitHub
- URL: https://github.com/hatixntsoa/web.scraper
- Owner: hatixntsoa
- License: mit
- Created: 2024-09-23T09:09:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-08-25T10:57:40.000Z (11 months ago)
- Last Synced: 2026-04-19T00:03:04.250Z (3 months ago)
- Topics: pypi, python, web-scraper
- Language: Python
- Homepage: https://pypi.org/project/pyscrap-tool
- Size: 411 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PyScrap Tool
``pyscrap-tool`` is a Python-based web scraping utility that allows users to extract data from specified web pages. It provides options to scrape specific HTML tags and presents the data in a structured format, including the ability to save results to a CSV file.
### Contents
[Features](#features) |
[Installation](#installation) |
[Build from scratch](#option-2-build-from-source) |
[Usage](#usage) |
[Example Usage](#example-usage) |
[Development](#development) |
[Contributing](#contributing)
## Features
- **Command-Line Interface (CLI)**: Easily scrape data directly from the terminal using command-line arguments.
- **Custom HTML Tag Scraping**: Specify which HTML tag to scrape from the webpage, allowing for flexible data extraction.
- **Data Output**: Print scraped data to the console and save it to a CSV file for further analysis.
- **Versioning**: Check the version of the tool using command-line options.
## Installation
### Option 1: Install from PyPI
To install `pyscrap-tool` directly from PyPI:
```bash
pip install pyscrap-tool
```
### Option 2: Build from Source
For those who prefer to build it themselves:
1. Clone the repository and navigate to the project directory:
```bash
git clone https://github.com/hatixntsoa/web.scraper.git
cd web.scraper
```
2. Build the package:
```bash
python setup.py sdist bdist_wheel
```
3. Install the package:
```bash
pip install dist/*.whl
```
## Usage
Once the package is installed, you can use the `pyscrap` command from the terminal. The script accepts the following command-line arguments:
- **URL**:
- `-l` or `--link`: Specify the URL of the webpage to scrape.
- **HTML Tag**:
- `-t` or `--tag`: Specify the HTML tag to scrape (e.g., `article`, `div`).
- **Version**:
- `-v` or `--version`: Display the version of the tool.
### Example Usage
1. **Basic Scrape**:
```bash
pyscrap -l https://example.com -t article
```
2. **Display Version**:
```bash
pyscrap -v
```
3. **Help Option**:
For help with command-line options, use:
```bash
pyscrap -h
```
## Development
To modify or extend the functionality, ensure you have the required dependencies installed. You can add new features to the CLI as needed.
## Contributing
Feel free to fork this repository, open issues, or submit pull requests with improvements or bug fixes. Your contributions help make the `PyScrap Tool` better!