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(
40
40
const sections = ( document as HTMLElement ) . querySelectorAll (
41
41
"main > * > section" ,
42
42
) ;
43
- const header : HTMLElement = sections [ 0 ] ;
43
+ const header : HTMLElement = sections [ 0 ] . querySelector (
44
+ "section > section > div" ,
45
+ ) ;
46
+
44
47
const description : HTMLElement = sections [ 2 ] ;
45
48
const details : HTMLElement = sections [ 3 ] ;
46
49
@@ -53,7 +56,7 @@ export async function crawlExtension(
53
56
// 73 users
54
57
// </div>
55
58
// 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" ) ;
57
60
userCountRow
58
61
. querySelectorAll ( "a" )
59
62
. forEach ( ( anchor : HTMLAnchorElement ) => anchor . remove ( ) ) ;
@@ -73,7 +76,7 @@ export async function crawlExtension(
73
76
// </span>
74
77
// </span>
75
78
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) " ,
77
80
) ;
78
81
const rating =
79
82
ratingRow != null
You can’t perform that action at this time.
0 commit comments