I worked with a developer to make a very very simple chrome extension for some ecommerce stuff I do and this just helped me automate some things. There was one part that scraped all the images from an Amazon listing and it does not work anymore. I have to assume Amazon changed something with their dom that broke this, but I am not able to fix it. I thought I could but something just isn't working, so I could use some help.
Here is the existing code that worked up until recently. If anyone can spot the issue I would be very grateful.
Sample Amazon item: https://www.amazon.com/Charger-Protector-Extender-Charging-3-Sided/dp/B087RKKXM5?ref_=Oct_DLandingS_D_2bc0bb8e_62&smid=A1BGDLOO430MHB
const scrapeAmazon=()=>{
let title=$("#productTitle").text(),
pdescription="",
url=window.location.href,
bdescription="";
if(title) title=title.trim();
let images=[];
$("#altImages").find("li").each(function(){
let imgSrc=$(this).find("img").attr("src");
if(imgSrc){
if(imgSrc.split("._SS")[0] && imgSrc.indexOf("._SS")!=-1) images.push(imgSrc.split("._SS")[0]+"._SX1000_.jpg")
}
})