Skip to content

Little parser for getting finance news from Apple Daily Taiwan

Notifications You must be signed in to change notification settings

dylandy/taiwan-finance-news

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

#蘋果日報財經版新聞擷取機器人 ###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

  1. Ruby-2.0 || Maybe Ruby-1.9 could run
  2. Rubygems-current
  3. Nokogiri
  4. Open-uri
  5. Active-records
  6. MySQL-server
  7. NetWork
  8. YAML
  9. perfect print

##Data Schema

###Catalog

column namenamekindcreate_atupdated_at
data typestringintegerdatetimedatetime
:kind => limit:1, null:false ###NewsTable
column namelog_datepicture_addressnews_titlenews_addressserial
data typedatestringstringstringinteger
:log_id,:oil_id => null:false

##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

台灣蘋果日報財經新聞

About

Little parser for getting finance news from Apple Daily Taiwan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages