Can I do content script and extract chat gpt responses? cuz I am doing a project which involves extracting chatgpt responses? But when I did it using js it tells the target element didnt exist even If the element exist before that code gets executed

// Evaluate the XPath expression to select the target paragraph element
const targetParagraph = document.evaluate(
‘//*[@id=“__next”]/div[1]/div[2]/main/div[2]/div[1]/div/div/div/div/div[3]/div/div/div[2]/div[2]/div[1]/div/div/p’,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;

console.log(document)
// Check if the target paragraph element exists
if (targetParagraph) {
// Fetch the text content of the target paragraph element
const paragraphText = targetParagraph.textContent.trim(); // Trim to remove leading/trailing whitespace
console.log(“Paragraph text:”, paragraphText);
} else {
console.error(“Target paragraph element not found”);
}
//Here when i logged the document the element exist in that but i get only target element not found