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.
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:
pip install pyscrap-tool
Option 2: Build from Source
For those who prefer to build it themselves:
-
Clone the repository and navigate to the project directory:
git clone https://github.com/h471x/web_scraper.git cd web_scraper
-
Build the package:
python setup.py sdist bdist_wheel
-
Install the package:
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:
-lor--link: Specify the URL of the webpage to scrape.
-
HTML Tag:
-tor--tag: Specify the HTML tag to scrape (e.g.,article,div).
-
Version:
-vor--version: Display the version of the tool.
Example Usage
-
Basic Scrape:
pyscrap -l https://example.com -t article
-
Display Version:
pyscrap -v -
Help Option: For help with command-line options, use:
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!
Release files for pyscrap-tool 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyscrap-tool-0.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyscrap_tool-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / pyscrap-tool-0.1.tar.gz
| Download URL | pyscrap-tool-0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2911267633cd381db52529dadaf86b8612bc22391225a56e4d93d82b07b81e91
|
|
BLAKE2b-256 checksum How to use checksums |
f43557ee9d1dcdbece6a82a7378a1ebfaa7e6bcd9efc49af4e3087d24e9e48f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|
Release files / pyscrap_tool-0.1-py3-none-any.whl
| Download URL | pyscrap_tool-0.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b5a08e519eb523d1c39d2ef6eb9246a36343ad90cac8a1e0d49a44cebb40116
|
|
BLAKE2b-256 checksum How to use checksums |
88fd4ecff7e5dd3320a0535a0c707dc8fa74a3de1d5c0b33dc2a270c14d290da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|