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
スクレイピング
レース出走表をスクレイピングする
以下は取得の一例
インターフェースの詳細は各種ユニットテスト参照
$ find boatrace/official/v1707 -name 'test_scraping*py' -type f
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for metaboatrace_scrapers-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2060dd068ef0b89f3c020dafa715d7311fe2b11ff0822e093a58c7c2b668f8c |
|
MD5 | 259189dc6b279c6e2afeddff538f0d73 |
|
BLAKE2b-256 | bbcbf75d66fd5338f943c1f612188843bffd78b56c4ca215688a67b10b25e198 |
Close
Hashes for metaboatrace_scrapers-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 676c86b5e5f1079fd1be107f8668faa9f1f2ffd9dcec2ad876434c3b3f7aa753 |
|
MD5 | 066a9a54dc789486f8affd3ae0ca2bad |
|
BLAKE2b-256 | d94f46b851b6973c60a03c06b509f81d69f6cfe3c79f9402b3ffb8324dd50ff2 |