transceiver-db/sql/044-fix-cisco-8000-product-urls.sql
Rene Fichtmueller 9618a4f0e0 fix: Cisco 8000 builder URL + MikroTik lowercase + new vendor builders
URL builder fixes:
- Cisco 8000: update to new /site/us/en/ URL scheme (family page, not per-model)
- MikroTik: fix to lowercase+underscore format (was uppercase, caused 404)
- Fortinet: set to null — JS-rendered pages, all redirect to generic page
- Alcatel-Lucent Enterprise slug added to dispatcher (was missing, caused 0 hits)
- Add Quanta, Allied Telesis, Ufispace, Netgear URL builders
- NVIDIA: skip ConnectX/BlueField non-switch models

Migration 044:
- Clear 35 wrong NCS-5500 URLs from Cisco 8000-series models
- Pre-set correct 8000-series family URL for 21 models without images
2026-04-21 00:41:31 +02:00

25 lines
1.2 KiB
SQL

-- Migration 044 — Fix Cisco 8000 series product_page_url
--
-- The previous scraper run incorrectly stored the NCS-5500 series URL
-- for Cisco 8000-series SP router models (8101-32FH, 8202-32FH, etc).
-- The correct page is the 8000-series family page on Cisco's new /site/ URL scheme.
--
-- After this migration, the image scraper will re-fetch these 35 switches
-- using the updated buildCiscoUrl() which now returns the correct family URL.
-- 1. Clear the wrongly-stored NCS-5500 product_page_url so the scraper rebuilds it
UPDATE switches
SET product_page_url = NULL,
assets_scraped_at = NULL
WHERE product_page_url = 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-5500-series/index.html'
AND image_url IS NULL;
-- 2. Pre-set the correct 8000-series family URL for all 8000-series models without an image
-- so the next scraper run hits the right page immediately
UPDATE switches
SET product_page_url = 'https://www.cisco.com/site/us/en/products/networking/sdwan-routers/8000-series/index.html',
assets_scraped_at = NULL
WHERE image_url IS NULL
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco')
AND model ~ '^8[0-9]{3}';