Skip to content

Commit 5b0ff54

Browse files
committed
fix(chrome): Don't error when there are no users
1 parent 60592ff commit 5b0ff54

3 files changed

Lines changed: 225 additions & 0 deletions

File tree

‎src/services/__tests__/__snapshots__/chrome-crawler.test.ts.snap‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,81 @@ With just two clicks, Eye Dropper allows you to pick colors from any website wit
329329
"weeklyActiveUsers": 1000000,
330330
}
331331
`;
332+
333+
exports[`Chrome Web Store Crawler should extract extension details from 2026-08-01-dhiekgdaipindoapjmcnpompdknjeijf.html 1`] = `
334+
{
335+
"iconUrl": "https://lh3.googleusercontent.com/kCV1v9ubDPiIomYY20zZZ8HxXp6zQHSpcPbLJjWBnraCn6Q1lFLRhn87v-sBf7j-2Wsq7pjPeyGNm0HDYrYEe6FFmw=s256",
336+
"id": "dhiekgdaipindoapjmcnpompdknjeijf",
337+
"lastUpdated": "March 26, 2026",
338+
"longDescription":
339+
"Glossy New Tab – Customize Your Dashboard
340+
Stop wasting your new tab. With Glossy New Tab, every new tab becomes a beautiful, functional dashboard that keeps you organized, informed, and inspired.
341+
🌟 Features
342+
🔍 Smart Search Bar: Search the web instantly with Google, Bing, DuckDuckGo, Yahoo, or Ecosia.
343+
⚡ Quick Shortcuts: Add, edit, and manage your favorite websites easily via a right-click context menu.
344+
🕐 Clock Widget: Sleek digital and analog clock with the current date.
345+
🌤️ Weather Widget: Real-time weather updates based on your location.
346+
🎵 Audio Player: Play background music seamlessly—even when the tab isn’t active.
347+
🎨 Custom Backgrounds: Upload and manage your own images or videos; stored locally for speed and privacy.
348+
⚙️ Settings Sidebar: Full control over themes, widgets, and layout with an intuitive interface.
349+
Why Install?
350+
Search Smarter: Instantly search the web using Google, Bing, DuckDuckGo, Yahoo, or Ecosia without opening a separate page.
351+
Access Favorites Fast: One-click shortcuts to your most-used websites, easily added, edited, or managed.
352+
Stay on Time & Informed: Elegant clock and real-time weather widgets keep you aware at a glance.
353+
Enjoy Background Audio: Play music or sounds without interrupting your browsing.
354+
Personalize Your Space: Upload your own images or videos to create a dashboard that feels truly yours.
355+
Full Customization: Adjust themes, layout, and widgets easily via the intuitive settings sidebar.
356+
Upgrade your browsing experience—make every new tab a beautiful, functional workspace."
357+
,
358+
"name": "Glossy New Tab - Say Goodbye to Boring Tabs",
359+
"rating": 4.6,
360+
"reviewCount": 10,
361+
"screenshots": [
362+
{
363+
"index": 2,
364+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/2",
365+
"rawUrl": "https://lh3.googleusercontent.com/gj2e-tiTc3QYptxlIEcVfRogxZcXaJ_uQu09lK4wwI9ih1f765cnB4Vx-Z2m3ib7YxxeWWonL5ZF2CAHZCAcVck6=s1280",
366+
},
367+
{
368+
"index": 0,
369+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/0",
370+
"rawUrl": "https://lh3.googleusercontent.com/5cf2eynPB11FLePhVBJmft3XXcJJ9Y6ZPL_jcPB2T-eX1k2YW5JORQN5kPvPzvQfQH2GytQWi7iTB1sEfSkafoLY7Q=s1280",
371+
},
372+
{
373+
"index": 1,
374+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/1",
375+
"rawUrl": "https://lh3.googleusercontent.com/fZfIjaptorXfgT-JAsfUsqpHsxweFuMmqfDafphvbDsGdaKtLROsUPeE8_6kmI0QIHOotPMoKiEWbIpcB1wajTaGx_o=s1280",
376+
},
377+
{
378+
"index": 2,
379+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/2",
380+
"rawUrl": "https://lh3.googleusercontent.com/gj2e-tiTc3QYptxlIEcVfRogxZcXaJ_uQu09lK4wwI9ih1f765cnB4Vx-Z2m3ib7YxxeWWonL5ZF2CAHZCAcVck6=s1280",
381+
},
382+
{
383+
"index": 0,
384+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/0",
385+
"rawUrl": "https://lh3.googleusercontent.com/5cf2eynPB11FLePhVBJmft3XXcJJ9Y6ZPL_jcPB2T-eX1k2YW5JORQN5kPvPzvQfQH2GytQWi7iTB1sEfSkafoLY7Q=s1280",
386+
},
387+
{
388+
"index": 0,
389+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/0",
390+
"rawUrl": "https://lh3.googleusercontent.com/5cf2eynPB11FLePhVBJmft3XXcJJ9Y6ZPL_jcPB2T-eX1k2YW5JORQN5kPvPzvQfQH2GytQWi7iTB1sEfSkafoLY7Q=s1280",
391+
},
392+
{
393+
"index": 1,
394+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/1",
395+
"rawUrl": "https://lh3.googleusercontent.com/fZfIjaptorXfgT-JAsfUsqpHsxweFuMmqfDafphvbDsGdaKtLROsUPeE8_6kmI0QIHOotPMoKiEWbIpcB1wajTaGx_o=s1280",
396+
},
397+
{
398+
"index": 2,
399+
"indexUrl": "http://localhost:3000/api/rest/chrome-web-store/dhiekgdaipindoapjmcnpompdknjeijf/screenshots/2",
400+
"rawUrl": "https://lh3.googleusercontent.com/gj2e-tiTc3QYptxlIEcVfRogxZcXaJ_uQu09lK4wwI9ih1f765cnB4Vx-Z2m3ib7YxxeWWonL5ZF2CAHZCAcVck6=s1280",
401+
},
402+
],
403+
"shortDescription": "Your Boring New Tab Is Dead - Meet Glossy New Tab, It allows you to apply live wallpapers in your new tab.",
404+
"storeUrl": "https://chromewebstore.google.com/detail/glossy-new-tab-say-goodby/dhiekgdaipindoapjmcnpompdknjeijf",
405+
"users": 0,
406+
"version": "0.0.5",
407+
"weeklyActiveUsers": 0,
408+
}
409+
`;

‎src/services/__tests__/fixtures/chrome-web-store/2026-08-01-dhiekgdaipindoapjmcnpompdknjeijf.html‎

Lines changed: 144 additions & 0 deletions
Large diffs are not rendered by default.

‎src/services/chrome-crawler.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ export async function crawlExtension(
7575
break;
7676
}
7777
}
78+
// Extensions with zero users don't have any text in the div
79+
if (!userCountRow) return 0;
80+
7881
removeAnchorChildren(userCountRow);
7982
return (
8083
userCountRow?.textContent

0 commit comments

Comments
 (0)