EEVblog Electronics Community Forum

General => General Technical Chat => Topic started by: fzabkar on August 11, 2024, 09:18:48 pm

Title: Custom search engines
Post by: fzabkar on August 11, 2024, 09:18:48 pm
I use custom search engines to expedite specific searches.

For example, to find the Micron part which correspond's to an FBGA code of D9SGQ, I would use either of the following custom searches, where the relevant placeholder is replaced with "D9SGQ".

https://www.micron.com/support/tools-and-utilities/fbga?fbga={searchTerms} (https://www.micron.com/support/tools-and-utilities/fbga?fbga={searchTerms})
https://www.micron.com/support/tools-and-utilities/fbga?fbga=%s (https://www.micron.com/support/tools-and-utilities/fbga?fbga=%s)

However, this no longer works. It's not a big deal, but would anyone know how to automate the search on the following landing page?

https://www.micron.com/sales-support/design-tools/fbga-parts-decoder (https://www.micron.com/sales-support/design-tools/fbga-parts-decoder)
Title: Re: Custom search engines
Post by: tom66 on August 11, 2024, 10:02:19 pm
You'd have to read JSON, but it looks like a request FBGA code D9SGQ results in this JSON request:

https://www.micron.com/content/micron/us/en/sales-support/design-tools/fbga-parts-decoder/_jcr_content.products.json/getpartbyfbgacode/-/-/-/en_US/-/-/D9SGQ (https://www.micron.com/content/micron/us/en/sales-support/design-tools/fbga-parts-decoder/_jcr_content.products.json/getpartbyfbgacode/-/-/-/en_US/-/-/D9SGQ)

And part number MT41K512 results in this:

https://www.micron.com/content/micron/us/en/sales-support/design-tools/fbga-parts-decoder/_jcr_content.products.json/getpartbyfbgacode/-/-/-/en_US/-/MT41K512/- (https://www.micron.com/content/micron/us/en/sales-support/design-tools/fbga-parts-decoder/_jcr_content.products.json/getpartbyfbgacode/-/-/-/en_US/-/MT41K512/-)

You can put the JSON into a prettifier tool (Chrome has a built in one), or write a Python script or similar to format it nicely.

Sadly this is all you can really do as under the hood this is just a JavaScript application fetching this API endpoint.  There may be some way to automate this within a browser, but I couldn't say how.
Title: Re: Custom search engines
Post by: fzabkar on August 11, 2024, 10:31:08 pm
There may be some way to automate this within a browser, but I couldn't say how.

Already done! Thanks very much!

I can now initiate a search from the URL bar or via the r-click context menu.

This is how you do it in Edge:

edge://settings/searchEngines (http://edge://settings/searchEngines)

I guess it would be the same in Chrome.

I can also do it in Firefox.

For searches from the context menu I use SPC.

https://github.com/YoshifumiFuyuno/Search-from-Popup-or-ContextMenu/wiki/Instructions (https://github.com/YoshifumiFuyuno/Search-from-Popup-or-ContextMenu/wiki/Instructions)
Title: Re: Custom search engines
Post by: fzabkar on August 17, 2024, 11:25:40 pm
@tom66, I see how you did this (via Inspect in the context menu), but I can't work out how to do the same for NTE's search engine. Would you be able to show me how to automate the Part Number Search here?

https://www.nteinc.com/search.php (https://www.nteinc.com/search.php)