Skip to main content

Scrapers for Japanese boatrace websites

Project description

GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status Coverage PyPI version License: MIT Python version Code style: ruff

概要

ボートレース関連の WEB サイトのスクレイピングライブラリ

以下の機能を備える

パッケージの構成

名前空間パッケージになっており、共通の名前空間 (metaboatrace) を保持する同種のパッケージがある。

ボートレース公式サイトに対応する規約

名前空間は以下のように切られている。

  • metaboatrace.scrapers.official.website.v1707

この v1707 の部分はボートレース公式サイトのバージョンに対応している。

バージョニングは、Ubuntu でのそれに近い。
Ubuntu は 22.04 のように年と月という形でバージョニングされている(22.04.1 のようセキュリティパッチのリビジョンも付くことがある)。

ボートレースの公式サイトが現行のものになったのは 2017 年の 7 月なので、それに合わせてここでは v1707 としている。

機能

metaboatrace/scrapers/official/website/v1707/pages 直下に、公式サイトのページに対応した名前空間がある。
例えば、公式サイトの月間スケジュールに対応するものは monthly_schedule_page である。

これらの配下に locationscraping というモジュールがある。

前者は引数(日付など)をもとに公式サイトの URL を生成するような責務を負った関数が包含されている。
例えば、年と月を与えたら "https://boatrace.jp/owpc/pc/race/monthlyschedule?ym=202209" といったそのデータに対応する公式サイトの月間スケジュールの URL を返すような関数が入っている。

後者は、公式サイトの HTML ファイルをスクレイピングのモジュールである。
例えば、ここに入ってる関数は "https://boatrace.jp/owpc/pc/race/monthlyschedule?ym=202209" のファイルをスクレイピングしてエンティティを返すような処理を行う。

※ ここでいうエンティティはクリーンアーキテクチャの定義上のエンティティのことであり、metaboatrace.modelsはそういったものを提供しているパッケージ

ブランチ戦略

GitHub Flow を採用している。

Project details


Download files

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

Source Distribution

metaboatrace_scrapers-3.5.1.tar.gz (881.8 kB view details)

Uploaded Source

Built Distribution

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

metaboatrace_scrapers-3.5.1-py3-none-any.whl (950.6 kB view details)

Uploaded Python 3

File details

Details for the file metaboatrace_scrapers-3.5.1.tar.gz.

File metadata

  • Download URL: metaboatrace_scrapers-3.5.1.tar.gz
  • Upload date:
  • Size: 881.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for metaboatrace_scrapers-3.5.1.tar.gz
Algorithm Hash digest
SHA256 45f1dec2eb07fa69c0db2c32b412351b2f886935713de7efcee96dc47342ecf1
MD5 9c0ce236a9b262d86e987f39b7c6aa21
BLAKE2b-256 45f70a753de18f3a73ea6d98fa26588070d86dded3b130b070c00cc7e30cd7a4

See more details on using hashes here.

File details

Details for the file metaboatrace_scrapers-3.5.1-py3-none-any.whl.

File metadata

  • Download URL: metaboatrace_scrapers-3.5.1-py3-none-any.whl
  • Upload date:
  • Size: 950.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for metaboatrace_scrapers-3.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 baee204cb7aa1b685bb5c9aca6120dbe5d0c0d770da2e328ad5e9555c9c835ca
MD5 65be45849ce224fe718b8d27b9f23dac
BLAKE2b-256 ff5eeaebf81a403a6aac9cf21f54633e7d66be3118f6e5a2c13f0f3f58aa43d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page