when i use this code to navigate a root link "/?language=en®ion=US" using chromedp. Aliexpress redirect me to the arabic page.
i need to get to directly to the english page
this is the code that i'm using :
err := chromedp.Run(ctx,
chromedp.EmulateViewport(1920, 1980),
// Navigate to AliExpress with English language and US region
chromedp.Navigate(`/?language=en®ion=US`),
chromedp.WaitVisible(`body`, chromedp.ByQuery),
chromedp.Sleep(5*time.Second), // Wait for the page to fully load
// Extract all links with their text and href
chromedp.Evaluate(`
JSON.stringify(
Array.from(document.querySelectorAll('a')).map(a => ({
text: a.textContent.trim(),
href: a.href
}))
)
`, &links),
)
if err != nil {
log.Fatal(err)
}
if there is away to add some header first please help me