Finish datasheet acquisition: more vendors, Mouser, browser download links.

Add Microchip/Murata/Silicon Labs URL tables, optional Mouser search, and suggested URLs on a miss so the wizard can open PDFs in the user's browser when the VPS is blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 19:42:50 +02:00
co-authored by Cursor
parent 7a255a9807
commit 2113e3975e
8 changed files with 384 additions and 31 deletions
+2 -1
View File
@@ -755,7 +755,7 @@ async def make_collaborator_owner(
async def fetch_auto_datasheet(mpn: str, request: Request, lcsc: str | None = None):
"""Fetch a datasheet PDF for the given MPN.
Tries LCSC (no API key), Texas Instruments direct URLs, then DigiKey
Tries LCSC (no API key), manufacturer PDF URLs, optional Mouser, then DigiKey
if configured. ``/api/digikey/datasheet`` is kept as an alias.
"""
from backend.services.datasheet_finder import find_datasheet
@@ -767,6 +767,7 @@ async def fetch_auto_datasheet(mpn: str, request: Request, lcsc: str | None = No
content={
"detail": result.error or "Failed to fetch datasheet",
"url": result.url,
"urls": result.suggested_urls or ([result.url] if result.url else []),
"source": result.source,
},
)