Last active
November 16, 2021 01:16
-
-
Save azimicat/d4f1517cacc9285a6df74b9440dd1b38 to your computer and use it in GitHub Desktop.
(改定済) hontoサイトのcouponページでgetしていないクーポンを一括でgetするスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hontoサイトのcouponページ(https://honto.jp/my/account/coupon.html)でgetしていないクーポンを一括でgetするスクリプト | |
console.log("開始!"); | |
(async function () { | |
const wait = (seccond) => new Promise(resolve => setTimeout(resolve, seccond)); | |
for await (elem of Array.from(document.querySelectorAll('.coupon-get-button'))) { | |
console.log(elem); | |
elem.click(); | |
console.log("Get!"); | |
await wait(500); | |
} | |
console.log("completed !!"); | |
window.alert("クーポンを全て取得しました"); | |
})(); |
console.log("開始!");
(async function () {
const wait = (seccond) => new Promise(resolve => setTimeout(resolve, seccond));
for await (elem of Array.from(document.querySelectorAll('.coupon-get-button'))) {
console.log(elem);
elem.click();
console.log("Get!");
await wait(500);
}
console.log("completed !!");
window.alert("クーポンを全て取得しました");
})();
複数件取得を確認した
ブックマーク登録するとこう
javascript:console.log("開始!"),async function(){const o=o=>new Promise(e=>setTimeout(e,o));for await(elem of Array.from(document.querySelectorAll(".coupon-get-button")))console.log(elem),elem.click(),console.log("Get!"),await o(500);console.log("completed !!"),window.alert("クーポンを全て取得しました")}();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
querySelectorAll(".coupon-get-button")
これに変更すればいけそうなきがする。