Skip to content

Instantly share code, notes, and snippets.

@yushiro
Last active March 10, 2024 02:01
Show Gist options
  • Save yushiro/108414f000a08c456c546c662de177c5 to your computer and use it in GitHub Desktop.
Save yushiro/108414f000a08c456c546c662de177c5 to your computer and use it in GitHub Desktop.
批量从亚马逊中国区下载kindle上购买的电子书
var curIndex = -1;
function callbackDown(){
if(curIndex >=0) $('input.hideItem_myx')[curIndex].click();
curIndex++;
$('input.hideItem_myx')[curIndex].click();
$('ul button.myx-button-text')[curIndex].click();
//触发下载popup
setTimeout(function(){$('.myx-popover-inner .transcludedContent_myx .contentDetails_myx #contentAction_download_myx').trigger('click');},1000);
setTimeout(function(){$('.dialog_myx .myx-button-primary').trigger('click');},2000);
if(curIndex < $('input.hideItem_myx').length) setTimeout(callbackDown,3000);
}
callbackDown();
@BlessedTapir
Copy link

区别还是挺大的,这个脚本下载到的所有文件都保存在浏览器的下载文件夹里面,而且,每个文件的名字都是对的。就算全部发送到桌面端的Kindle for PC,也会获得一大堆用ASIN命名的文件夹。

我是在Linux和MacOS上试了 我是Firefox 好像控制台有输出但是浏览器或者下载栏没有任何反应

@yumenchen
Copy link

先删除所有的样章,样章会导致下载失败,从而中断下载

非常感谢,删除样章后顺利下载。

@Declanwu
Copy link

一本都没下成功,,,,不知道啥原因
404:1 GET https://www.amazon.cn/404 404 (Not Found)

@norwood2048
Copy link

失效了吗?

@upxxdn
Copy link

upxxdn commented Jul 5, 2023

失效了吗?

应该是失效了,我也用不了 TAT

@jiahe224
Copy link

估计失效了
VM515:6 Uncaught TypeError: Cannot read properties of null (reading '0')
at callbackDown (:6:25)
at :13:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment