File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Services/InfoProviderSystem/Providers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ private function getRealDatasheetUrl(?string $url): string
102
102
'Referer ' => 'https://www.lcsc.com/product-detail/_ ' . $ matches [2 ] . '.html '
103
103
],
104
104
]);
105
- if (preg_match ('/(pdfUrl ): ?("[^"]+wmsc\.lcsc\.com[^"]+\.pdf")/ ' , $ response ->getContent (), $ matches ) > 0 ) {
105
+ if (preg_match ('/(previewPdfUrl ): ?("[^"]+wmsc\.lcsc\.com[^"]+\.pdf")/ ' , $ response ->getContent (), $ matches ) > 0 ) {
106
106
//HACKY: The URL string contains escaped characters like \u002F, etc. To decode it, the JSON decoding is reused
107
107
//See https://github.com/Part-DB/Part-DB-server/pull/582#issuecomment-2033125934
108
108
$ jsonObj = json_decode ('{" ' . $ matches [1 ] . '": ' . $ matches [2 ] . '} ' );
109
- $ url = $ jsonObj ->pdfUrl ;
109
+ $ url = $ jsonObj ->previewPdfUrl ;
110
110
}
111
111
}
112
112
return $ url ;
You can’t perform that action at this time.
0 commit comments