Return an array with the Thumbs pictures url

@param Crawler $node
@return array
346509
public function getPictures(Crawler $node = null)
    {
        $node = $node ?: $this->node;

        $images = [
            'images_thumbs' => [],
            'images'        => [],
        ];

        $node
            ->filter('.adview_main script')
            ->each(function (Crawler $crawler) use (&$images) {
                if (preg_match_all(
                    '#//img.+.leboncoin.fr/.*\.jpg#',
                    $crawler->html(),
                    $matches
                )) {
                    foreach ($matches[0] as $image) {
                        if (preg_match('/thumb/', $image)) {
                            array_push(
                                $images['images_thumbs'],
                                (string) Http::createFromString($image)
                                    ->withScheme($this->sheme)
                            );

                            continue;
                        }

                        array_push(
                            $images['images'],
                            (string) Http::createFromString($image)
                                ->withScheme($this->sheme)
                        );
                    }
                }
            });

        return $images;
    }
676688
private function getNodeIndex( $node )
	{
		for( $i=0; $i<$this->count(); $i++ )
			if( $this->nodes[$i] == $node )
				return $i;
		return NULL;
	}
621224
public function link($node, $query = '')
    {
        if (is_array($node)) {
            $links = array();
            $nodes = $node;
            foreach ($nodes as $node) {
                $links[] = $this->link($node, $query);
            }

            return implode(', ', $links);
        }

        return '<a href="'.route($node->getURL()).$query.'">'.$node->getName().'</a>';
    }
985116
public static function exportList($node)
    {
        $child = $node->addChild('thumbnailtypes');
        $list = static::getList();
        foreach ($list as $link) {
            $linkNode = $child->addChild('thumbnailtype');
            $linkNode->addAttribute('name', $link->getName());
            $linkNode->addAttribute('handle', $link->getHandle());
            $linkNode->addAttribute('sizingMode', $link->getSizingMode());
            $linkNode->addAttribute('upscalingEnabled', $link->isUpscalingEnabled() ? '1' : '0');
            $linkNode->addAttribute('keepAnimations', $link->isKeepAnimations() ? '1' : '0');
            if ($link->getWidth()) {
                $linkNode->addAttribute('width', $link->getWidth());
            }
            if ($link->getHeight()) {
                $linkNode->addAttribute('height', $link->getHeight());
            }
            if ($link->isRequired()) {
                $linkNode->addAttribute('required', $link->isRequired());
            }
            $linkNode->addAttribute('limitedToFileSets', $link->isLimitedToFileSets() ? '1' : '0');
            $filesetsNode = null;
            foreach ($link->getAssociatedFileSets() as $afs) {
                $fileSet = FileSet::getByID($afs->getFileSetID());
                if ($fileSet !== null) {
                    if ($filesetsNode === null) {
                        $filesetsNode = $linkNode->addChild('fileSets');
                    }
                    $filesetsNode->addChild('fileSet')->addAttribute('name', $fileSet->getFileSetName());
                }
            }
        }
    }
1343337
protected static function createContentLink($node)
    {
        static::_prepare();
        $url = false;

        // node with external/internal link: get URL from 'route' field
        if (empty($node->text) && !empty($node->route)) {
            $url = static::routeToLink($node->route);
        }

        // site tree content node: create URL for node from visible site tree if this node has original route
        if ($url === false) {
            $url = Url::toRoute([static::$_routeActionView, 'id' => $node->id]);
            $parts = parse_url($url);
            if (!empty($parts['path'])) {
                $url = $parts['path'];
                if (strstr($url, static::$_routeActionView)) { // it's fake link contain action UID and GET-parameter "id={$id}"
                    $url = false;
                }
            }
        }

        // node has content but any links yet: create URL for node out of visible site tree (submenu tree)
        if ($url === false && empty($node->route) && !empty($node->text)) {
            $url = Url::toRoute([static::$_routeActionShow, 'id' => $node->id, 'slug' => $node->slug]);
        }

        return $url;
    }
161410
private function getIndex($node) {
    $oidStr = $node->getOID()->__toString();
    if (!isset($this->nodeIndexMap[$oidStr])) {
      $this->nodeIndexMap[$oidStr] = $this->getNextIndex();
    }
    return $this->nodeIndexMap[$oidStr];
  }
750703
public function getData(NodeInterface $node = null, array $arguments)
    {
        $assetCollections = [];
        /** @var AssetCollection $assetCollection */
        foreach ($this->assetCollectionRepository->findAll() as $assetCollection) {
            $assetCollections[] = ['value' => $this->persistenceManager->getIdentifierByObject($assetCollection), 'label' => $assetCollection->getTitle()];
        }

        return $assetCollections;
    }
464746
protected function getFormFor(Crawler $node)
    {
        if (strcasecmp($node->first()->getNode(0)->tagName, 'form') === 0) {
            $form = $node->first();
        } else {
            $form = $node->parents()->filter('form')->first();
        }
        if (!$form) {
            $this->fail('The selected node is not a form and does not have a form ancestor.');
        }

        $identifier = $form->attr('id') ?: $form->attr('action');
        if (!isset($this->forms[$identifier])) {
            $this->forms[$identifier] = $this->getFormFromCrawler($form);
        }
        return $this->forms[$identifier];
    }
92208
protected function getSpecialPageList($node)
    {
        $siteId = $this->contextManager->getSiteId();
        $language = $this->contextManager->getSiteDefaultLanguage();
        $specialPages = $this->nodeRepository->findAllSpecialPage($language, $siteId);

        $specialPageList = $this->specialPageList;
        foreach ($specialPages as $specialPage) {
            if (($node instanceof NodeInterface &&
                $specialPage->getSpecialPageName() !== $node->getSpecialPageName()) ||
                is_null($node)
            ) {
                unset($specialPageList[$specialPage->getSpecialPageName()]);
            }
        }

        return $specialPageList;
    }
416805
public function fetchData(OutputNode $node = null): array
    {
        /** @var OutputNode $node */
        $node = $node ?? $this->loader->createNode();

        //Working with parser defined by loader itself
        $this->loader->loadData($node);

        return $node->getResult();
    }
1201408
private function getImageCandidates(Element $node): array {
        $images = $node->find('img');
        $filteredImages = $this->filterBadNames($images);
        $goodImages = $this->findImagesThatPassByteSizeTest($filteredImages);

        return $goodImages;
    }
695727
protected function getNumUnvisitedChildren(Node $node) {
    $cacheSection = $this->getRequestValue('cacheSection');
    $exportedOids = $this->cache->get($cacheSection, self::CACHE_KEY_EXPORTED_OIDS);

    $childOIDs = [];
    $mapper = $node->getMapper();
    $relations = $mapper->getRelations('child');
    foreach ($relations as $relation) {
      if ($relation->getOtherNavigability()) {
        $childValue = $node->getValue($relation->getOtherRole());
        if ($childValue != null) {
          $children = $relation->isMultiValued() ? $childValue : [$childValue];
          foreach ($children as $child) {
            $childOIDs[] = $child->getOID();
          }
        }
      }
    }
    $numUnvisitedChildren = 0;
    foreach ($childOIDs as $childOid) {
      if (!in_array($childOid->__toString(), $exportedOids)) {
        $numUnvisitedChildren++;
      }
    }
    return $numUnvisitedChildren;
  }
851899
protected function getDisplayText(Node $node) {
    if ($this->isRootTypeNode($node->getOID())) {
      $mapper = $node->getMapper();
      return $mapper->getTypeDisplayName($this->getMessage());
    }
    else {
      return strip_tags(preg_replace("/[\r\n']/", " ", NodeUtil::getDisplayValue($node)));
    }
  }
522330
private function scrapeUrl($url)
    {
        if (!parse_url($url, PHP_URL_HOST)) {
            $url = 'http://' . $url;
        }

        try {
            $client = new Client();
            $response = $client->get($url);
        } catch(\Exception $e) {
            return [];
        }

        $crawler = new Crawler($response->getBody()->getContents());

        $description = '';
        foreach ($crawler->filter('meta') as $node) {
            if ($node->getAttribute('name') == 'description') {
                $description = $node->getAttribute('content');
            }
        }

        $title = '';
        if (count($crawler->filter('title'))) {
            $title = trim($crawler->filter('title')->text());
        }

        return [
            'title' => $title,
            'description' => $description,
        ];
    }
385877
public function leaveNode(Node $node)
    {
        if ($node instanceof Stmt\GroupUse) {
            $nodes = [];
            foreach ($node->uses as $use) {
                $name = Name::concat($node->prefix, $use->name);
                $nodes[] = new Stmt\Use_([new Stmt\UseUse($name)]);
            }
            return $nodes;
        }
    }
200647
public function dumpNode(BaseNode $node)
    {
        return '<?php'.PHP_EOL.PHP_EOL.'return ['.parent::dumpNode($node).PHP_EOL.'];'.PHP_EOL;
    }
190345
protected function processMediaImage($node)
    {
        $media = $node->getChild('media');

        if ($media != null) {
            $filename = $media->getAttribute('file');
            $url = $media->getAttribute('url');

            //save thumbnail
            file_put_contents($this->dataFolder.Constants::MEDIA_FOLDER.DIRECTORY_SEPARATOR.'thumb_'.$filename, $media->getData());
            //download and save original
            file_put_contents($this->dataFolder.Constants::MEDIA_FOLDER.DIRECTORY_SEPARATOR.$filename, file_get_contents($url));
        }
    }