Skip to main content

mysb-scraping

MySoftbankをスクレイピングして通信データ残量をLINE通知するやつ

Install

$ pip3 install mysb-scraping

Initialize

import mysoftbank

telnum = "your_phone_number"
password = "your_MySoftbank_password"
line_access_token = "your_line_notify_access_token"

api = mysoftbank.API(telnum=telnum, password=password, line_access_token=line_access_token)

Feature

# データ(使用量、残量、繰越残量、追加量、追加使用量、追加繰越量、追加繰越使用量)の取得
data = api.get_data()
print(data)

# out
{
    'used_data': 6.34,
    'remain_data': 0.02, 
    'step_remain_data': 0.0,
    'additional_data': 1.0,
    'additional_used_data': 0.98,
    'given_data': 0.36, 
    'given_used_data': 0.36
}
# lineに通知
status = api.send_message()
print(status)

# out
200

Demo

サンプルコードを実行した!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mysb_scraping-5.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mysb_scraping-5.0-py3-none-any.whl.

File metadata

  • Download URL: mysb_scraping-5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.7

File hashes

Hashes for mysb_scraping-5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a418797b6472b24dab1baefd370735a788d5b4f111955a987793f4067d8a64
MD5 2e2d972d446674f3d43504c93c9da98b
BLAKE2b-256 702d054e69704c24b7621e774a907f96bfc2c38b7b93070b950c3d8c5bf1571d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page