File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ export async function crawlExtension(
4040 const sections = ( document as HTMLElement ) . querySelectorAll (
4141 "main > * > section" ,
4242 ) ;
43- const header : HTMLElement = sections [ 0 ] ;
43+ const header : HTMLElement = sections [ 0 ] . querySelector (
44+ "section > section > div" ,
45+ ) ;
46+
4447 const description : HTMLElement = sections [ 2 ] ;
4548 const details : HTMLElement = sections [ 3 ] ;
4649
@@ -53,7 +56,7 @@ export async function crawlExtension(
5356 // 73 users
5457 // </div>
5558 // Remove the anchors and extract "73" from the text content
56- const userCountRow = header . querySelector ( "div:first-child > div:last-child" ) ;
59+ const userCountRow = header . querySelector ( ":scope > div:last-child" ) ;
5760 userCountRow
5861 . querySelectorAll ( "a" )
5962 . forEach ( ( anchor : HTMLAnchorElement ) => anchor . remove ( ) ) ;
@@ -73,7 +76,7 @@ export async function crawlExtension(
7376 // </span>
7477 // </span>
7578 const ratingRow = header . querySelector (
76- "div:first-child > div:nth-child(2) > span:last -child" ,
79+ "div:first-child > div:nth-child(2) > span:nth -child(3) " ,
7780 ) ;
7881 const rating =
7982 ratingRow != null
You can’t perform that action at this time.
0 commit comments