suumo web scraping package
Project description
suumo_scraping
【SUUMO】不動産売買・住宅購入・賃貸情報ならリクルートの不動産ポータルサイトのデータをスクレイピングにより取得します。
Warning
SUUMOのご利用規約をよく読んでからご利用ください。不正の目的をもって利用する行為や商業目的で利用する行為(株式会社リクルートが認める場合を除く)は禁止されているので注意してください。
使い方
インストール
pip install suumo_scraping
データ取得
【SUUMO】不動産売買・住宅購入・賃貸情報ならリクルートの不動産ポータルサイトの賃貸物件でデータを取得したい条件で検索し、そのURLをcollect_rental_data関数に渡せば、物件情報を格納したデータをリストで取得できます。
例)
import suumo_scraping
url = 'https://suumo.jp/jj/chintai/ichiran/FR301FC001/?ar=060&bs=040&ra=026&cb=0.0&ct=9999999&et=9999999&cn=9999999&mb=0&mt=9999999&shkr1=03&shkr2=03&shkr3=03&shkr4=03&fw2=&ek=242012011&rn=2420'
results = suumo_scraping.collect_rental_data(url)
データの加工やCSVへの出力などは、pandasを利用するのが便利です。
例)
import pandas as pd
import suumo_scraping
url = 'https://suumo.jp/jj/chintai/ichiran/FR301FC001/?ar=060&bs=040&ra=026&cb=0.0&ct=9999999&et=9999999&cn=9999999&mb=0&mt=9999999&shkr1=03&shkr2=03&shkr3=03&shkr4=03&fw2=&ek=242012011&rn=2420'
results = suumo_scraping.collect_rental_data(url)
# 結果をpandasのデータフレームに変換し、CSVに出力
columns = results.pop(0)
df = pd.DataFrame(results, columns=columns)
df.to_csv('suumo_output.csv')
著者
浅野直樹
ライセンス
GNU Affero General Public License v3.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file suumo_scraping-0.0.1.tar.gz.
File metadata
- Download URL: suumo_scraping-0.0.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5525a29f1b2193e783c9895e9f5e2da3af601b278e71aae5265eea431d8c99
|
|
| MD5 |
3f422523135f650368b959673ced740b
|
|
| BLAKE2b-256 |
d621a105b11097fd31fa7c8aa811e94b67a565aca508da2cc74f4ff896356e08
|
File details
Details for the file suumo_scraping-0.0.1-py3-none-any.whl.
File metadata
- Download URL: suumo_scraping-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3e2719d47e48e4ddafe8a034553faa0431082b39bcfcbbf96a799c3912d6da9
|
|
| MD5 |
69338e51d343d800c69742e6ff77bcc0
|
|
| BLAKE2b-256 |
ccc3b8d7097a0f6b9b77a75c5913b1e2b0837876d412f994bdd6d6a9f29844d7
|