LoginSignup
14
7

More than 3 years have passed since last update.

クリックポストで連続自動支払いしてみた

Last updated at Posted at 2018-02-08

<動機>

クリックポストは便利なんだけど、支払いが1発送1処理(数ページをクリック)という、まさかの発狂仕様。

自動化したい&既存ソフトは中身がよくわからないので、自作してみた。

<概要>

tampermonkeyをインストール
②クリックポストの各ページで作動するスクリプトを合計5つ作成

①は分かりやすいページがいまいちないので、作成したいかも。
本記事では、②のスクリプトを記載する。

<5つのスクリプト>

1.複数支払い画面を自動化

// ==UserScript==
// @name         Click Post auto application
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://clickpost.jp/labels/multiple_payment
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    onload = function (){
    setTimeout(function(){
         document.querySelector('#send_history > span > table > tbody > tr:nth-child(1) > td.col_payment_label_19 > input').click();
    },100);
    };
})();

2.ヤフーログイン自動化(パターン1)

// ==UserScript==
// @name         Yahoo Login auto id&pass input
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://login.yahoo.co.jp/config/login?.src=yconnectv2*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    onload = function (){
    setTimeout(function(){
         document.querySelector('#username').value = "●●●@●●.●●";
    },100);
    setTimeout(function(){
         document.querySelector('#btnNext').click();
    },500);
    setTimeout(function(){
         document.querySelector('#passwd').value = "●●●●";
    },1000);
    setTimeout(function(){
         document.querySelector('#btnSubmit').click();
    },1500);
    };
})();

●●は、自分のメールアドレス、パスワード

3.ヤフーログイン自動化(パターン2)

// ==UserScript==
// @name         Yahoo Login auto pass input
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://login.yahoo.co.jp/config/login_verify2*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    onload = function (){
    setTimeout(function(){
         document.querySelector('#passwd').value = "●●●●";
    },100);
    setTimeout(function(){
         document.querySelector('#btnSubmit').click();
    },500);
    };
})();

●●は、自分のパスワード

4.クレジット情報確認を自動化


// ==UserScript==
// @name         Click Post Cresit Card Setting
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://wallet-link.fep.sbps.jp/order?key=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    onload = function (){
    setTimeout(function(){
         document.querySelector('#cvv').value = "●●●";
    },100);
    setTimeout(function(){
         document.querySelector('#consent-matters-agree').click();
    },500);
    setTimeout(function(){
         document.querySelector('#action > div > div > button').click();
    },1000);
    };
})();

●●●は自分のクレジットカードのセキュアコード

5.支払い確認を自動化

// ==UserScript==
// @name         Click Post Payment Submit
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://clickpost.jp/yahoo_wallet/confirm
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    onload = function (){
    setTimeout(function(){
         document.querySelector('#payment_complete_message > input').click();
    },100);
    };
})();

終わりに

最初は、独立したchrome拡張を作ろうか迷ったけど、tampermonkeyの手軽さにハマってしまった。

やってることは単純なので、何か新しいページを自動化したいと思ったとき、

シンプルなものなら、構想→開発→テスト→運用まで10分程度でできてしまう。

クリックポストを1日に30件以上利用してる人は、マジで世界が変わると思う。

有料ソフトを使うのを迷ってる人には、実装すべて無料なので、選択肢の1つとなるだろう。

14
7
10

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
7