Skip to main content

Scrapers for Japanese boatrace websites

Project description

概要

ボートレース公式サイト のユーティリティパッケージ

以下の機能を備える

  • URLの生成
  • スクレイピング

使用例

URLの生成

レースの出走表ページのURLを生成する

>>> from datetime import date
>>> from boatrace.models import StadiumTelCode
>>> from boatrace.official.v1707.pages.race.entry_page.location import create_race_entry_page_url
>>> create_race_entry_page_url(race_holding_date=date(2022, 9, 19), stadium_tel_code=StadiumTelCode.HEIWAJIMA, race_number=12)
'https://boatrace.jp/owpc/pc/race/racelist?rno=12&jcd=04&hd=20220919'

前検情報やオッズなど別種のページのURL構造も location というモジュールで持っていて、使い方は各種ユニットテストを参照

$ find boatrace/official/v1707 -name 'test_location*py' -type f
boatrace/official/v1707/pages/monthly_schedule_page/tests/test_location.py
boatrace/official/v1707/pages/pre_inspection_information_page/tests/test_location.py
boatrace/official/v1707/pages/race/before_information_page/tests/test_location.py
boatrace/official/v1707/pages/race/odds/trifecta_page/tests/test_location.py
boatrace/official/v1707/pages/race/result_page/tests/test_location.py
boatrace/official/v1707/pages/race/entry_page/tests/test_location.py
boatrace/official/v1707/pages/racer/profile_page/tests/test_location.py

スクレイピング

レース出走表をスクレイピングする

以下は取得の一例

https://github.com/BoatraceRepository/boatrace.official/blob/f0c4260d3fbbc781cd198acba647d41d6a6e4bc2/boatrace/official/v1707/pages/race/entry_page/tests/test_scraping.py#L19-L35

インターフェースの詳細は各種ユニットテスト参照

$ find boatrace/official/v1707 -name 'test_scraping*py' -type f

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-1.0.0.tar.gz (637.0 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-1.0.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metaboatrace_scrapers-1.0.0.tar.gz
  • Upload date:
  • Size: 637.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for metaboatrace_scrapers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f2060dd068ef0b89f3c020dafa715d7311fe2b11ff0822e093a58c7c2b668f8c
MD5 259189dc6b279c6e2afeddff538f0d73
BLAKE2b-256 bbcbf75d66fd5338f943c1f612188843bffd78b56c4ca215688a67b10b25e198

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for metaboatrace_scrapers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 676c86b5e5f1079fd1be107f8668faa9f1f2ffd9dcec2ad876434c3b3f7aa753
MD5 066a9a54dc789486f8affd3ae0ca2bad
BLAKE2b-256 d94f46b851b6973c60a03c06b509f81d69f6cfe3c79f9402b3ffb8324dd50ff2

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