py591

Parser and parsing API service for 591 Housing Rental service


Keywords
api, 591, housing, housing-data, taiwan
License
BSD-3-Clause
Install
pip install py591==0.0.3

Documentation

591 租屋網資訊API

PyPI version

說明

給他一個 591 的網址,他會將租屋資訊轉成 JSON 格式給你,同時支援抓取連絡電話。提供一個 cli 工具以及一個基於 flask 的 api 介面。

使用方式

安裝

  1. 先 clone 一份 repo 到本地端
git clone https://github.com/frankurcrazy/591HousingApi.git
cd 591HousingApi
  1. 安裝 python 的 dependencies
pip install -r requirements.txt
  1. 也可以直接利用 pip 安裝,省略 1, 2 步驟
pip install py591
  1. 安裝 Tesseract。除了 python 對應的 Tesseract 模組之外,還得要安裝 Tesseract 引擎 For ubuntu/debian:
apt install -y tesseract-ocr

For FreeBSD:

pkg install -y tesseract

For MacOSX with homebrew:

brew install tesseract
  1. 使用指令介面或 API 介面 如果要使用指令介面請直接輸入
python -m py591.parse [591 租屋網網址]

如果要使用 API 介面,請輸入

python -m py591.app

打開瀏覽器輸入網址: http://localhost:5000/591/[591 租屋網網址]