<commit_before><?php declare(strict_types = 1);

namespace Vantoozz\ProxyScrapper\Scrapers;

use Symfony\Component\DomCrawler\Crawler as Dom;
use Vantoozz\ProxyScrapper\Exceptions\HttpClientException;
use Vantoozz\ProxyScrapper\Exceptions\ScraperException;
use Vantoozz\ProxyScrapper\HttpClient;
use Vantoozz\ProxyScrapper\Ipv4;
use Vantoozz\ProxyScrapper\Port;
use Vantoozz\ProxyScrapper\Proxy;

/**
 * Class FreeProxyListScraper
 * @package Vantoozz\ProxyScrapper\Scrapers
 */
final class FreeProxyListScraper implements ScraperInterface
{
    /**
     * @var HttpClient
     */
    private $httpClient;

    /**
     *
     */
    private const BASE_URL = 'https://www.free-proxy-list.net/';

    /**
     * FreeProxyListScraper constructor.
     * @param HttpClient $httpClient
     */
    public function __construct(HttpClient $httpClient)
    {
        $this->httpClient = $httpClient;
    }

    /**
     * @return Proxy[]|\Generator
     * @throws \RuntimeException
     * @throws \Vantoozz\ProxyScrapper\Exceptions\ScraperException
     */
    public function get(): \Generator
    {
        try {
            $html = $this->httpClient->get(static::BASE_URL);
        } catch (HttpClientException $e) {
            throw new ScraperException($e->getMessage(), $e->getCode(), $e);
        }<commit_msg>+ FreeProxyListScraper<commit_after><?php declare(strict_types = 1);

namespace Vantoozz\ProxyScrapper\Scrapers;

use Symfony\Component\DomCrawler\Crawler as Dom;
use Vantoozz\ProxyScrapper\Exceptions\HttpClientException;
use Vantoozz\ProxyScrapper\Exceptions\ScraperException;
use Vantoozz\ProxyScrapper\HttpClient;
use Vantoozz\ProxyScrapper\Ipv4;
use Vantoozz\ProxyScrapper\Port;
use Vantoozz\ProxyScrapper\Proxy;

/**
 * Class FreeProxyListScraper
 * @package Vantoozz\ProxyScrapper\Scrapers
 */
final class FreeProxyListScraper implements ScraperInterface
{
    /**
     * @var HttpClient
     */
    private $httpClient;

    /**
     *
     */
    private const BASE_URL = 'https://www.free-proxy-list.net/';

    /**
     * FreeProxyListScraper constructor.
     * @param HttpClient $httpClient
     */
    public function __construct(HttpClient $httpClient)
    {
        $this->httpClient = $httpClient;
    }

    /**
     * @return \Generator|Proxy[]
     * @throws \RuntimeException
     * @throws \Vantoozz\ProxyScrapper\Exceptions\ScraperException
     */
    public function get(): \Generator
    {
        try {
            $html = $this->httpClient->get(static::BASE_URL);
        } catch (HttpClientException $e) {
            throw new ScraperException($e->getMessage(), $e->getCode(), $e);
        }
{'fraction_non_alphanumeric': 0.11820600532117066, 'fraction_numerical': 0.0015203344735841885, 'mean_word_length': 3.1645569620253164, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3208406', 'n_tokens_mistral': 849, 'n_tokens_neox': 843, 'n_words': 141}