@@ -3,7 +3,7 @@ import { HTMLAnchorElement, HTMLElement, parseHTML } from "linkedom";
33
44export async function crawlExtension (
55 id : string ,
6- lang : string
6+ lang : string ,
77) : Promise < Gql . ChromeExtension | undefined > {
88 consola . info ( "Crawling " + id ) ;
99 const url = `https://chromewebstore.google.com/detail/${ id } ?hl=${ lang } ` ;
@@ -28,13 +28,13 @@ export async function crawlExtension(
2828 const storeUrl = metaContent ( document , "property=og:url" ) ;
2929 const iconUrl = metaContent ( document , "property=og:image" ) ?. replace (
3030 / = .+ ?$ / ,
31- "=s256"
31+ "=s256" ,
3232 ) ;
3333 const shortDescription = metaContent ( document , "property=og:description" ) ;
3434
3535 // Grab the main sections that contain content
3636 const sections = ( document as HTMLElement ) . querySelectorAll (
37- "main > * > section"
37+ "main > * > section" ,
3838 ) ;
3939 const header : HTMLElement = sections [ 0 ] ;
4040 const description : HTMLElement = sections [ 2 ] ;
@@ -69,10 +69,10 @@ export async function crawlExtension(
6969 // </span>
7070 // </span>
7171 const ratingRow = header . querySelector (
72- "div:first-child > div:nth-child(2) > span:last-child"
72+ "div:first-child > div:nth-child(2) > span:last-child" ,
7373 ) ;
7474 const rating = extractNumber (
75- ratingRow . querySelector ( "span:first-child > span:first-child" ) . textContent
75+ ratingRow . querySelector ( "span:first-child > span:first-child" ) . textContent ,
7676 ) ;
7777 const reviewCount = extractNumber ( ratingRow . querySelector ( "p" ) . textContent ) ;
7878
0 commit comments