mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-13 21:19:36 +00:00
Merge branch 'Buerklin-provider' of https://github.com/mkne/Part-DB-server into Buerklin-provider
This commit is contained in:
commit
7454e5045b
1 changed files with 3 additions and 3 deletions
|
|
@ -128,7 +128,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
}
|
}
|
||||||
$response = $this->buerklinClient->request('GET', $url, [
|
$response = $this->buerklinClient->request('GET', $url, [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'Referer' => 'https://www.buerklin.com/product-detail/_' . $matches[2] . '.html'
|
'Referer' => 'https://www.buerklin.com/de/p/' . $matches[2] . '/'
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
if (preg_match('/(previewPdfUrl): ?("[^"]+wmsc\.buerklin\.com[^"]+\.pdf")/', $response->getContent(), $matches) > 0) {
|
if (preg_match('/(previewPdfUrl): ?("[^"]+wmsc\.buerklin\.com[^"]+\.pdf")/', $response->getContent(), $matches) > 0) {
|
||||||
|
|
@ -147,7 +147,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
*/
|
*/
|
||||||
private function queryByTerm(string $term): array
|
private function queryByTerm(string $term): array
|
||||||
{
|
{
|
||||||
$response = $this->buerklinClient->request('GET', self::ENDPOINT_URL . "/search/global", [
|
$response = $this->buerklinClient->request('GET', self::ENDPOINT_URL . "products/search/?curr=$this->currency&language=en&pageSize=50¤tPage=0&query=Laser&sort=relevance", [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'Cookie' => new Cookie('currencyCode', $this->currency)
|
'Cookie' => new Cookie('currencyCode', $this->currency)
|
||||||
],
|
],
|
||||||
|
|
@ -310,7 +310,7 @@ class BuerklinProvider implements InfoProviderInterface
|
||||||
*/
|
*/
|
||||||
private function getProductShortURL(string $product_code): string
|
private function getProductShortURL(string $product_code): string
|
||||||
{
|
{
|
||||||
return 'https://www.buerklin.com/product-detail/' . $product_code .'.html';
|
return 'https://www.buerklin.com/de/p/' . $product_code .'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue