scrape item image from aliexpress

This commit is contained in:
2024-01-24 14:44:08 +01:00
parent ab4ab81e19
commit 2ed92e5412
3 changed files with 24 additions and 12 deletions

View File

@ -22,6 +22,7 @@ d3.csv('http://127.0.0.1/output.csv', d => {
value: parseFloat(d.price.replace('$', '')),
skuid: d.skuid,
itemid: d.itemid,
image: d.image,
currency: d.currency
}
}).then(function(data) {
@ -65,7 +66,7 @@ d3.csv('http://127.0.0.1/output.csv', d => {
.attr("y", height*0.1)
.attr("width", height*0.8)
.attr("height", height*0.8)
.attr("xlink:href", "https://en.wikipedia.org/static/images/icons/wikipedia.png") // placeholder picture for now, should be item picture
.attr("xlink:href", dataSubset[0].image) // placeholder picture for now, should be item picture
.on("click", function() { window.open(link); });
// Price domain (height)