Download the PHP package maopackages/envato-portfolio-extractor without Composer
On this page you can find all versions of the php package maopackages/envato-portfolio-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maopackages/envato-portfolio-extractor
More information about maopackages/envato-portfolio-extractor
Files in maopackages/envato-portfolio-extractor
Package envato-portfolio-extractor
Short Description A PHP package to extract product details from an Envato portfolio.
License MIT
Informations about the package envato-portfolio-extractor
Envato Portfolio Extractor
Envato Portfolio Extractor is a PHP-based application that extracts product details from an Envato portfolio page, specifically from ThemeForest. It uses XPath to scrape product information such as product ID, name, image, category, sales, and price from the portfolio page.
Features
- Extracts product details from an Envato portfolio URL
- Fetches details like product name, preview image, categories, sales count, and price
- Implements clean and modular code with the help of an
Extractor
class - Simple interface for future extensions and improvements
- Includes unit tests for validation of functionality
Requirements
- PHP 7.4+ (supports PHP 8+)
- Composer
- DOM extension (should be enabled by default in PHP)
- cURL extension (should be enabled by default in PHP)
- PHPUnit for running unit tests
Installation
-
Clone the repository:
- Install dependencies using Composer:
Make sure you have Composer installed. Run the following command:
- Set up PHPUnit for testing:
PHPUnit is already configured in the phpunit.xml file. Run the following command to verify that the tests work:
Usage
To extract products from an Envato portfolio, instantiate the EnvatoExtractor
class. Here's a basic example:
Example Output
The output will be structured like this:
Running Tests
To run the included tests, use:
Directory Structure
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
All versions of envato-portfolio-extractor with dependencies
ext-dom Version *