PHPackages                             maopackages/envato-portfolio-extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. maopackages/envato-portfolio-extractor

ActiveLibrary

maopackages/envato-portfolio-extractor
======================================

A PHP package to extract product details from an Envato portfolio.

v1.1.2(1y ago)03MITPHPPHP ^7.4 || ^8.0

Since Oct 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/maruf-arafat-official/php-envato-portfolio-extractor)[ Packagist](https://packagist.org/packages/maopackages/envato-portfolio-extractor)[ RSS](/packages/maopackages-envato-portfolio-extractor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

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
--------

[](#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
------------

[](#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
------------

[](#installation)

1. **Clone the repository:**

```
git clone https://github.com/your-username/envato-extractor.git
cd envato-extractor
```

2. **Install dependencies using Composer:**

Make sure you have Composer installed. Run the following command:

```
./composer install
```

3. **Set up PHPUnit for testing:**

PHPUnit is already configured in the phpunit.xml file. Run the following command to verify that the tests work:

```
./vendor/bin/phpunit
```

Usage
-----

[](#usage)

To extract products from an Envato portfolio, instantiate the `EnvatoExtractor` class. Here's a basic example:

```
use MAO\EnvatoExtractor;

try {
    $envatoExtractor = new EnvatoExtractor('https://themeforest.net/user/themestransmit/portfolio');
    $products = $envatoExtractor->getPortfolios();

    print_r($products);
} catch (\Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

Example Output
--------------

[](#example-output)

The output will be structured like this:

```
Array
(
    [12345678] => Array
        (
            [heading] => Example Product
            [preview] => https://preview-url
            [categories] => Array
                (
                    [0] => Web Design
                    [1] => UI/UX
                )
            [sales] => 1,000 Sales
            [price] => $29
            [url] => https://themeforest.net/item/{portfolio}
        )
    ...
)

```

Running Tests
-------------

[](#running-tests)

To run the included tests, use:

```
./vendor/bin/phpunit
```

Directory Structure
-------------------

[](#directory-structure)

```
/src
    /App
        Extractor.php
        EnvatoExtractor.php
/tests
    EnvatoExtractorTest.php
/vendor
    (Composer-managed dependencies)
phpunit.xml
composer.json
```

Contributing
------------

[](#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
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

575d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/04f5804d0b41e76b980e857f5ddf2205c2c51139fd2910076c78644ca883d4ae?d=identicon)[maruf-arafat-official](/maintainers/maruf-arafat-official)

---

Top Contributors

[![maruf-arafat-official](https://avatars.githubusercontent.com/u/184715216?v=4)](https://github.com/maruf-arafat-official "maruf-arafat-official (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maopackages-envato-portfolio-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/maopackages-envato-portfolio-extractor/health.svg)](https://phpackages.com/packages/maopackages-envato-portfolio-extractor)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
