// ==UserScript==
// @name Amazon Scraper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Scrape Amazon page bp and download as excel file
// @author You
// @match https://www.amazon.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const description = Array.from(document.querySelectorAll('#feature-bullets span.a-list-item')).map(span => span.textContent.trim());
console.log(description);
const downloadExcel = (data) => {
const blob = new Blob([data], {type: 'application/vnd.ms-excel'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'amazon_data.xls';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
};
const downloadButton = document.createElement('button');
downloadButton.innerText = 'Download Excel';
downloadButton.style.position = 'fixed';
downloadButton.style.top = '10px';
downloadButton.style.right = '10px';
downloadButton.addEventListener('click', () => {
const data = [
[ 'Bullet Point'],
...description.map((description) => [description])
].map(row => row.join('\t')).join('\n');
downloadExcel(data);
});
document.body.appendChild(downloadButton);
})();
脑洞打开后ChatGpt能帮助我们做到的远远不仅仅如此,不得不说ChatGpt是非常棒的生产力工具,对用ChatGpt开发亚马逊工具的感兴趣的小伙伴可以转发分享本文后后台截图私聊"用ChatGpt快速开发亚马逊工具"加入快闪群,一起共享免费实用的插件工具!
---优质广告合作服务商伙伴--
---持续招募优质广告合作服务商伙伴--
喜欢此内容的人还喜欢:
写给每一位追梦的人
排版丨林子酱
文案丨林子酱
摄像丨林子酱
我明白你会来,所以我等
完