#蘋果日報財經版新聞擷取機器人 ###Little parser for getting finance news from apply daily, Taiwan.
This parser would get today finance news titles and pictures from Apple Dailay Inc.
Becareful! This parser would only get one day news. To getting more days, please using scheduling machine to execute this
programme every single day.
The news parsed from this parser are shown in Traditional Chinese.
##Require
- Ruby-2.0 || Maybe Ruby-1.9 could run
- Rubygems-current
- Nokogiri
- Open-uri
- Active-records
- MySQL-server
- NetWork
- YAML
- perfect print
##Data Schema
###Catalog
column name | name | kind | create_at | updated_at |
data type | string | integer | datetime | datetime |
column name | log_date | picture_address | news_title | news_address | serial |
data type | date | string | string | string | integer |
##Install
- Build the development database first
- Create a table called "NewsTable"
- Change the password and username in "database.yml" matching your own mysql server
- Change the path of your "database.yml" in "news.rb" to ensure that can connect to your database
- Change the path for your own database socket to ensure that you could connect to your mysql server properly.
- Execute the news.rb and then you can get the latest finance news from apple daily
- If you would like to make your programme execute every day, please checkout this tutorial.//Note that the tutorial was written in Chinese.
##Todo
There might be some "/" in the title of the news, this would cause the parser error.
To prevent the error, regular expresion would make the parser work perfectly.
Just need some time to do so.
##Data Resource