Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .docker/99-xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[xdebug]
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.log=/tmp/xdebug.log
xdebug.client_port=9003
xdebug.client_host=host.docker.internal
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ docker-compose.yml
!public/tmp/.gitkeep

/.idea/*
/.vscode/*
###> lexik/jwt-authentication-bundle ###
/config/jwt/*
###< lexik/jwt-authentication-bundle ###
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN apt-get update && \
php8.4-zip \
php8.4-fpm \
php8.4-intl \
php8.4-xdebug \
nodejs && \
corepack enable && \
#Install composer dependencies
Expand Down
1 change: 1 addition & 0 deletions src/Enum/DatumTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class DatumTypeEnum
self::TYPE_COUNTRY,
self::TYPE_LINK,
self::TYPE_IMAGE,
self::TYPE_PRICE,
];

public const array AVAILABLE_FOR_SEARCH = [
Expand Down
1 change: 1 addition & 0 deletions src/Model/Scraper/ItemScraperImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function toScrapper(): Scraper
$scraper->setName($data['name'] ?? null);
$scraper->setNamePath($data['namePath'] ?? null);
$scraper->setImagePath($data['imagePath'] ?? null);
$scraper->setPricePath($data['pricePath'] ?? null);
$scraper->setUrlPattern($data['urlPattern'] ?? null);
$scraper->setType(ScraperTypeEnum::TYPE_ITEM);

Expand Down
4 changes: 4 additions & 0 deletions src/Service/Scraper/HtmlScraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ protected function formatValues(?array $values, string $type, $scraping): ?strin
return $this->guessHost($values[0], $scraping);
}

if ($type === DatumTypeEnum::TYPE_PRICE) {
return $values[0];
}

return null;
}

Expand Down