npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

amount-dmm-mobile

v1.0.5

Published

Export a CSV file which is as your DMM Mobile amount

Downloads

12

Readme

NPM

CircleCI GitHub Actions Status

DMMモバイルのマイページ内の「データ通信量照会」のデータを取得する

実行方法

インストール

$ npm install amount-dmm-mobile

または

$ yarn add amount-dmm-mobile

準備

コマンドを実行するディレクトリに .env ファイルを作り、そのファイルの中に DMM の ID(メールアドレス)とパスワードを以下のように設定して下さい。

[email protected]
DMM_PASSWORD=your_password

あるいは、以下のようにコマンド実行時に直接環境変数を設定することもできます。アカウント情報が丸見えになってしまうことにはご注意ください。

$ [email protected] DMM_PASSWORD=hogehoge npx amount_dmm_mobile

使い方

以下のコマンドを実行すると、実行したディレクトリに amount_of_dmm_mobile.csv という料金データが記録された CSV ファイル が生成されます。

$ npx amount_dmm_mobile
実行時オプション

~~実行時オプションとして、--number 2 のようにすると、2つ目の契約の番号のデータが得られます。デフォルトでは --number 1 です。~~

セレクタの変更に伴い、以下の --number オプションはいったん無効となっています。

$ amount_dmm_mobile --number 2

複数電話番号選択

ヘルプの内容

$ amount_dmm_mobile --help
Usage: amount_dmm_mobile [options]

Options:
  -n, --number <number>  A Nth number which indicates the Nth telephone number
                         in "My Page" (default: "1")
  -h, --help             output usage information

概要

  • 実行時間は、約90秒です
  • あまりに短い間隔で実行すると、BAN的なことをされる可能性があるかもしれません

データ通信量照会_01

データ通信量照会_02

出力されるCSV

出力されるCSV

開発方法

  • コードを書く
  • $ npm link を実行してインストールする
  • $ npx amount_dmm_mobile を実行して動作を確かめる
  • 不要になったら $ npm unlink で削除する

エラーメッセージとその対応策

  • UnhandledPromiseRejectionWarning: TypeError: text is not iterable at Keyboard.type
    • ユーザ名とパスワード(環境変数)は設定されていますか?

LICENSE