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-0.1.0.tar.gz
(637.1 kB
view hashes)
Built Distribution
Close
Hashes for metaboatrace_scrapers-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76020b6ce0fc5f7d4cdbf57bc7416bae37b812c23230ee568288414867e2e2d3 |
|
MD5 | c599c96d773f963d7306c6709d16a766 |
|
BLAKE2b-256 | d4e1e6edb2739063d2d3323ca2d214a26c834eb215c01eaa2dfb855f0750d395 |
Close
Hashes for metaboatrace_scrapers-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e532aa357ba5e22daf3b65e0ce70b242af3af25ce0b7b964c6097b60fac22f0 |
|
MD5 | 5546802f983a885f65ade22ebb29fda4 |
|
BLAKE2b-256 | 20ff689fe60cf6271642a54ec22420ceaf9cb783306b8fd542b6acb7bb7e3267 |