Loading this page https://www.amazon.com/s?bbn=13707&rh=n%3A283155%2Cn%3A173507%2Cn%3A173515%2Cn%3A227544%2Cn%3A13707%2Cn%3A13723&dc&qid=1665651390&rnid=13707&ref=lp_13707_nr_n_1
but the response I am getting is different from what I am getting in Chrome Browser.
My Code
`
WebClient client = new WebClient(BrowserVersion.CHROME);
String baseUrl = "https://www.amazon.com/s?bbn=13707&rh=n%3A283155%2Cn%3A173507%2Cn%3A173515%2Cn%3A227544%2Cn%3A13707%2Cn%3A13723&dc&qid=1665651390&rnid=13707&ref=lp_13707_nr_n_1";
client.getOptions().setThrowExceptionOnScriptError(false);
client.addRequestHeader(baseUrl, baseUrl);
client.setAjaxController(new NicelyResynchronizingAjaxController());
try {
FileWriter test = new FileWriter("test.html");
HtmlPage page = client.getPage(baseUrl);
client.waitForBackgroundJavaScript(5000);
test.write(page.asXml());
test.flush();
System.out.println("done");
} catch (Exception e) {
e.printStackTrace();
}
`
Response which the code is returning
test.txt
Expected Response
chrome payload.txt
The code response is clearly missing the everything except header and footer content.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too