Skip to content

Commit

Permalink
+ fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vantoozz committed Dec 27, 2019
1 parent c1f4457 commit 7646ce2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/ProxyString.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ public function __construct(string $string)
throw new InvalidArgumentException('Bad formatted proxy string');
}

[$ipv4, $port] = $parts;

$this->proxy = new Proxy(new Ipv4($ipv4), new Port((int)$port));
$this->proxy = new Proxy(new Ipv4($parts[0]), new Port((int)$parts[1]));
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Scrapers/AbstractRssBloggerScraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function get(): \Generator
private function fetchFeed(\SimpleXMLElement $feed)
{
foreach ($feed->entry ?? [] as $entry) {
$matches = [];
preg_match_all('/\d+\.\d+\.\d+\.\d+:\d{1,5}/m', (string)$entry->content, $matches);
foreach ($matches[0] as $proxyString) {
try {
Expand Down

0 comments on commit 7646ce2

Please sign in to comment.