File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,11 @@ func waitForMetaFinalization(page *rod.Page) (string, error) {
167167 }
168168
169169 // Regex to extract meta content attributes
170- // Matches: <meta property="og:image" ... content="...">
170+ // Matches either attribute form:
171+ // <meta property="og:image" content="..."> OR <meta name="og:image" content="...">
171172 // Note: We intentionally ignore twitter:image for stabilization. The renderer remains generic
172173 // and will only loop for stability when an og:image is present.
173- ogRe := regexp .MustCompile (`(?i)<meta[^>]+property=["']og:image["'][^>]*content=["']([^"']+)["'][^>]*>` ) //nolint:lll
174+ ogRe := regexp .MustCompile (`(?i)<meta[^>]+(?: property|name) =["']og:image["'][^>]*content=["']([^"']+)["'][^>]*>` ) //nolint:lll
174175
175176 deadline := time .Now ().Add (timeout )
176177 ticker := time .NewTicker (500 * time .Millisecond )
You can’t perform that action at this time.
0 commit comments