#台北果菜市場交易資料抓取機器人 ###Taipei fruit and vegetable transaction information collecting parser
This parser would parse the transaction information from Taipei's trading centre.
And would parse all of it from 2002-01-01 to today
Be careful! This would cost about 20MB of disk space.
##Require
- Ruby-2.0 || Maybe Ruby-1.9
- Rubygems-current
- Active records
- Nokogiri
- Open-uri
- NetWork
- MySQL-server
- YAML
- perfect print
##Data Schema
Note : Table VegetableLog is belonged to table Vegetable. ###Catalog
column name | name | kind | created_at | updated_at |
data type | string | integer | datetime | datetime |
column name | serial | name | r_name |
data type | string | string | string |
column name | price1 | price2 | price3 | log_date | create_at | update_at | vegetable_id |
data type | integer | integer | integer | date | datetime | datetime | integer |
##Install
- Build the development database first
- create "Vegetable" and "VegetableLog" table
- change the password and username in the "database.yml" with your own mysql server user and password
- change the path for your own database socket to ensure that you could connect to your mysql server properly.
- change the path for database.yml in "vege.rb" to ensure that can connect to your database
- execute the vege.rb and then would get the information
##Todo
- Multi-threading to make the parsing process faster.
- Some famous kinds of fruit and vegetable may not have any information.
- About half kind of the models in the database didn't update for so long.
##Data resource 台北農產運銷股份有限公司-Taipei Agricultural products markets co.