Homework 1

# problem1
library(readr)
## Warning: package 'readr' was built under R version 3.3.3
lvr_data <- read_csv("D:/OS DATA/Desktop/lvr_prices_mac.csv", 
    col_types = cols(finish_ymd = col_date(format = "%Y-%m-%d"), 
        trading_ymd = col_date(format = "%Y-%m-%d")))
## Warning: Missing column names filled in: 'X1' [1]
## Warning in rbind(names(probs), probs_f): number of columns of result is not
## a multiple of vector length (arg 1)
## Warning: 32 parsing failures.
## row # A tibble: 5 x 5 col     row         col   expected     actual expected   <int>       <chr>      <chr>      <chr> actual 1  1282 total_price an integer 6700000000 file 2  2243 total_price an integer 3882685600 row 3  2244 total_price an integer 3373314400 col 4  4629 total_price an integer 3050000000 expected 5  5890 total_price an integer 3133800000 actual # ... with 1 more variables: file <chr>
## ... ................. ... ......................................... ........ ......................................... ...... ......................................... .... ......................................... ... ......................................... ... ......................................... ........ ......................................... ...... .......................................
## See problems(...) for more details.
class(lvr_data)
## [1] "tbl_df"     "tbl"        "data.frame"
head(lvr_data)
## # A tibble: 6 x 25
##      X1   area  trading_target                               address
##   <int>  <chr>           <chr>                                 <chr>
## 1     0 大安區 房地(土地+建物) 臺北市大安區和平東路三段1巷72弄1~30號
## 2     1 中正區 房地(土地+建物)     臺北市中正區忠孝東路二段121~150號
## 3     2 大同區            土地               橋北段二小段601~630地號
## 4     3 大同區 房地(土地+建物)       臺北市大同區重慶北路一段61~90號
## 5     4 內湖區 房地(土地+建物) 臺北市內湖區民權東路六段90巷6弄1~30號
## 6     5 信義區            土地               福德段一小段661~690地號
## # ... with 21 more variables: land_sqmeter <dbl>, city_land_type <chr>,
## #   trading_ymd <date>, trading_num <chr>, floor <chr>, total_floor <chr>,
## #   building_type <chr>, main_purpose <chr>, built_with <chr>,
## #   finish_ymd <date>, building_sqmeter <dbl>, room <int>,
## #   living_room <int>, bath <int>, compartment <chr>, management <chr>,
## #   total_price <int>, price_per_sqmeter <dbl>, parking_type <chr>,
## #   parking_sqmeter <dbl>, parking_price <int>
#problem2
daan <- lvr_data[lvr_data$area == '大安區' , 'total_price' ]

sum(as.numeric(daan$total_price), na.rm=TRUE)
## [1] 2.79477e+11
mean(as.numeric(daan$total_price), na.rm=TRUE)
## [1] 29798170
median(as.numeric(daan$total_price), na.rm=TRUE)
## [1] 2e+07
a <- c(1,2,3, NA)
sum(a, na.rm = TRUE)
## [1] 6
?sum
## starting httpd help server ...
##  done
#problem3
house <- lvr_data[lvr_data$area == '中山區' , c('address', 'total_price')  ]
#head(house)
head(sort(house$total_price, decreasing = TRUE))
## [1] 1850000000 1400000000 1084948034 1011136500  952875000  903865500
idx <- head(order(house$total_price, decreasing = TRUE), 3)
idx
## [1]  5621  2445 14937
zhongshan <- house[  idx    ,     ]
zhongshan
## # A tibble: 3 x 2
##                               address total_price
##                                 <chr>       <int>
## 1 臺北市中山區建國北路一段138巷1~30號  1850000000
## 2      臺北市中山區南京東路三段1~30號  1400000000
## 3               中山段二小段31~60地號  1084948034

Data Collection

getwd()
## [1] "D:/OS DATA/Desktop"
download.file('https://raw.githubusercontent.com/ywchiu/rtibame/master/Data/purchase.csv', destfile = 'purchase.csv')

?read.csv
purchase <- read.csv('purchase.csv')
class(purchase)
## [1] "data.frame"
View(purchase)

str(purchase)
## 'data.frame':    54772 obs. of  7 variables:
##  $ X       : int  0 1 2 3 4 5 6 7 8 9 ...
##  $ Time    : Factor w/ 53387 levels "2015-07-01 00:00:01",..: 1 2 3 4 5 6 7 8 9 10 ...
##  $ Action  : Factor w/ 1 level "order": 1 1 1 1 1 1 1 1 1 1 ...
##  $ User    : Factor w/ 32539 levels "U1000001354",..: 8750 7126 187 7952 8235 19731 21996 13919 21994 8700 ...
##  $ Product : Factor w/ 20054 levels "P0000005913",..: 7731 6487 2370 12645 12183 4228 10469 4506 537 7731 ...
##  $ Quantity: int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Price   : num  1069 1680 285 550 249 ...
library(readr)
purchase <- read_csv("D:/OS DATA/Desktop/purchase.csv")
## Warning: Missing column names filled in: 'X1' [1]
## Parsed with column specification:
## cols(
##   X1 = col_integer(),
##   Time = col_datetime(format = ""),
##   Action = col_character(),
##   User = col_character(),
##   Product = col_character(),
##   Quantity = col_integer(),
##   Price = col_double()
## )
View(purchase)


data()
data(iris)
class(iris)
## [1] "data.frame"
View(iris)

write.csv(x = iris, file = 'iris.csv')
write.table(x = iris, file = 'iris.tab', sep = '\t')


save(x = iris, file = 'iris.RData')
rm(iris)
load('iris.RData')


data(anscombe)
fit <- lm(y1 ~ x1, data = anscombe)
save(x = fit, file = 'fit.RData')
load('fit.RData')

getwd()
## [1] "D:/OS DATA/Desktop"
setwd("D:/OS DATA/Desktop")

library(readxl)
## Warning: package 'readxl' was built under R version 3.3.3
FinancialReport <- read_excel("D:/OS DATA/Desktop/FinancialReport.xlsx")
View(FinancialReport)


download.file('https://raw.githubusercontent.com/ywchiu/rtibame/master/Data/fb.json', destfile = 'fb.json')

library(jsonlite)
## Warning: package 'jsonlite' was built under R version 3.3.3
json_data <- fromJSON('fb.json')
json_data$data$message
## [1] "Looking forward to 2010!" "Where's my contract?"
library(XML)
## Warning: package 'XML' was built under R version 3.3.3
url <- 'http://download.post.gov.tw/post/download/county_h_10603.xml'
zipcode <- xmlToDataFrame(url)
zipcode
##     甈<bd><8d>1   甈<bd><8d>2                        甈<bd><8d>3
## 1            100   臺北市中正區       Zhongzheng Dist., Taipei City
## 2            103   臺北市大同區           Datong Dist., Taipei City
## 3            104   臺北市中山區        Zhongshan Dist., Taipei City
## 4            105   臺北市松山區         Songshan Dist., Taipei City
## 5            106   臺北市大安區            Da’an Dist., Taipei City
## 6            108   臺北市萬華區           Wanhua Dist., Taipei City
## 7            110   臺北市信義區            Xinyi Dist., Taipei City
## 8            111   臺北市士林區           Shilin Dist., Taipei City
## 9            112   臺北市北投區           Beitou Dist., Taipei City
## 10           114   臺北市內湖區            Neihu Dist., Taipei City
## 11           115   臺北市南港區          Nangang Dist., Taipei City
## 12           116   臺北市文山區          Wenshan Dist., Taipei City
## 13           200   基隆市仁愛區          Ren’ai Dist., Keelung City
## 14           201   基隆市信義區           Xinyi Dist., Keelung City
## 15           202   基隆市中正區      Zhongzheng Dist., Keelung City
## 16           203   基隆市中山區       Zhongshan Dist., Keelung City
## 17           204   基隆市安樂區            Anle Dist., Keelung City
## 18           205   基隆市暖暖區        Nuannuan Dist., Keelung City
## 19           206   基隆市七堵區            Qidu Dist., Keelung City
## 20           207   新北市萬里區        Wanli Dist., New Taipei City
## 21           208   新北市金山區      Jinshan Dist., New Taipei City
## 22           209   連江縣南竿鄉  Nangan Township, Lienchiang County
## 23           210   連江縣北竿鄉  Beigan Township, Lienchiang County
## 24           211   連江縣莒光鄉 Juguang Township, Lienchiang County
## 25           212   連江縣東引鄉 Dongyin Township, Lienchiang County
## 26           220   新北市板橋區      Banqiao Dist., New Taipei City
## 27           221   新北市汐止區        Xizhi Dist., New Taipei City
## 28           222   新北市深坑區     Shenkeng Dist., New Taipei City
## 29           223   新北市石碇區      Shiding Dist., New Taipei City
## 30           224   新北市瑞芳區      Ruifang Dist., New Taipei City
## 31           226   新北市平溪區       Pingxi Dist., New Taipei City
## 32           227   新北市雙溪區     Shuangxi Dist., New Taipei City
## 33           228   新北市貢寮區     Gongliao Dist., New Taipei City
## 34           231   新北市新店區      Xindian Dist., New Taipei City
## 35           232   新北市坪林區      Pinglin Dist., New Taipei City
## 36           233   新北市烏來區        Wulai Dist., New Taipei City
## 37           234   新北市永和區       Yonghe Dist., New Taipei City
## 38           235   新北市中和區      Zhonghe Dist., New Taipei City
## 39           236   新北市土城區      Tucheng Dist., New Taipei City
## 40           237   新北市三峽區       Sanxia Dist., New Taipei City
## 41           238   新北市樹林區       Shulin Dist., New Taipei City
## 42           239   新北市鶯歌區       Yingge Dist., New Taipei City
## 43           241   新北市三重區     Sanchong Dist., New Taipei City
## 44           242   新北市新莊區    Xinzhuang Dist., New Taipei City
## 45           243   新北市泰山區      Taishan Dist., New Taipei City
## 46           244   新北市林口區       Linkou Dist., New Taipei City
## 47           247   新北市蘆洲區       Luzhou Dist., New Taipei City
## 48           248   新北市五股區         Wugu Dist., New Taipei City
## 49           249   新北市八里區         Bali Dist., New Taipei City
## 50           251   新北市淡水區       Tamsui Dist., New Taipei City
## 51           252   新北市三芝區       Sanzhi Dist., New Taipei City
## 52           253   新北市石門區       Shimen Dist., New Taipei City
## 53           260   宜蘭縣宜蘭市            Yilan City, Yilan County
## 54           261   宜蘭縣頭城鎮     Toucheng Township, Yilan County
## 55           262   宜蘭縣礁溪鄉       Jiaoxi Township, Yilan County
## 56           263   宜蘭縣壯圍鄉    Zhuangwei Township, Yilan County
## 57           264   宜蘭縣員山鄉     Yuanshan Township, Yilan County
## 58           265   宜蘭縣羅東鎮      Luodong Township, Yilan County
## 59           266   宜蘭縣三星鄉      Sanxing Township, Yilan County
## 60           267   宜蘭縣大同鄉       Datong Township, Yilan County
## 61           268   宜蘭縣五結鄉        Wujie Township, Yilan County
## 62           269   宜蘭縣冬山鄉     Dongshan Township, Yilan County
## 63           270   宜蘭縣蘇澳鎮        Su’ao Township, Yilan County
## 64           272   宜蘭縣南澳鄉       Nan’ao Township, Yilan County
## 65           290         釣魚台                           Diaoyutai
## 66           300     新竹市東區            East Dist., Hsinchu City
## 67           300     新竹市北區           North Dist., Hsinchu City
## 68           300   新竹市香山區       Xiangshan Dist., Hsinchu City
## 69           302   新竹縣竹北市         Zhubei City, Hsinchu County
## 70           303   新竹縣湖口鄉      Hukou Township, Hsinchu County
## 71           304   新竹縣新豐鄉    Xinfeng Township, Hsinchu County
## 72           305   新竹縣新埔鎮      Xinpu Township, Hsinchu County
## 73           306   新竹縣關西鎮     Guanxi Township, Hsinchu County
## 74           307   新竹縣芎林鄉   Qionglin Township, Hsinchu County
## 75           308   新竹縣寶山鄉    Baoshan Township, Hsinchu County
## 76           310   新竹縣竹東鎮    Zhudong Township, Hsinchu County
## 77           311   新竹縣五峰鄉     Wufeng Township, Hsinchu County
## 78           312   新竹縣橫山鄉   Hengshan Township, Hsinchu County
## 79           313   新竹縣尖石鄉    Jianshi Township, Hsinchu County
## 80           314   新竹縣北埔鄉      Beipu Township, Hsinchu County
## 81           315   新竹縣峨眉鄉       Emei Township, Hsinchu County
## 82           320   桃園市中壢區         Zhongli Dist., Taoyuan City
## 83           324   桃園市平鎮區        Pingzhen Dist., Taoyuan City
## 84           325   桃園市龍潭區         Longtan Dist., Taoyuan City
## 85           326   桃園市楊梅區         Yangmei Dist., Taoyuan City
## 86           327   桃園市新屋區           Xinwu Dist., Taoyuan City
## 87           328   桃園市觀音區         Guanyin Dist., Taoyuan City
## 88           330   桃園市桃園區         Taoyuan Dist., Taoyuan City
## 89           333   桃園市龜山區         Guishan Dist., Taoyuan City
## 90           334   桃園市八德區            Bade Dist., Taoyuan City
## 91           335   桃園市大溪區            Daxi Dist., Taoyuan City
## 92           336   桃園市復興區          Fuxing Dist., Taoyuan City
## 93           337   桃園市大園區          Dayuan Dist., Taoyuan City
## 94           338   桃園市蘆竹區           Luzhu Dist., Taoyuan City
## 95           350   苗栗縣竹南鎮      Zhunan Township, Miaoli County
## 96           351   苗栗縣頭份市          Toufen City, Miaoli County
## 97           352   苗栗縣三灣鄉      Sanwan Township, Miaoli County
## 98           353   苗栗縣南庄鄉   Nanzhuang Township, Miaoli County
## 99           354   苗栗縣獅潭鄉      Shitan Township, Miaoli County
## 100          356   苗栗縣後龍鎮     Houlong Township, Miaoli County
## 101          357   苗栗縣通霄鎮    Tongxiao Township, Miaoli County
## 102          358   苗栗縣苑裡鎮      Yuanli Township, Miaoli County
## 103          360   苗栗縣苗栗市          Miaoli City, Miaoli County
## 104          361   苗栗縣造橋鄉     Zaoqiao Township, Miaoli County
## 105          362   苗栗縣頭屋鄉       Touwu Township, Miaoli County
## 106          363   苗栗縣公館鄉    Gongguan Township, Miaoli County
## 107          364   苗栗縣大湖鄉        Dahu Township, Miaoli County
## 108          365   苗栗縣泰安鄉      Tai’an Township, Miaoli County
## 109          366   苗栗縣銅鑼鄉     Tongluo Township, Miaoli County
## 110          367   苗栗縣三義鄉       Sanyi Township, Miaoli County
## 111          368   苗栗縣西湖鄉        Xihu Township, Miaoli County
## 112          369   苗栗縣卓蘭鎮     Zhuolan Township, Miaoli County
## 113          400     臺中市中區        Central Dist., Taichung City
## 114          401     臺中市東區           East Dist., Taichung City
## 115          402     臺中市南區          South Dist., Taichung City
## 116          403     臺中市西區           West Dist., Taichung City
## 117          404     臺中市北區          North Dist., Taichung City
## 118          406   臺中市北屯區         Beitun Dist., Taichung City
## 119          407   臺中市西屯區          Xitun Dist., Taichung City
## 120          408   臺中市南屯區         Nantun Dist., Taichung City
## 121          411   臺中市太平區        Taiping Dist., Taichung City
## 122          412   臺中市大里區           Dali Dist., Taichung City
## 123          413   臺中市霧峰區         Wufeng Dist., Taichung City
## 124          414   臺中市烏日區           Wuri Dist., Taichung City
## 125          420   臺中市豐原區       Fengyuan Dist., Taichung City
## 126          421   臺中市后里區          Houli Dist., Taichung City
## 127          422   臺中市石岡區        Shigang Dist., Taichung City
## 128          423   臺中市東勢區        Dongshi Dist., Taichung City
## 129          424   臺中市和平區         Heping Dist., Taichung City
## 130          426   臺中市新社區         Xinshe Dist., Taichung City
## 131          427   臺中市潭子區          Tanzi Dist., Taichung City
## 132          428   臺中市大雅區           Daya Dist., Taichung City
## 133          429   臺中市神岡區       Shengang Dist., Taichung City
## 134          432   臺中市大肚區           Dadu Dist., Taichung City
## 135          433   臺中市沙鹿區          Shalu Dist., Taichung City
## 136          434   臺中市龍井區       Longjing Dist., Taichung City
## 137          435   臺中市梧棲區           Wuqi Dist., Taichung City
## 138          436   臺中市清水區       Qingshui Dist., Taichung City
## 139          437   臺中市大甲區          Dajia Dist., Taichung City
## 140          438   臺中市外埔區          Waipu Dist., Taichung City
## 141          439   臺中市大安區          Da’an Dist., Taichung City
## 142          500   彰化縣彰化市      Changhua City, Changhua County
## 143          502   彰化縣芬園鄉   Fenyuan Township, Changhua County
## 144          503   彰化縣花壇鄉    Huatan Township, Changhua County
## 145          504   彰化縣秀水鄉   Xiushui Township, Changhua County
## 146          505   彰化縣鹿港鎮    Lukang Township, Changhua County
## 147          506   彰化縣福興鄉    Fuxing Township, Changhua County
## 148          507   彰化縣線西鄉    Xianxi Township, Changhua County
## 149          508   彰化縣和美鎮     Hemei Township, Changhua County
## 150          509   彰化縣伸港鄉  Shengang Township, Changhua County
## 151          510   彰化縣員林市       Yuanlin City, Changhua County
## 152          511   彰化縣社頭鄉    Shetou Township, Changhua County
## 153          512   彰化縣永靖鄉  Yongjing Township, Changhua County
## 154          513   彰化縣埔心鄉     Puxin Township, Changhua County
## 155          514   彰化縣溪湖鎮      Xihu Township, Changhua County
## 156          515   彰化縣大村鄉     Dacun Township, Changhua County
## 157          516   彰化縣埔鹽鄉     Puyan Township, Changhua County
## 158          520   彰化縣田中鎮 Tianzhong Township, Changhua County
## 159          521   彰化縣北斗鎮    Beidou Township, Changhua County
## 160          522   彰化縣田尾鄉   Tianwei Township, Changhua County
## 161          523   彰化縣埤頭鄉     Pitou Township, Changhua County
## 162          524   彰化縣溪州鄉    Xizhou Township, Changhua County
## 163          525   彰化縣竹塘鄉   Zhutang Township, Changhua County
## 164          526   彰化縣二林鎮     Erlin Township, Changhua County
## 165          527   彰化縣大城鄉   Dacheng Township, Changhua County
## 166          528   彰化縣芳苑鄉  Fangyuan Township, Changhua County
## 167          530   彰化縣二水鄉    Ershui Township, Changhua County
## 168          540   南投縣南投市          Nantou City, Nantou County
## 169          541   南投縣中寮鄉   Zhongliao Township, Nantou County
## 170          542   南投縣草屯鎮      Caotun Township, Nantou County
## 171          544   南投縣國姓鄉     Guoxing Township, Nantou County
## 172          545   南投縣埔里鎮        Puli Township, Nantou County
## 173          546   南投縣仁愛鄉      Ren’ai Township, Nantou County
## 174          551   南投縣名間鄉    Mingjian Township, Nantou County
## 175          552   南投縣集集鎮        Jiji Township, Nantou County
## 176          553   南投縣水里鄉      Shuili Township, Nantou County
## 177          555   南投縣魚池鄉       Yuchi Township, Nantou County
## 178          556   南投縣信義鄉       Xinyi Township, Nantou County
## 179          557   南投縣竹山鎮     Zhushan Township, Nantou County
## 180          558   南投縣鹿谷鄉        Lugu Township, Nantou County
## 181          600     嘉義市東區             East Dist., Chiayi City
## 182          600     嘉義市西區             West Dist., Chiayi City
## 183          602   嘉義縣番路鄉       Fanlu Township, Chiayi County
## 184          603   嘉義縣梅山鄉     Meishan Township, Chiayi County
## 185          604   嘉義縣竹崎鄉       Zhuqi Township, Chiayi County
## 186          605 嘉義縣阿里山鄉     Alishan Township, Chiayi County
## 187          606   嘉義縣中埔鄉     Zhongpu Township, Chiayi County
## 188          607   嘉義縣大埔鄉        Dapu Township, Chiayi County
## 189          608   嘉義縣水上鄉   Shuishang Township, Chiayi County
## 190          611   嘉義縣鹿草鄉       Lucao Township, Chiayi County
## 191          612   嘉義縣太保市          Taibao City, Chiayi County
## 192          613   嘉義縣朴子市            Puzi City, Chiayi County
## 193          614   嘉義縣東石鄉     Dongshi Township, Chiayi County
## 194          615   嘉義縣六腳鄉     Liujiao Township, Chiayi County
## 195          616   嘉義縣新港鄉     Xingang Township, Chiayi County
## 196          621   嘉義縣民雄鄉    Minxiong Township, Chiayi County
## 197          622   嘉義縣大林鎮       Dalin Township, Chiayi County
## 198          623   嘉義縣溪口鄉       Xikou Township, Chiayi County
## 199          624   嘉義縣義竹鄉       Yizhu Township, Chiayi County
## 200          625   嘉義縣布袋鎮       Budai Township, Chiayi County
## 201          630   雲林縣斗南鎮      Dounan Township, Yunlin County
## 202          631   雲林縣大埤鄉        Dapi Township, Yunlin County
## 203          632   雲林縣虎尾鎮       Huwei Township, Yunlin County
## 204          633   雲林縣土庫鎮        Tuku Township, Yunlin County
## 205          634   雲林縣褒忠鄉    Baozhong Township, Yunlin County
## 206          635   雲林縣東勢鄉     Dongshi Township, Yunlin County
## 207          636   雲林縣臺西鄉       Taixi Township, Yunlin County
## 208          637   雲林縣崙背鄉      Lunbei Township, Yunlin County
## 209          638   雲林縣麥寮鄉     Mailiao Township, Yunlin County
## 210          640   雲林縣斗六市          Douliu City, Yunlin County
## 211          643   雲林縣林內鄉      Linnei Township, Yunlin County
## 212          646   雲林縣古坑鄉      Gukeng Township, Yunlin County
## 213          647   雲林縣莿桐鄉      Citong Township, Yunlin County
## 214          648   雲林縣西螺鎮       Xiluo Township, Yunlin County
## 215          649   雲林縣二崙鄉       Erlun Township, Yunlin County
## 216          651   雲林縣北港鎮     Beigang Township, Yunlin County
## 217          652   雲林縣水林鄉     Shuilin Township, Yunlin County
## 218          653   雲林縣口湖鄉       Kouhu Township, Yunlin County
## 219          654   雲林縣四湖鄉        Sihu Township, Yunlin County
## 220          655   雲林縣元長鄉   Yuanchang Township, Yunlin County
## 221          700   臺南市中西區     West Central Dist., Tainan City
## 222          701     臺南市東區             East Dist., Tainan City
## 223          702     臺南市南區            South Dist., Tainan City
## 224          704     臺南市北區            North Dist., Tainan City
## 225          708   臺南市安平區           Anping Dist., Tainan City
## 226          709   臺南市安南區            Annan Dist., Tainan City
## 227          710   臺南市永康區         Yongkang Dist., Tainan City
## 228          711   臺南市歸仁區           Guiren Dist., Tainan City
## 229          712   臺南市新化區           Xinhua Dist., Tainan City
## 230          713   臺南市左鎮區          Zuozhen Dist., Tainan City
## 231          714   臺南市玉井區           Yujing Dist., Tainan City
## 232          715   臺南市楠西區            Nanxi Dist., Tainan City
## 233          716   臺南市南化區           Nanhua Dist., Tainan City
## 234          717   臺南市仁德區            Rende Dist., Tainan City
## 235          718   臺南市關廟區         Guanmiao Dist., Tainan City
## 236          719   臺南市龍崎區           Longqi Dist., Tainan City
## 237          720   臺南市官田區         Guantian Dist., Tainan City
## 238          721   臺南市麻豆區            Madou Dist., Tainan City
## 239          722   臺南市佳里區            Jiali Dist., Tainan City
## 240          723   臺南市西港區           Xigang Dist., Tainan City
## 241          724   臺南市七股區             Qigu Dist., Tainan City
## 242          725   臺南市將軍區         Jiangjun Dist., Tainan City
## 243          726   臺南市學甲區           Xuejia Dist., Tainan City
## 244          727   臺南市北門區           Beimen Dist., Tainan City
## 245          730   臺南市新營區          Xinying Dist., Tainan City
## 246          731   臺南市後壁區            Houbi Dist., Tainan City
## 247          732   臺南市白河區            Baihe Dist., Tainan City
## 248          733   臺南市東山區         Dongshan Dist., Tainan City
## 249          734   臺南市六甲區           Liujia Dist., Tainan City
## 250          735   臺南市下營區          Xiaying Dist., Tainan City
## 251          736   臺南市柳營區          Liuying Dist., Tainan City
## 252          737   臺南市鹽水區          Yanshui Dist., Tainan City
## 253          741   臺南市善化區          Shanhua Dist., Tainan City
## 254          742   臺南市大內區            Danei Dist., Tainan City
## 255          743   臺南市山上區        Shanshang Dist., Tainan City
## 256          744   臺南市新市區           Xinshi Dist., Tainan City
## 257          745   臺南市安定區           Anding Dist., Tainan City
## 258          800   高雄市新興區       Xinxing Dist., Kaohsiung City
## 259          801   高雄市前金區       Qianjin Dist., Kaohsiung City
## 260          802   高雄市苓雅區        Lingya Dist., Kaohsiung City
## 261          803   高雄市鹽埕區      Yancheng Dist., Kaohsiung City
## 262          804   高雄市鼓山區        Gushan Dist., Kaohsiung City
## 263          805   高雄市旗津區         Qijin Dist., Kaohsiung City
## 264          806   高雄市前鎮區      Qianzhen Dist., Kaohsiung City
## 265          807   高雄市三民區        Sanmin Dist., Kaohsiung City
## 266          811   高雄市楠梓區         Nanzi Dist., Kaohsiung City
## 267          812   高雄市小港區      Xiaogang Dist., Kaohsiung City
## 268          813   高雄市左營區       Zuoying Dist., Kaohsiung City
## 269          814   高雄市仁武區         Renwu Dist., Kaohsiung City
## 270          815   高雄市大社區         Dashe Dist., Kaohsiung City
## 271          817 高雄市東沙群島     Dongsha Islands, Nanhai Islands
## 272          819 高雄市南沙群島      Nansha Islands, Nanhai Islands
## 273          820   高雄市岡山區      Gangshan Dist., Kaohsiung City
## 274          821   高雄市路竹區         Luzhu Dist., Kaohsiung City
## 275          822   高雄市阿蓮區         Alian Dist., Kaohsiung City
## 276          823   高雄市田寮區      Tianliao Dist., Kaohsiung City
## 277          824   高雄市燕巢區       Yanchao Dist., Kaohsiung City
## 278          825   高雄市橋頭區       Qiaotou Dist., Kaohsiung City
## 279          826   高雄市梓官區        Ziguan Dist., Kaohsiung City
## 280          827   高雄市彌陀區         Mituo Dist., Kaohsiung City
## 281          828   高雄市永安區       Yong’an Dist., Kaohsiung City
## 282          829   高雄市湖內區         Hunei Dist., Kaohsiung City
## 283          830   高雄市鳳山區      Fengshan Dist., Kaohsiung City
## 284          831   高雄市大寮區        Daliao Dist., Kaohsiung City
## 285          832   高雄市林園區       Linyuan Dist., Kaohsiung City
## 286          833   高雄市鳥松區      Niaosong Dist., Kaohsiung City
## 287          840   高雄市大樹區         Dashu Dist., Kaohsiung City
## 288          842   高雄市旗山區        Qishan Dist., Kaohsiung City
## 289          843   高雄市美濃區       Meinong Dist., Kaohsiung City
## 290          844   高雄市六龜區        Liugui Dist., Kaohsiung City
## 291          845   高雄市內門區        Neimen Dist., Kaohsiung City
## 292          846   高雄市杉林區       Shanlin Dist., Kaohsiung City
## 293          847   高雄市甲仙區       Jiaxian Dist., Kaohsiung City
## 294          848   高雄市桃源區       Taoyuan Dist., Kaohsiung City
## 295          849 高雄市那瑪夏區       Namaxia Dist., Kaohsiung City
## 296          851   高雄市茂林區        Maolin Dist., Kaohsiung City
## 297          852   高雄市茄萣區       Qieding Dist., Kaohsiung City
## 298          880   澎湖縣馬公市          Magong City, Penghu County
## 299          881   澎湖縣西嶼鄉        Xiyu Township, Penghu County
## 300          882   澎湖縣望安鄉     Wang’an Township, Penghu County
## 301          883   澎湖縣七美鄉       Qimei Township, Penghu County
## 302          884   澎湖縣白沙鄉      Baisha Township, Penghu County
## 303          885   澎湖縣湖西鄉        Huxi Township, Penghu County
## 304          890   金門縣金沙鎮      Jinsha Township, Kinmen County
## 305          891   金門縣金湖鎮       Jinhu Township, Kinmen County
## 306          892   金門縣金寧鄉     Jinning Township, Kinmen County
## 307          893   金門縣金城鎮    Jincheng Township, Kinmen County
## 308          894   金門縣烈嶼鄉       Lieyu Township, Kinmen County
## 309          896   金門縣烏坵鄉       Wuqiu Township, Kinmen County
## 310          900   屏東縣屏東市      Pingtung City, Pingtung County
## 311          901 屏東縣三地門鄉  Sandimen Township, Pingtung County
## 312          902   屏東縣霧臺鄉     Wutai Township, Pingtung County
## 313          903   屏東縣瑪家鄉     Majia Township, Pingtung County
## 314          904   屏東縣九如鄉     Jiuru Township, Pingtung County
## 315          905   屏東縣里港鄉    Ligang Township, Pingtung County
## 316          906   屏東縣高樹鄉    Gaoshu Township, Pingtung County
## 317          907   屏東縣鹽埔鄉     Yanpu Township, Pingtung County
## 318          908   屏東縣長治鄉  Changzhi Township, Pingtung County
## 319          909   屏東縣麟洛鄉    Linluo Township, Pingtung County
## 320          911   屏東縣竹田鄉   Zhutian Township, Pingtung County
## 321          912   屏東縣內埔鄉     Neipu Township, Pingtung County
## 322          913   屏東縣萬丹鄉    Wandan Township, Pingtung County
## 323          920   屏東縣潮州鎮  Chaozhou Township, Pingtung County
## 324          921   屏東縣泰武鄉     Taiwu Township, Pingtung County
## 325          922   屏東縣來義鄉     Laiyi Township, Pingtung County
## 326          923   屏東縣萬巒鄉   Wanluan Township, Pingtung County
## 327          924   屏東縣崁頂鄉   Kanding Township, Pingtung County
## 328          925   屏東縣新埤鄉     Xinpi Township, Pingtung County
## 329          926   屏東縣南州鄉   Nanzhou Township, Pingtung County
## 330          927   屏東縣林邊鄉   Linbian Township, Pingtung County
## 331          928   屏東縣東港鎮  Donggang Township, Pingtung County
## 332          929   屏東縣琉球鄉    Liuqiu Township, Pingtung County
## 333          931   屏東縣佳冬鄉   Jiadong Township, Pingtung County
## 334          932   屏東縣新園鄉   Xinyuan Township, Pingtung County
## 335          940   屏東縣枋寮鄉  Fangliao Township, Pingtung County
## 336          941   屏東縣枋山鄉  Fangshan Township, Pingtung County
## 337          942   屏東縣春日鄉    Chunri Township, Pingtung County
## 338          943   屏東縣獅子鄉     Shizi Township, Pingtung County
## 339          944   屏東縣車城鄉  Checheng Township, Pingtung County
## 340          945   屏東縣牡丹鄉     Mudan Township, Pingtung County
## 341          946   屏東縣恆春鎮  Hengchun Township, Pingtung County
## 342          947   屏東縣滿州鄉   Manzhou Township, Pingtung County
## 343          950   臺東縣臺東市        Taitung City, Taitung County
## 344          951   臺東縣綠島鄉      Ludao Township, Taitung County
## 345          952   臺東縣蘭嶼鄉      Lanyu Township, Taitung County
## 346          953   臺東縣延平鄉    Yanping Township, Taitung County
## 347          954   臺東縣卑南鄉     Beinan Township, Taitung County
## 348          955   臺東縣鹿野鄉       Luye Township, Taitung County
## 349          956   臺東縣關山鎮   Guanshan Township, Taitung County
## 350          957   臺東縣海端鄉    Haiduan Township, Taitung County
## 351          958   臺東縣池上鄉   Chishang Township, Taitung County
## 352          959   臺東縣東河鄉     Donghe Township, Taitung County
## 353          961   臺東縣成功鎮  Chenggong Township, Taitung County
## 354          962   臺東縣長濱鄉   Changbin Township, Taitung County
## 355          963 臺東縣太麻里鄉    Taimali Township, Taitung County
## 356          964   臺東縣金峰鄉    Jinfeng Township, Taitung County
## 357          965   臺東縣大武鄉       Dawu Township, Taitung County
## 358          966   臺東縣達仁鄉      Daren Township, Taitung County
## 359          970   花蓮縣花蓮市        Hualien City, Hualien County
## 360          971   花蓮縣新城鄉   Xincheng Township, Hualien County
## 361          972   花蓮縣秀林鄉     Xiulin Township, Hualien County
## 362          973   花蓮縣吉安鄉      Ji’an Township, Hualien County
## 363          974   花蓮縣壽豐鄉   Shoufeng Township, Hualien County
## 364          975   花蓮縣鳳林鎮    Fenglin Township, Hualien County
## 365          976   花蓮縣光復鄉    Guangfu Township, Hualien County
## 366          977   花蓮縣豐濱鄉    Fengbin Township, Hualien County
## 367          978   花蓮縣瑞穗鄉     Ruisui Township, Hualien County
## 368          979   花蓮縣萬榮鄉    Wanrong Township, Hualien County
## 369          981   花蓮縣玉里鎮       Yuli Township, Hualien County
## 370          982   花蓮縣卓溪鄉     Zhuoxi Township, Hualien County
## 371          983   花蓮縣富里鄉       Fuli Township, Hualien County
names(zipcode) = c('郵遞區號', '中文名稱', '英文名稱')
zipcode
##     郵遞區號       中文名稱                            英文名稱
## 1        100   臺北市中正區       Zhongzheng Dist., Taipei City
## 2        103   臺北市大同區           Datong Dist., Taipei City
## 3        104   臺北市中山區        Zhongshan Dist., Taipei City
## 4        105   臺北市松山區         Songshan Dist., Taipei City
## 5        106   臺北市大安區            Da’an Dist., Taipei City
## 6        108   臺北市萬華區           Wanhua Dist., Taipei City
## 7        110   臺北市信義區            Xinyi Dist., Taipei City
## 8        111   臺北市士林區           Shilin Dist., Taipei City
## 9        112   臺北市北投區           Beitou Dist., Taipei City
## 10       114   臺北市內湖區            Neihu Dist., Taipei City
## 11       115   臺北市南港區          Nangang Dist., Taipei City
## 12       116   臺北市文山區          Wenshan Dist., Taipei City
## 13       200   基隆市仁愛區          Ren’ai Dist., Keelung City
## 14       201   基隆市信義區           Xinyi Dist., Keelung City
## 15       202   基隆市中正區      Zhongzheng Dist., Keelung City
## 16       203   基隆市中山區       Zhongshan Dist., Keelung City
## 17       204   基隆市安樂區            Anle Dist., Keelung City
## 18       205   基隆市暖暖區        Nuannuan Dist., Keelung City
## 19       206   基隆市七堵區            Qidu Dist., Keelung City
## 20       207   新北市萬里區        Wanli Dist., New Taipei City
## 21       208   新北市金山區      Jinshan Dist., New Taipei City
## 22       209   連江縣南竿鄉  Nangan Township, Lienchiang County
## 23       210   連江縣北竿鄉  Beigan Township, Lienchiang County
## 24       211   連江縣莒光鄉 Juguang Township, Lienchiang County
## 25       212   連江縣東引鄉 Dongyin Township, Lienchiang County
## 26       220   新北市板橋區      Banqiao Dist., New Taipei City
## 27       221   新北市汐止區        Xizhi Dist., New Taipei City
## 28       222   新北市深坑區     Shenkeng Dist., New Taipei City
## 29       223   新北市石碇區      Shiding Dist., New Taipei City
## 30       224   新北市瑞芳區      Ruifang Dist., New Taipei City
## 31       226   新北市平溪區       Pingxi Dist., New Taipei City
## 32       227   新北市雙溪區     Shuangxi Dist., New Taipei City
## 33       228   新北市貢寮區     Gongliao Dist., New Taipei City
## 34       231   新北市新店區      Xindian Dist., New Taipei City
## 35       232   新北市坪林區      Pinglin Dist., New Taipei City
## 36       233   新北市烏來區        Wulai Dist., New Taipei City
## 37       234   新北市永和區       Yonghe Dist., New Taipei City
## 38       235   新北市中和區      Zhonghe Dist., New Taipei City
## 39       236   新北市土城區      Tucheng Dist., New Taipei City
## 40       237   新北市三峽區       Sanxia Dist., New Taipei City
## 41       238   新北市樹林區       Shulin Dist., New Taipei City
## 42       239   新北市鶯歌區       Yingge Dist., New Taipei City
## 43       241   新北市三重區     Sanchong Dist., New Taipei City
## 44       242   新北市新莊區    Xinzhuang Dist., New Taipei City
## 45       243   新北市泰山區      Taishan Dist., New Taipei City
## 46       244   新北市林口區       Linkou Dist., New Taipei City
## 47       247   新北市蘆洲區       Luzhou Dist., New Taipei City
## 48       248   新北市五股區         Wugu Dist., New Taipei City
## 49       249   新北市八里區         Bali Dist., New Taipei City
## 50       251   新北市淡水區       Tamsui Dist., New Taipei City
## 51       252   新北市三芝區       Sanzhi Dist., New Taipei City
## 52       253   新北市石門區       Shimen Dist., New Taipei City
## 53       260   宜蘭縣宜蘭市            Yilan City, Yilan County
## 54       261   宜蘭縣頭城鎮     Toucheng Township, Yilan County
## 55       262   宜蘭縣礁溪鄉       Jiaoxi Township, Yilan County
## 56       263   宜蘭縣壯圍鄉    Zhuangwei Township, Yilan County
## 57       264   宜蘭縣員山鄉     Yuanshan Township, Yilan County
## 58       265   宜蘭縣羅東鎮      Luodong Township, Yilan County
## 59       266   宜蘭縣三星鄉      Sanxing Township, Yilan County
## 60       267   宜蘭縣大同鄉       Datong Township, Yilan County
## 61       268   宜蘭縣五結鄉        Wujie Township, Yilan County
## 62       269   宜蘭縣冬山鄉     Dongshan Township, Yilan County
## 63       270   宜蘭縣蘇澳鎮        Su’ao Township, Yilan County
## 64       272   宜蘭縣南澳鄉       Nan’ao Township, Yilan County
## 65       290         釣魚台                           Diaoyutai
## 66       300     新竹市東區            East Dist., Hsinchu City
## 67       300     新竹市北區           North Dist., Hsinchu City
## 68       300   新竹市香山區       Xiangshan Dist., Hsinchu City
## 69       302   新竹縣竹北市         Zhubei City, Hsinchu County
## 70       303   新竹縣湖口鄉      Hukou Township, Hsinchu County
## 71       304   新竹縣新豐鄉    Xinfeng Township, Hsinchu County
## 72       305   新竹縣新埔鎮      Xinpu Township, Hsinchu County
## 73       306   新竹縣關西鎮     Guanxi Township, Hsinchu County
## 74       307   新竹縣芎林鄉   Qionglin Township, Hsinchu County
## 75       308   新竹縣寶山鄉    Baoshan Township, Hsinchu County
## 76       310   新竹縣竹東鎮    Zhudong Township, Hsinchu County
## 77       311   新竹縣五峰鄉     Wufeng Township, Hsinchu County
## 78       312   新竹縣橫山鄉   Hengshan Township, Hsinchu County
## 79       313   新竹縣尖石鄉    Jianshi Township, Hsinchu County
## 80       314   新竹縣北埔鄉      Beipu Township, Hsinchu County
## 81       315   新竹縣峨眉鄉       Emei Township, Hsinchu County
## 82       320   桃園市中壢區         Zhongli Dist., Taoyuan City
## 83       324   桃園市平鎮區        Pingzhen Dist., Taoyuan City
## 84       325   桃園市龍潭區         Longtan Dist., Taoyuan City
## 85       326   桃園市楊梅區         Yangmei Dist., Taoyuan City
## 86       327   桃園市新屋區           Xinwu Dist., Taoyuan City
## 87       328   桃園市觀音區         Guanyin Dist., Taoyuan City
## 88       330   桃園市桃園區         Taoyuan Dist., Taoyuan City
## 89       333   桃園市龜山區         Guishan Dist., Taoyuan City
## 90       334   桃園市八德區            Bade Dist., Taoyuan City
## 91       335   桃園市大溪區            Daxi Dist., Taoyuan City
## 92       336   桃園市復興區          Fuxing Dist., Taoyuan City
## 93       337   桃園市大園區          Dayuan Dist., Taoyuan City
## 94       338   桃園市蘆竹區           Luzhu Dist., Taoyuan City
## 95       350   苗栗縣竹南鎮      Zhunan Township, Miaoli County
## 96       351   苗栗縣頭份市          Toufen City, Miaoli County
## 97       352   苗栗縣三灣鄉      Sanwan Township, Miaoli County
## 98       353   苗栗縣南庄鄉   Nanzhuang Township, Miaoli County
## 99       354   苗栗縣獅潭鄉      Shitan Township, Miaoli County
## 100      356   苗栗縣後龍鎮     Houlong Township, Miaoli County
## 101      357   苗栗縣通霄鎮    Tongxiao Township, Miaoli County
## 102      358   苗栗縣苑裡鎮      Yuanli Township, Miaoli County
## 103      360   苗栗縣苗栗市          Miaoli City, Miaoli County
## 104      361   苗栗縣造橋鄉     Zaoqiao Township, Miaoli County
## 105      362   苗栗縣頭屋鄉       Touwu Township, Miaoli County
## 106      363   苗栗縣公館鄉    Gongguan Township, Miaoli County
## 107      364   苗栗縣大湖鄉        Dahu Township, Miaoli County
## 108      365   苗栗縣泰安鄉      Tai’an Township, Miaoli County
## 109      366   苗栗縣銅鑼鄉     Tongluo Township, Miaoli County
## 110      367   苗栗縣三義鄉       Sanyi Township, Miaoli County
## 111      368   苗栗縣西湖鄉        Xihu Township, Miaoli County
## 112      369   苗栗縣卓蘭鎮     Zhuolan Township, Miaoli County
## 113      400     臺中市中區        Central Dist., Taichung City
## 114      401     臺中市東區           East Dist., Taichung City
## 115      402     臺中市南區          South Dist., Taichung City
## 116      403     臺中市西區           West Dist., Taichung City
## 117      404     臺中市北區          North Dist., Taichung City
## 118      406   臺中市北屯區         Beitun Dist., Taichung City
## 119      407   臺中市西屯區          Xitun Dist., Taichung City
## 120      408   臺中市南屯區         Nantun Dist., Taichung City
## 121      411   臺中市太平區        Taiping Dist., Taichung City
## 122      412   臺中市大里區           Dali Dist., Taichung City
## 123      413   臺中市霧峰區         Wufeng Dist., Taichung City
## 124      414   臺中市烏日區           Wuri Dist., Taichung City
## 125      420   臺中市豐原區       Fengyuan Dist., Taichung City
## 126      421   臺中市后里區          Houli Dist., Taichung City
## 127      422   臺中市石岡區        Shigang Dist., Taichung City
## 128      423   臺中市東勢區        Dongshi Dist., Taichung City
## 129      424   臺中市和平區         Heping Dist., Taichung City
## 130      426   臺中市新社區         Xinshe Dist., Taichung City
## 131      427   臺中市潭子區          Tanzi Dist., Taichung City
## 132      428   臺中市大雅區           Daya Dist., Taichung City
## 133      429   臺中市神岡區       Shengang Dist., Taichung City
## 134      432   臺中市大肚區           Dadu Dist., Taichung City
## 135      433   臺中市沙鹿區          Shalu Dist., Taichung City
## 136      434   臺中市龍井區       Longjing Dist., Taichung City
## 137      435   臺中市梧棲區           Wuqi Dist., Taichung City
## 138      436   臺中市清水區       Qingshui Dist., Taichung City
## 139      437   臺中市大甲區          Dajia Dist., Taichung City
## 140      438   臺中市外埔區          Waipu Dist., Taichung City
## 141      439   臺中市大安區          Da’an Dist., Taichung City
## 142      500   彰化縣彰化市      Changhua City, Changhua County
## 143      502   彰化縣芬園鄉   Fenyuan Township, Changhua County
## 144      503   彰化縣花壇鄉    Huatan Township, Changhua County
## 145      504   彰化縣秀水鄉   Xiushui Township, Changhua County
## 146      505   彰化縣鹿港鎮    Lukang Township, Changhua County
## 147      506   彰化縣福興鄉    Fuxing Township, Changhua County
## 148      507   彰化縣線西鄉    Xianxi Township, Changhua County
## 149      508   彰化縣和美鎮     Hemei Township, Changhua County
## 150      509   彰化縣伸港鄉  Shengang Township, Changhua County
## 151      510   彰化縣員林市       Yuanlin City, Changhua County
## 152      511   彰化縣社頭鄉    Shetou Township, Changhua County
## 153      512   彰化縣永靖鄉  Yongjing Township, Changhua County
## 154      513   彰化縣埔心鄉     Puxin Township, Changhua County
## 155      514   彰化縣溪湖鎮      Xihu Township, Changhua County
## 156      515   彰化縣大村鄉     Dacun Township, Changhua County
## 157      516   彰化縣埔鹽鄉     Puyan Township, Changhua County
## 158      520   彰化縣田中鎮 Tianzhong Township, Changhua County
## 159      521   彰化縣北斗鎮    Beidou Township, Changhua County
## 160      522   彰化縣田尾鄉   Tianwei Township, Changhua County
## 161      523   彰化縣埤頭鄉     Pitou Township, Changhua County
## 162      524   彰化縣溪州鄉    Xizhou Township, Changhua County
## 163      525   彰化縣竹塘鄉   Zhutang Township, Changhua County
## 164      526   彰化縣二林鎮     Erlin Township, Changhua County
## 165      527   彰化縣大城鄉   Dacheng Township, Changhua County
## 166      528   彰化縣芳苑鄉  Fangyuan Township, Changhua County
## 167      530   彰化縣二水鄉    Ershui Township, Changhua County
## 168      540   南投縣南投市          Nantou City, Nantou County
## 169      541   南投縣中寮鄉   Zhongliao Township, Nantou County
## 170      542   南投縣草屯鎮      Caotun Township, Nantou County
## 171      544   南投縣國姓鄉     Guoxing Township, Nantou County
## 172      545   南投縣埔里鎮        Puli Township, Nantou County
## 173      546   南投縣仁愛鄉      Ren’ai Township, Nantou County
## 174      551   南投縣名間鄉    Mingjian Township, Nantou County
## 175      552   南投縣集集鎮        Jiji Township, Nantou County
## 176      553   南投縣水里鄉      Shuili Township, Nantou County
## 177      555   南投縣魚池鄉       Yuchi Township, Nantou County
## 178      556   南投縣信義鄉       Xinyi Township, Nantou County
## 179      557   南投縣竹山鎮     Zhushan Township, Nantou County
## 180      558   南投縣鹿谷鄉        Lugu Township, Nantou County
## 181      600     嘉義市東區             East Dist., Chiayi City
## 182      600     嘉義市西區             West Dist., Chiayi City
## 183      602   嘉義縣番路鄉       Fanlu Township, Chiayi County
## 184      603   嘉義縣梅山鄉     Meishan Township, Chiayi County
## 185      604   嘉義縣竹崎鄉       Zhuqi Township, Chiayi County
## 186      605 嘉義縣阿里山鄉     Alishan Township, Chiayi County
## 187      606   嘉義縣中埔鄉     Zhongpu Township, Chiayi County
## 188      607   嘉義縣大埔鄉        Dapu Township, Chiayi County
## 189      608   嘉義縣水上鄉   Shuishang Township, Chiayi County
## 190      611   嘉義縣鹿草鄉       Lucao Township, Chiayi County
## 191      612   嘉義縣太保市          Taibao City, Chiayi County
## 192      613   嘉義縣朴子市            Puzi City, Chiayi County
## 193      614   嘉義縣東石鄉     Dongshi Township, Chiayi County
## 194      615   嘉義縣六腳鄉     Liujiao Township, Chiayi County
## 195      616   嘉義縣新港鄉     Xingang Township, Chiayi County
## 196      621   嘉義縣民雄鄉    Minxiong Township, Chiayi County
## 197      622   嘉義縣大林鎮       Dalin Township, Chiayi County
## 198      623   嘉義縣溪口鄉       Xikou Township, Chiayi County
## 199      624   嘉義縣義竹鄉       Yizhu Township, Chiayi County
## 200      625   嘉義縣布袋鎮       Budai Township, Chiayi County
## 201      630   雲林縣斗南鎮      Dounan Township, Yunlin County
## 202      631   雲林縣大埤鄉        Dapi Township, Yunlin County
## 203      632   雲林縣虎尾鎮       Huwei Township, Yunlin County
## 204      633   雲林縣土庫鎮        Tuku Township, Yunlin County
## 205      634   雲林縣褒忠鄉    Baozhong Township, Yunlin County
## 206      635   雲林縣東勢鄉     Dongshi Township, Yunlin County
## 207      636   雲林縣臺西鄉       Taixi Township, Yunlin County
## 208      637   雲林縣崙背鄉      Lunbei Township, Yunlin County
## 209      638   雲林縣麥寮鄉     Mailiao Township, Yunlin County
## 210      640   雲林縣斗六市          Douliu City, Yunlin County
## 211      643   雲林縣林內鄉      Linnei Township, Yunlin County
## 212      646   雲林縣古坑鄉      Gukeng Township, Yunlin County
## 213      647   雲林縣莿桐鄉      Citong Township, Yunlin County
## 214      648   雲林縣西螺鎮       Xiluo Township, Yunlin County
## 215      649   雲林縣二崙鄉       Erlun Township, Yunlin County
## 216      651   雲林縣北港鎮     Beigang Township, Yunlin County
## 217      652   雲林縣水林鄉     Shuilin Township, Yunlin County
## 218      653   雲林縣口湖鄉       Kouhu Township, Yunlin County
## 219      654   雲林縣四湖鄉        Sihu Township, Yunlin County
## 220      655   雲林縣元長鄉   Yuanchang Township, Yunlin County
## 221      700   臺南市中西區     West Central Dist., Tainan City
## 222      701     臺南市東區             East Dist., Tainan City
## 223      702     臺南市南區            South Dist., Tainan City
## 224      704     臺南市北區            North Dist., Tainan City
## 225      708   臺南市安平區           Anping Dist., Tainan City
## 226      709   臺南市安南區            Annan Dist., Tainan City
## 227      710   臺南市永康區         Yongkang Dist., Tainan City
## 228      711   臺南市歸仁區           Guiren Dist., Tainan City
## 229      712   臺南市新化區           Xinhua Dist., Tainan City
## 230      713   臺南市左鎮區          Zuozhen Dist., Tainan City
## 231      714   臺南市玉井區           Yujing Dist., Tainan City
## 232      715   臺南市楠西區            Nanxi Dist., Tainan City
## 233      716   臺南市南化區           Nanhua Dist., Tainan City
## 234      717   臺南市仁德區            Rende Dist., Tainan City
## 235      718   臺南市關廟區         Guanmiao Dist., Tainan City
## 236      719   臺南市龍崎區           Longqi Dist., Tainan City
## 237      720   臺南市官田區         Guantian Dist., Tainan City
## 238      721   臺南市麻豆區            Madou Dist., Tainan City
## 239      722   臺南市佳里區            Jiali Dist., Tainan City
## 240      723   臺南市西港區           Xigang Dist., Tainan City
## 241      724   臺南市七股區             Qigu Dist., Tainan City
## 242      725   臺南市將軍區         Jiangjun Dist., Tainan City
## 243      726   臺南市學甲區           Xuejia Dist., Tainan City
## 244      727   臺南市北門區           Beimen Dist., Tainan City
## 245      730   臺南市新營區          Xinying Dist., Tainan City
## 246      731   臺南市後壁區            Houbi Dist., Tainan City
## 247      732   臺南市白河區            Baihe Dist., Tainan City
## 248      733   臺南市東山區         Dongshan Dist., Tainan City
## 249      734   臺南市六甲區           Liujia Dist., Tainan City
## 250      735   臺南市下營區          Xiaying Dist., Tainan City
## 251      736   臺南市柳營區          Liuying Dist., Tainan City
## 252      737   臺南市鹽水區          Yanshui Dist., Tainan City
## 253      741   臺南市善化區          Shanhua Dist., Tainan City
## 254      742   臺南市大內區            Danei Dist., Tainan City
## 255      743   臺南市山上區        Shanshang Dist., Tainan City
## 256      744   臺南市新市區           Xinshi Dist., Tainan City
## 257      745   臺南市安定區           Anding Dist., Tainan City
## 258      800   高雄市新興區       Xinxing Dist., Kaohsiung City
## 259      801   高雄市前金區       Qianjin Dist., Kaohsiung City
## 260      802   高雄市苓雅區        Lingya Dist., Kaohsiung City
## 261      803   高雄市鹽埕區      Yancheng Dist., Kaohsiung City
## 262      804   高雄市鼓山區        Gushan Dist., Kaohsiung City
## 263      805   高雄市旗津區         Qijin Dist., Kaohsiung City
## 264      806   高雄市前鎮區      Qianzhen Dist., Kaohsiung City
## 265      807   高雄市三民區        Sanmin Dist., Kaohsiung City
## 266      811   高雄市楠梓區         Nanzi Dist., Kaohsiung City
## 267      812   高雄市小港區      Xiaogang Dist., Kaohsiung City
## 268      813   高雄市左營區       Zuoying Dist., Kaohsiung City
## 269      814   高雄市仁武區         Renwu Dist., Kaohsiung City
## 270      815   高雄市大社區         Dashe Dist., Kaohsiung City
## 271      817 高雄市東沙群島     Dongsha Islands, Nanhai Islands
## 272      819 高雄市南沙群島      Nansha Islands, Nanhai Islands
## 273      820   高雄市岡山區      Gangshan Dist., Kaohsiung City
## 274      821   高雄市路竹區         Luzhu Dist., Kaohsiung City
## 275      822   高雄市阿蓮區         Alian Dist., Kaohsiung City
## 276      823   高雄市田寮區      Tianliao Dist., Kaohsiung City
## 277      824   高雄市燕巢區       Yanchao Dist., Kaohsiung City
## 278      825   高雄市橋頭區       Qiaotou Dist., Kaohsiung City
## 279      826   高雄市梓官區        Ziguan Dist., Kaohsiung City
## 280      827   高雄市彌陀區         Mituo Dist., Kaohsiung City
## 281      828   高雄市永安區       Yong’an Dist., Kaohsiung City
## 282      829   高雄市湖內區         Hunei Dist., Kaohsiung City
## 283      830   高雄市鳳山區      Fengshan Dist., Kaohsiung City
## 284      831   高雄市大寮區        Daliao Dist., Kaohsiung City
## 285      832   高雄市林園區       Linyuan Dist., Kaohsiung City
## 286      833   高雄市鳥松區      Niaosong Dist., Kaohsiung City
## 287      840   高雄市大樹區         Dashu Dist., Kaohsiung City
## 288      842   高雄市旗山區        Qishan Dist., Kaohsiung City
## 289      843   高雄市美濃區       Meinong Dist., Kaohsiung City
## 290      844   高雄市六龜區        Liugui Dist., Kaohsiung City
## 291      845   高雄市內門區        Neimen Dist., Kaohsiung City
## 292      846   高雄市杉林區       Shanlin Dist., Kaohsiung City
## 293      847   高雄市甲仙區       Jiaxian Dist., Kaohsiung City
## 294      848   高雄市桃源區       Taoyuan Dist., Kaohsiung City
## 295      849 高雄市那瑪夏區       Namaxia Dist., Kaohsiung City
## 296      851   高雄市茂林區        Maolin Dist., Kaohsiung City
## 297      852   高雄市茄萣區       Qieding Dist., Kaohsiung City
## 298      880   澎湖縣馬公市          Magong City, Penghu County
## 299      881   澎湖縣西嶼鄉        Xiyu Township, Penghu County
## 300      882   澎湖縣望安鄉     Wang’an Township, Penghu County
## 301      883   澎湖縣七美鄉       Qimei Township, Penghu County
## 302      884   澎湖縣白沙鄉      Baisha Township, Penghu County
## 303      885   澎湖縣湖西鄉        Huxi Township, Penghu County
## 304      890   金門縣金沙鎮      Jinsha Township, Kinmen County
## 305      891   金門縣金湖鎮       Jinhu Township, Kinmen County
## 306      892   金門縣金寧鄉     Jinning Township, Kinmen County
## 307      893   金門縣金城鎮    Jincheng Township, Kinmen County
## 308      894   金門縣烈嶼鄉       Lieyu Township, Kinmen County
## 309      896   金門縣烏坵鄉       Wuqiu Township, Kinmen County
## 310      900   屏東縣屏東市      Pingtung City, Pingtung County
## 311      901 屏東縣三地門鄉  Sandimen Township, Pingtung County
## 312      902   屏東縣霧臺鄉     Wutai Township, Pingtung County
## 313      903   屏東縣瑪家鄉     Majia Township, Pingtung County
## 314      904   屏東縣九如鄉     Jiuru Township, Pingtung County
## 315      905   屏東縣里港鄉    Ligang Township, Pingtung County
## 316      906   屏東縣高樹鄉    Gaoshu Township, Pingtung County
## 317      907   屏東縣鹽埔鄉     Yanpu Township, Pingtung County
## 318      908   屏東縣長治鄉  Changzhi Township, Pingtung County
## 319      909   屏東縣麟洛鄉    Linluo Township, Pingtung County
## 320      911   屏東縣竹田鄉   Zhutian Township, Pingtung County
## 321      912   屏東縣內埔鄉     Neipu Township, Pingtung County
## 322      913   屏東縣萬丹鄉    Wandan Township, Pingtung County
## 323      920   屏東縣潮州鎮  Chaozhou Township, Pingtung County
## 324      921   屏東縣泰武鄉     Taiwu Township, Pingtung County
## 325      922   屏東縣來義鄉     Laiyi Township, Pingtung County
## 326      923   屏東縣萬巒鄉   Wanluan Township, Pingtung County
## 327      924   屏東縣崁頂鄉   Kanding Township, Pingtung County
## 328      925   屏東縣新埤鄉     Xinpi Township, Pingtung County
## 329      926   屏東縣南州鄉   Nanzhou Township, Pingtung County
## 330      927   屏東縣林邊鄉   Linbian Township, Pingtung County
## 331      928   屏東縣東港鎮  Donggang Township, Pingtung County
## 332      929   屏東縣琉球鄉    Liuqiu Township, Pingtung County
## 333      931   屏東縣佳冬鄉   Jiadong Township, Pingtung County
## 334      932   屏東縣新園鄉   Xinyuan Township, Pingtung County
## 335      940   屏東縣枋寮鄉  Fangliao Township, Pingtung County
## 336      941   屏東縣枋山鄉  Fangshan Township, Pingtung County
## 337      942   屏東縣春日鄉    Chunri Township, Pingtung County
## 338      943   屏東縣獅子鄉     Shizi Township, Pingtung County
## 339      944   屏東縣車城鄉  Checheng Township, Pingtung County
## 340      945   屏東縣牡丹鄉     Mudan Township, Pingtung County
## 341      946   屏東縣恆春鎮  Hengchun Township, Pingtung County
## 342      947   屏東縣滿州鄉   Manzhou Township, Pingtung County
## 343      950   臺東縣臺東市        Taitung City, Taitung County
## 344      951   臺東縣綠島鄉      Ludao Township, Taitung County
## 345      952   臺東縣蘭嶼鄉      Lanyu Township, Taitung County
## 346      953   臺東縣延平鄉    Yanping Township, Taitung County
## 347      954   臺東縣卑南鄉     Beinan Township, Taitung County
## 348      955   臺東縣鹿野鄉       Luye Township, Taitung County
## 349      956   臺東縣關山鎮   Guanshan Township, Taitung County
## 350      957   臺東縣海端鄉    Haiduan Township, Taitung County
## 351      958   臺東縣池上鄉   Chishang Township, Taitung County
## 352      959   臺東縣東河鄉     Donghe Township, Taitung County
## 353      961   臺東縣成功鎮  Chenggong Township, Taitung County
## 354      962   臺東縣長濱鄉   Changbin Township, Taitung County
## 355      963 臺東縣太麻里鄉    Taimali Township, Taitung County
## 356      964   臺東縣金峰鄉    Jinfeng Township, Taitung County
## 357      965   臺東縣大武鄉       Dawu Township, Taitung County
## 358      966   臺東縣達仁鄉      Daren Township, Taitung County
## 359      970   花蓮縣花蓮市        Hualien City, Hualien County
## 360      971   花蓮縣新城鄉   Xincheng Township, Hualien County
## 361      972   花蓮縣秀林鄉     Xiulin Township, Hualien County
## 362      973   花蓮縣吉安鄉      Ji’an Township, Hualien County
## 363      974   花蓮縣壽豐鄉   Shoufeng Township, Hualien County
## 364      975   花蓮縣鳳林鎮    Fenglin Township, Hualien County
## 365      976   花蓮縣光復鄉    Guangfu Township, Hualien County
## 366      977   花蓮縣豐濱鄉    Fengbin Township, Hualien County
## 367      978   花蓮縣瑞穗鄉     Ruisui Township, Hualien County
## 368      979   花蓮縣萬榮鄉    Wanrong Township, Hualien County
## 369      981   花蓮縣玉里鎮       Yuli Township, Hualien County
## 370      982   花蓮縣卓溪鄉     Zhuoxi Township, Hualien County
## 371      983   花蓮縣富里鄉       Fuli Township, Hualien County

Web Crawler

# install.packages('rvest')
# crawler 1
library(rvest)
## Warning: package 'rvest' was built under R version 3.3.3
## Loading required package: xml2
## Warning: package 'xml2' was built under R version 3.3.3
## 
## Attaching package: 'rvest'
## The following object is masked from 'package:XML':
## 
##     xml
## The following object is masked from 'package:readr':
## 
##     guess_encoding
newsurl <- 'http://www.appledaily.com.tw/realtimenews/section/new/'
apple <- read_html(newsurl, encoding = 'utf-8')
as.character(apple)
## [1] "<!DOCTYPE html>\n<!--[if lt IE 7 ]> <html lang=\"zh-TW\" class=\"ie6 ielt8\"> <![endif]--><!--[if IE 7 ]>    <html lang=\"zh-TW\" class=\"ie7 ielt8\"> <![endif]--><!--[if IE 8 ]>    <html lang=\"zh-TW\" class=\"ie8\"> <![endif]--><!--[if (gte IE 9)|!(IE)]><!--><html lang=\"zh-TW\">\n<!--<![endif]--><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<meta charset=\"utf-8\">\n<title>蘋果即時新聞|蘋果日報|Apple Daily</title>\n<meta name=\"description\" content=\"蘋果日報網站提供即時、快速、豐富的最新時事動態,包含國際、社會、娛樂、政治、生活、財經等最新訊息,並為您搜奇地球村萬象與趣聞,強調有圖有真相、影片最明白,讓您時時刻刻掌握天下事!\">\n<meta name=\"keywords\" content=\"蘋果日報,Apple Daily,台灣,壹傳媒,Apple, Animation news, Action News, Apple news, news,蘋果,即時,最新,蘋果新聞,新聞,壹週刊,壹電視,動新聞,即時新聞,Facebook,臉書,蘋果粉絲團,plurk,twitter,留言,分享,按讚,天氣,影音新聞,影片,影音,行動版,手機,App,Android,iphone,Mango,爆料,投稿,發票,統一發票,RSS,生活,國際,娛樂,體育,副刊,財經,股市,樂透,威力彩,社會,熱門,彩券,頭彩\">\n<meta property=\"og:title\" content=\"蘋果即時新聞|蘋果日報|Apple Daily\">\n<meta property=\"og:image\" content=\"http://twimg.edgesuite.net/appledaily/images/core/logo_bg.png\">\n<meta property=\"og:description\" content=\"蘋果日報網站提供即時、快速、豐富的最新時事動態,包含國際、社會、娛樂、政治、生活、財經等最新訊息,並為您搜奇地球村萬象與趣聞,強調有圖有真相、影片最明白,讓您時時刻刻掌握天下事!\">\n<link rel=\"shortcut icon\" href=\"http://twimg.edgesuite.net/appledaily/pinsite/64x64.ico\">\n<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"http://twimg.edgesuite.net/appledaily/pinsite/64x64.ico\">\n<link rel=\"icon\" type=\"image/ico\" href=\"http://twimg.edgesuite.net/appledaily/pinsite/64x64.ico\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/style.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/modules.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/rtnewslist.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/style.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/realtimenews.css\">\n<script src=\"http://twimg.edgesuite.net/www/js/html5.js\"></script><script src=\"http://twimg.edgesuite.net/appledaily/images/js/jquery-1.7.2.min.js\"></script><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/iepngfix.js\"></script><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/jquery.ifixpng.js\"></script><link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/js/owlcarousel/owl.carousel.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/js/owlcarousel/carousel-layout.css\">\n<link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/js/owlcarousel/assets/css/animate-custom.css\">\n<script src=\"http://twimg.edgesuite.net/appledaily/images/js/owlcarousel/owl.carousel.fix.js\"></script><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/appledaily-detectmobilebrowser.js\"></script><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/jquery.cookie.min.js\"></script><script type=\"text/javascript\" language=\"JavaScript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/gpt.js\"></script><script>\r\n        googletag.cmd.push(function() {\r\n              var mappingHeadBanner = googletag.sizeMapping().addSize([0, 0], [ [970,90],[728,90],[970,160], [970,250] ]).build();\r\n              var mappingMiniLREC = googletag.sizeMapping().addSize([0, 0], [ [300,50], [300,75], [300,100] , [300,150] ]).build();\r\n              var mappingLREC = googletag.sizeMapping().addSize([0, 0], [ [300,250], [300,600] ]).build();\r\n              var mappingSkyscraper = googletag.sizeMapping().addSize([0, 0], [ [150,660], [160,600], [120,600] ]).build();\r\n              var mappingBottomBanner = googletag.sizeMapping().addSize([0, 0], [ [1,1], [970,250], [970,90], [728,90], [970,160] ]).build();\r\n              HeadBanner = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/HeadBanner', 'HeadBanner', 'leaderboard', GeoDFP).defineSizeMapping(mappingHeadBanner).setCollapseEmptyDiv(true);\r\n              LREC1 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/LREC1', '300x600', 'rectangleAD1', GeoDFP).defineSizeMapping(mappingLREC).setCollapseEmptyDiv(true);\r\n              LREC2 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/LREC2', '300x600', 'rectangleAD2', GeoDFP).defineSizeMapping(mappingLREC).setCollapseEmptyDiv(true);\r\n              MiniLREC1 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/Mini_LREC1', '300x50', 'MiniLREC1', GeoDFP).defineSizeMapping(mappingMiniLREC).setCollapseEmptyDiv(true);\r\n              MiniLREC2 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/Mini_LREC2', '300x50', 'MiniLREC2', GeoDFP).defineSizeMapping(mappingMiniLREC).setCollapseEmptyDiv(true);\r\n              MiniLREC3 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/Mini_LREC3', '300x50', 'MiniLREC3', GeoDFP).defineSizeMapping(mappingMiniLREC).setCollapseEmptyDiv(true);\r\n              MiniLREC4 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/Mini_LREC4', '300x50', 'MiniLREC4', GeoDFP).defineSizeMapping(mappingMiniLREC).setCollapseEmptyDiv(true);\r\n              halfpage = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/halfpage', '300x600', 'halfpage', GeoDFP);\r\n              W1 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/skyscraper1', '150x660', 'door-left', GeoDFP).defineSizeMapping(mappingSkyscraper).setCollapseEmptyDiv(true);\r\n              W2 = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/skyscraper2', '150x660', 'door-right', GeoDFP).defineSizeMapping(mappingSkyscraper).setCollapseEmptyDiv(true);\r\n              BottomBanner = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/BottomBanner', '1x1', 'BottomBanner', GeoDFP).defineSizeMapping(mappingBottomBanner).setCollapseEmptyDiv(true);\r\n              Richmedia  = gpt.createAdSlot('TWAppleDaily/realtimenews_new_index/Richmedia', '1x1', 'Richmedia', GeoDFP);\r\n              gpt.enableServices();\r\n        })\r\n  </script>\n</head>\n<body id=\"article\" class=\"all\">\r\n    <div class=\"wrapper\">\r\n        <div class=\"sqrezeer\">\r\n            <script>\r\n  var _comscore = _comscore || [];\r\n  _comscore.push({ c1: \"2\", c2: \"8028476\" });\r\n  (function() {\r\n    var s = document.createElement(\"script\"), el = document.getElementsByTagName(\"script\")[0]; s.async = true;\r\n    s.src = (document.location.protocol == \"https:\" ? \"https://sb\" : \"http://b\") + \".scorecardresearch.com/beacon.js\";\r\n    el.parentNode.insertBefore(s, el);\r\n  })();\r\n</script><noscript>\r\n  <img src=\"http://b.scorecardresearch.com/p?c1=2&amp;c2=8028476&amp;cv=2.0&amp;cj=1\">\n</noscript>\r\n\r\n<!-- 1X1 -->\r\n<script type=\"text/javascript\" src=\"http://imp.nextmedia.com/js/nxm_tr_v18.js\"></script><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/1x1/fingerprint.js\"></script><script>\r\nfunction extractDomain(url) {\r\n    var domain;\r\n    //find & remove protocol (http, ftp, etc.) and get domain\r\n    if (url.indexOf(\"://\") > -1) {\r\n        domain = url.split('/')[2];\r\n    }\r\n    else {\r\n        domain = url.split('/')[0];\r\n    }\r\n    //find & remove port number\r\n    domain = domain.split(':')[0];\r\n    return domain;\r\n}\r\nvar ref='';\r\nif(document.referrer.indexOf('appledaily.com.tw') > -1)\r\n{\r\n  ref=document.referrer.replace('http://','').replace('https://','');\r\n}\r\nelse {\r\n  ref=extractDomain(document.referrer);\r\n}\r\n    nxmTrack.nxmAddSeg(\"REGION=TW\");\r\n    nxmTrack.nxmAddSeg(\"PROD=ADAILY\");\r\n    nxmTrack.nxmAddSeg(\"SITE=www.appledaily.com.tw\");\r\n    nxmTrack.nxmAddSeg(\"CH=APPLEDAILY\");\r\n    nxmTrack.nxmAddSeg(\"SECTION=REAL\");\r\n    nxmTrack.nxmAddSeg(\"MENU=即時新聞/最新\");\r\n    nxmTrack.nxmAddSeg(\"TITLE=\");\r\n    nxmTrack.nxmAddSeg(\"SUBSECT=new\");\r\n    nxmTrack.nxmAddSeg(\"SUBSUBSECT=\");\r\n    nxmTrack.nxmAddSeg(\"MEDIA=TEXT\");\r\n    nxmTrack.nxmAddSeg(\"CONTENT=INDEX\");\r\n    nxmTrack.nxmAddSeg(\"ISSUEID=\");\r\n    nxmTrack.nxmAddSeg(\"CID=\");\r\n    nxmTrack.nxmAddSeg(\"CAT=new\");\r\n    nxmTrack.nxmAddSeg(\"NEWS=REALTIME\");\r\n    nxmTrack.nxmAddSeg(\"PLATFORM=WEB\");\r\n    nxmTrack.nxmAddSeg(\"EDM=MOST\");\r\n    nxmTrack.nxmAddSeg(\"AUTH=\");\r\n    nxmTrack.nxmAddSeg(\"KY=\");\r\n    nxmTrack.nxmAddSeg(\"REF=\"+ref);\r\n    nxmTrack.nxmAddSeg(\"SRC=TWAD\");\r\n    nxmTrack.nxmAddSeg(\"ACTION=PAGEVIEW\");\r\n    nxmTrack.nxmAddSeg(\"L=\"+document.gtLang().toUpperCase());\r\n        var ngs_id = nxmTrack.readCookie('ngs_id');\r\n    if (ngs_id == null) ngs_id = '';\r\n    nxmTrack.nxmAddSeg('NGSID=' + ngs_id);\r\n\r\n    $(document).ready(function() {\r\n        nxmTrack.nxmSendPageDepth(0, new Date().getTime());\r\n\r\n        //Scroll up/down tracking depth\r\n        var trackRecords = [];\r\n        $(window).scroll(function() {\r\n            var scrollPercent = getPageScrollPercent();\r\n            if (scrollPercent >= 25 && trackRecords.indexOf(\"25\") == -1) {\r\n                trackRecords.push(\"25\");\r\n                nxmTrack.nxmSendPageDepth(25, new Date().getTime());\r\n            } else if (scrollPercent >= 50 && trackRecords.indexOf(\"50\") == -1) {\r\n                trackRecords.push(\"50\");\r\n                nxmTrack.nxmSendPageDepth(50, new Date().getTime());\r\n            } else if (scrollPercent >= 75 && trackRecords.indexOf(\"75\") == -1) {\r\n                trackRecords.push(\"75\");\r\n                nxmTrack.nxmSendPageDepth(75, new Date().getTime());\r\n            } else if (scrollPercent == 100 && trackRecords.indexOf(\"100\") == -1) {\r\n                trackRecords.push(\"100\");\r\n                nxmTrack.nxmSendPageDepth(100, new Date().getTime());\r\n            }\r\n        });\r\n        function getPageScrollPercent() {\r\n            var bottom = $(window).height() + $(window).scrollTop();\r\n            var height = $(document).height();\r\n            return Math.round(100 * bottom / height);\r\n        }\r\n    });\r\n\r\n</script><style>\r\n    #door {position:relative; width:970px; margin-top:45px;}\r\n    #door-left{position:absolute;right: 975px;}\r\n    #door-right{position:absolute;left: 975px;}\r\n    #ypv {float:right;margin:-81px 135px 0px 0px;}\r\n    #ypv a {color:#055b94}\r\n    .nypv {background: url('http://twimg.edgesuite.net/appledaily/images/core/iconset.png') 0px -41px no-repeat;display: inline-block;color: #055b94;width:14px;height:12px;}\r\n    #corpnav a {padding: 0 6px 0 6px;}\r\n    a.mc {left:843px;}\r\n    #corpgs a {top: 9px;}\r\n    .nxlik .nh {left: 805px;top: 18px;}\r\n    #corpgs .fund {background-image:url('http://twimg.edgesuite.net/appledaily/images/core/foundation_top.png');width:65px;height:14px;margin-left:712px;margin-top:18px;}\r\n    #worldwide {top: 26px;right: 0px;}\r\n    .translate {    position: absolute;top: 10px;right: 270px;}\r\n    .translate.twn {display:none}\r\n</style>\n<header id=\"globehead\"><div class=\"sqzer\">\r\n        <hgroup><h2 class=\"nlogo\"><a href=\"http://www.nextdigital.com.hk/investor/\" class=\"nextmedia overcooked\">This is a part of NextMedia</a></h2>\r\n          <h1 class=\"rlogo\"><a href=\"/realtimenews\" class=\"overcooked\">蘋果日報 | APPLE DAILY</a></h1>\r\n          <!--locate start-->\r\n            <style>\r\n            .locate {width: 122px;position:absolute;top: 10px;left: 455px;}\r\n            .locate a {color:black;display:block;position:absolute;top:5px;left: 30px;font-size: 13px;z-index:1}\r\n            .locate select {opacity:0;position:absolute;width: 90px;top:5px;left: 25px;z-index:1}\r\n            .locate:after {content:url(http://twimg.edgesuite.net/appledaily/images/pclicon.png);width:115px;height:22px;position:absolute;top:0px;    border-left: 1px solid #d5d5d5;border-top: 1px solid #9b9b9b;border-bottom: 1px solid #e8e8e8;border-right: 1px solid #d5d5d5;}\r\n            </style>\n<div class=\"locate\" id=\"USlocate\" style=\"display:none\">\r\n            <a href=\"\">切換地區</a>\r\n            <form>\r\n                <select data-role=\"none\" id=\"select-category\" onchange=\"chgUSCat(this.value)\"><option value=\"0\">切換地區</option>\n<option value=\"ny\">紐約</option>\n<option value=\"la\">洛杉磯</option>\n<option value=\"sf\">舊金山</option>\n<option value=\"us\">其他美國地區</option></select>\n</form>\r\n            </div>\r\n         <!--locate end-->\r\n        </hgroup><nav id=\"corpnav\"><a href=\"/\" class=\"opacity \" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/menu_AppleDaily.png\" alt=\" 蘋果日報\"></a>\r\n          <a href=\"/actionnews\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/menu_AnimatedNews.png\" alt=\" 動新聞\"></a>\r\n          <a href=\"http://www.applelive.com.tw/livechannel/\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/applelive.gif\" alt=\" 蘋果Live\"></a>\r\n          <a href=\"http://applevr.appledaily.com.tw/\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/VRlogo87x40.png\" alt=\" 蘋果VR\" width=\"83\" height=\"30\"></a>\r\n          <a href=\"http://sharpdaily.tw/\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/menu_SharpDaily.png\" alt=\"爽報\"></a>\r\n          <a href=\"http://www.nextmag.com.tw\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/menu_NextMag.png\" alt=\"壹週刊\"></a>\r\n          <a href=\"http://www.tomonews.com/\" class=\"opacity\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/tomonews_blue.png\" alt=\"Tomonews\" style=\"margin-top:9px\"></a>\r\n          <a href=\"/teded\" target=\"_blank\" style=\"opacity: 0.5;\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ted.png\" alt=\"Ted\"></a>\r\n          <a href=\"http://fami.tw/pc\" class=\"opacity last\" target=\"_blank\" style=\"opacity: 0.5;\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/01_PC_Fami_v1.png\" alt=\"fami\"></a>\r\n        </nav><!--language start--><div class=\"translate\" id=\"googletranslate\" style=\"display:none\">\r\n            <div id=\"google_translate_element\"></div>\r\n            <script type=\"text/javascript\">\r\n            function googleTranslateElementInit() {\r\n              new google.translate.TranslateElement({pageLanguage: 'zh-TW', includedLanguages: 'zh-CN,zh-TW', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');\r\n            }\r\n            </script><script type=\"text/javascript\" src=\"//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit\"></script>\n</div>\r\n        <!--language end-->\r\n                <section id=\"worldwide\"><a href=\"http://www.twnextdigital.com/\" class=\"tw on\">台灣<U+00A0></a>\r\n            <a href=\"http://www.nextdigital.com.hk/\" class=\"hk\">香港<U+00A0></a>\r\n        </section><section id=\"ypv\"><a href=\"http://www.nextdigital.com.hk/investor/\" target=\"_blank\"><span class=\"nypv\"></span><span>昨日瀏覽量<U+00A0>:<U+00A0></span><span id=\"pv\">18798560</span></a>\r\n        </section><div style=\"clear:both\"></div>\r\n        <section id=\"corpgs\"><a href=\"/ethics/index.html\" class=\"mc\" target=\"_blank\">蘋果日報自律委員會</a>\r\n            <a class=\"fund\" href=\"/charity\" target=\"_blank\"></a>\r\n            <a href=\"http://www.nextdigital.com.hk/investor/\" class=\"nxlik\" target=\"_blank\"><span class=\"nh overcooked\">Nextmedia</span></a>\r\n        </section><section id=\"door\"><div id=\"door-left\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('door-left');})</script></div>\r\n                <div id=\"door-right\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('door-right');})</script></div>\r\n            </section>\n</div>\r\n</header><style>\r\n    .navlv2 {width: 80.8px;border-top:1px solid #797979;}\r\n    .rsearch {width: 241.8px;border-right:0px;border-top:1px solid #797979;}\r\n    #newnav .boomed a,#newnav .boom a:hover {background-color:#EC7F27;color: #FFFFFF;}\r\n    #newnav .new a:hover,#newnav .newed a {background:#D50404}\r\n    .rsbox {width:205px;}\r\n    #newnav .usa a:hover,#newnav .usaed a {background-color: #ff0f0f;}\r\n    #newnav .usacity a:hover,#newnav .usacityed a {background-color: #2113bf;}\r\n    .usacity,.usacityed,.usa,.usaed {display:none}\r\n    #newnav .show {display:block;}\r\n    li.usacityed.show ~ li.usa.show ~ li.rsearch {width:79.8px}\r\n    li.usacityed.show ~ li.usa.show ~ li.rsearch .rsbox {width:43px}\r\n    li.usacity.show ~ li.usaed.show ~ li.rsearch {width:79.8px}\r\n    li.usacity.show ~ li.usaed.show ~ li.rsearch .rsbox {width:43px}\r\n    li.usacity ~ li.usaed.show ~ li.rsearch {width:160.8px}\r\n    li.usacity ~ li.usaed.show ~ li.rsearch .rsbox {width:124px}\r\n    li.usacity ~ li.usa.show ~ li.rsearch {width:160.8px}\r\n    li.usacity ~ li.usa.show ~ li.rsearch .rsbox {width:124px}\r\n    li.usacity.show ~ li.usa.show ~ li.rsearch {width:79.8px}\r\n    li.usacity.show ~ li.usa.show ~ li.rsearch .rsbox {width:43px}\r\n    .rtddt time font font {margin-right: -20px;}\r\n    .rtddt.sp_ad font font {margin-right: 0px;}\r\n    .rtddt h2 font {margin-right: 0px;display: inline-block;padding-bottom: 1px;}\r\n    .rtddt h1 font {display: inline-block;margin-right:0px;}\r\n</style>\n<nav id=\"realnav\"><div id=\"newnav\">\r\n        <ul>\n<li id=\"ny\" class=\"usacity navlv2\"><a title=\"紐約\" href=\"/realtimenews/section/ny/\">紐約</a></li>\r\n            <li id=\"sf\" class=\"usacity navlv2\"><a title=\"舊金山\" href=\"/realtimenews/section/sf/\">舊金山</a></li>\r\n            <li id=\"la\" class=\"usacity navlv2\"><a title=\"洛杉磯\" href=\"/realtimenews/section/la/\">洛杉磯</a></li>\r\n            <li id=\"us\" class=\"usa navlv2\"><a title=\"美國\" href=\"/realtimenews/section/us/\">美國</a></li>\r\n            <li class=\"newed navlv2\"><a title=\"最新\" href=\"/realtimenews/section/new/\">最新</a></li>\r\n            <li class=\"recommend navlv2\"><a title=\"焦點\" href=\"/realtimenews/section/recommend/\">焦點</a></li>\r\n            <li class=\"hot navlv2\"><a title=\"熱門\" href=\"/realtimenews/section/hot/\">熱門</a></li>\r\n            <li class=\"boom navlv2\"><a title=\"爆社\" href=\"http://www.appledaily.com.tw/complainevent\" target=\"_blank\">爆社</a></li>\r\n            <li class=\"zoo navlv2\"><a title=\"動物\" href=\"/realtimenews/section/animal/\">動物</a></li>\r\n            <li class=\"rsea navlv2\"><a title=\"副刊\" href=\"/realtimenews/section/strange/\">副刊</a></li>\r\n            <li class=\"ccc navlv2\"><a title=\"3C\" href=\"/realtimenews/section/3c/\">3C</a></li>\r\n            <li class=\"video navlv2\"><a title=\"影片\" href=\"/realtimenews/section/video/\">影片</a></li>\r\n            <li class=\"hotg navlv2\"><a title=\"火線\" href=\"http://www.appledaily.com.tw/column/index\">火線</a></li>\r\n            <li class=\"sport navlv2\"><a title=\"體育\" href=\"/realtimenews/section/sports/\">體育</a></li>\r\n            <li class=\"fun navlv2\"><a title=\"壹週刊\" href=\"/realtimenews/section/nextmag/\">壹週刊</a></li>\r\n            <li class=\"forum navlv2\"><a title=\"媒陣\" href=\"/realtimenews/forum/istyle/new/#collaboration\">媒陣</a></li>\r\n            <li class=\"enter navlv2\"><a title=\"娛樂\" href=\"/realtimenews/section/entertainment/\">娛樂</a></li>\r\n            <li class=\"fashion navlv2\"><a title=\"時尚\" href=\"/realtimenews/section/fashion/\">時尚</a></li>\r\n            <li class=\"life navlv2\"><a title=\"生活\" href=\"/realtimenews/section/life/\">生活</a></li>\r\n            <li class=\"soci navlv2\"><a title=\"社會\" href=\"/realtimenews/section/local/\">社會</a></li>\r\n            <li class=\"inter navlv2\"><a title=\"國際\" href=\"/realtimenews/section/international/\">國際</a></li>\r\n            <li class=\"business navlv2\"><a title=\"財經\" href=\"/realtimenews/section/finance/\">財經</a></li>\r\n            <li class=\"house navlv2\"><a title=\"地產\" href=\"/realtimenews/section/property/\">地產</a></li>\r\n            <li class=\"polit navlv2\"><a title=\"政治\" href=\"/realtimenews/section/politics/\">政治</a></li>\r\n            <li class=\"blog navlv2\"><a title=\"論壇\" href=\"/realtimenews/section/forum/\">論壇</a></li>\r\n            <li class=\"rsearch\">\r\n                <form name=\"searchform\" id=\"searchform\" action=\"http://search.appledaily.com.tw/appledaily/search\" method=\"POST\">\r\n                  <input type=\"hidden\" name=\"searchType\" value=\"text\"><input type=\"hidden\" name=\"searchMode\" value=\"Sim\"><input type=\"text\" name=\"querystrS\" id=\"search\" class=\"rsbox\"><input type=\"submit\" value=\"\" class=\"rsbtn\">\n</form>\r\n            </li>\r\n            <div style=\"clear:both\"></div>\r\n        </ul>\n</div>\r\n</nav><script>\r\n    if (GeoDFP['CC'] == 'US') {\r\n        switch(GeoDFP['D']) {\r\n            case '803' :\r\n                $('#la').addClass(\"show\");\r\n                break;\r\n            case '807' :\r\n                $('#sf').addClass(\"show\");\r\n                break;\r\n            case '501' :\r\n                $('#ny').addClass(\"show\");\r\n                break;\r\n        }\r\n        $('#us').addClass(\"show\");\r\n        $('#USlocate').show();\r\n        $('#googletranslate').show();\r\n    }\r\n    function chgUSCat(strzone){\r\n          if (strzone!='0') {\r\n              var GeoUSDFP = {};\r\n              GeoJson = JSON.parse($.cookie('GeoDFP'));\r\n              if(GeoJson){\r\n                GeoUSDFP['CC'] = GeoJson['DFP']['CC'];\r\n                GeoUSDFP['S'] = GeoJson['DFP']['S'];\r\n                switch(strzone) {\r\n                    case 'la' :\r\n                        GeoUSDFP['D'] = '803';\r\n                        break;\r\n                    case 'sf' :\r\n                        GeoUSDFP['D'] = '807';\r\n                        break;\r\n                    case 'ny' :\r\n                        GeoUSDFP['D'] = '501';\r\n                        break;\r\n                }\r\n\r\n                $.cookie('GeoDFP', JSON.stringify({\"DFP\":GeoUSDFP}),{expires: 7, path: '/' });\r\n                location.href = \"/realtimenews/section/\"+strzone;\r\n              }\r\n          }\r\n    }\r\n</script><div class=\"soil\">\r\n              <section class=\"ads\"><div id=\"leaderboard\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('leaderboard');})</script></div>\r\n                  <div id=\"Richmedia\" style=\"height:0px\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('Richmedia');})</script></div>\r\n              </section><article id=\"maincontent\" class=\"vertebrae\"><style>#hotnewsbox{ background:url(\"http://twimg.edgesuite.net/appledaily/images/yellow_news.gif\") no-repeat; height:36px; padding:14px 0 0 134px}</style>\n<script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/appledaily/images/js/jquery.textslider.min.js\"></script><style>\r\n                        .slideText { position: relative; overflow: hidden; height: 32px; }\r\n                        .slideText ul, .slideText li {margin: 0;padding: 0;list-style: none;}\r\n                        .slideText ul {position: absolute;}\r\n                        .slideText li a {font-size:20px;color:#000000;display: block;overflow: hidden;height: 30px;line-height: 25px;text-decoration: none;}\r\n                        .slideText li a:hover {text-decoration: underline;}\r\n                        #hotnewsbox2 {background: url(\"http://twimg.edgesuite.net/appledaily/images/red_recommend.gif\") no-repeat;height: 36px;padding: 14px 0 0 195px;}\r\n                    </style>\n<script type=\"text/javascript\">\r\n                      $(document).ready(function(){\r\n                          $('.slideText').textslider({\r\n                              direction : 'scrollUp',\r\n                              scrollNum : 1,\r\n                              scrollSpeed : 800,\r\n                              pause : 3200\r\n                          });\r\n                      });\r\n                    </script><div id=\"hotnewsbox\">\r\n                        <div class=\"slideText\">\r\n                            <ul>\n<li><a href=\"/realtimenews/article/life/20170702/1152761/\">長庚急診風暴 主委李石增發信道別、證實下台</a></li>\n<li><a href=\"/realtimenews/article/sports/20170702/1152706/\">台北羽球公開賽 周天成2比1逆轉勝封王</a></li>                            </ul>\n</div>\r\n                    </div>\r\n                  \r\n                  <div class=\"thoracis\">\r\n                    <style>\r\n                          /* firewire */\r\n                          .firewire-container {width: 650px; height: 100px; overflow: hidden; margin-bottom: 10px;}\r\n                          #firewire .item {width: 650px;  height: 100px;  background: #dddddd url(http://twimg.edgesuite.net/appledaily/images/js/owlcarousel/ajax-loader.gif) center center no-repeat;}\r\n                          #firewire .item a {width: 100%; height: 100%;  display: block;}\r\n                          #firewire .item img {display: block; border: none;}\r\n                          /* override */\r\n                          #splash { margin-bottom: 10px;}\r\n                        .hotkeynews {background-color:#e0e0e0}\r\n                        .hotkeynews time {color:#ff534f}\r\n                        .hotkeynews li {background-color:white;margin-bottom:2px;}\r\n                        .topheaddr {background:#cc0000;height:40px;position:relative;margin-top:-15px}\r\n                        .topheadrr {width:134px;height:40px;background:#ff1a14;float:left;}\r\n                        .topheadrr h1 {display:block;font-size:16px;color:white;padding:12px 0px 0px 19px;}\r\n                        .topheaddr time {float:right;color:white;padding:13px 19px 0px 0px;}\r\n                        .botlinerr {background:#cc0000;height:5px}\r\n                        .botlinedr {width:134px;height:5px;background:#ff1a14}\r\n                        .dddd {margin: 0.65em 0 0.65em;}\r\n                    </style>\n<section id=\"splash\"><div id=\"carousel\">\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152636/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/bcf543737de09b8037136793452c1708.jpg\" alt=\"【有片】魏如萱、魏如昀父親公祭 警重兵蒐證防滋事\" tcode=\"【有片】魏如萱、魏如昀父親公祭 警重兵蒐證防滋事\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/animal/20170702/1152713/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/536fa336d643709444577887ca988eb2.jpg\" alt=\"【獨家直擊】台灣黑熊波比逃離獸欄 中麻醉槍就逮\" tcode=\"【獨家直擊】台灣黑熊波比逃離獸欄 中麻醉槍就逮\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152530\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/e36cb265f53fd0fa2d0e2c43ae38a73c.jpg\" alt=\"撿屍爛醉女奪初夜 狼經理躲4年仍遭逮\" tcode=\"撿屍爛醉女奪初夜 狼經理躲4年仍遭逮\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/international/20170702/1152722/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/9e1109119d45a7b4f1581dace65dc7ee.jpg\" alt=\"「比賽前跟男人上床」 格鬥美女揭訓練秘技\" tcode=\"「比賽前跟男人上床」 格鬥美女揭訓練秘技\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152352/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/1a544816074e0815fdb9d7a80bfc0e21.jpg\" alt=\"【不要學】夜闖動物園po網炫耀 饒舌歌手GG惹 \" tcode=\"【不要學】夜闖動物園po網炫耀 饒舌歌手GG惹 \"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152624/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/56797fd67c61ceafef7be8423a0a8df9.jpg\" alt=\"【勵志片】讀書翻轉人生 蓮藕茶少女考上清大\" tcode=\"【勵志片】讀書翻轉人生 蓮藕茶少女考上清大\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152623\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/8657548f6889083c7e924c1dd97bf8b6.jpg\" alt=\"穿熱褲搭捷運不衛生? 1張照片引起網友熱議\" tcode=\"穿熱褲搭捷運不衛生? 1張照片引起網友熱議\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152682/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/891d095b1cb4285511ce4a74b5574a99.jpg\" alt=\"台北羽球公開賽 陳宏麟/王齊麟直落2男雙鍍金\" tcode=\"台北羽球公開賽 陳宏麟/王齊麟直落2男雙鍍金\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1148254/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/b81fd1722712021fcd465cc23051d8a1.jpg\" alt=\"台客吃完便當這樣做 讓20年駕駛驚「奇蹟!」\" tcode=\"台客吃完便當這樣做 讓20年駕駛驚「奇蹟!」\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152520\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/9352900711df9445bc936f58969f300b.jpg\" alt=\"【有片慎入】喇舌國中妹PO網 鄧佳華今早到警局說明\" tcode=\"【有片慎入】喇舌國中妹PO網 鄧佳華今早到警局說明\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152644/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/c976329dcc7a7495dd98bcbd3e9ec394.jpg\" alt=\"大學指考第2天 試題與參考答案全文看這裡\" tcode=\"大學指考第2天 試題與參考答案全文看這裡\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/nextmag/20170702/1150284/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/29e7adabe3c7fede2d2368da10cc5930.jpg\" alt=\"【壹週刊】老婆「偷吃」有什麼徵兆 讓他告訴你\" tcode=\"【壹週刊】老婆「偷吃」有什麼徵兆 讓他告訴你\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/recommend/20170702/1150973\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/2eafc40f1ba52faa62cf852a1dee92f0.jpg\" alt=\"【金讚片】一支手機為國爭光 極地攝影奪國際金獎\" tcode=\"【金讚片】一支手機為國爭光 極地攝影奪國際金獎\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152211/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/5881cb0321647d6ff51fa13e1b1d1d01.jpg\" alt=\"【獨家】摟400億大亨熱舞被作廢 辣模挑郎打槍蒟蒻男\" tcode=\"【獨家】摟400億大亨熱舞被作廢 辣模挑郎打槍蒟蒻男\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152638/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/67a7e4c6677e5c53e1c12a501ee9b4ed.jpg\" alt=\"午後大雷雨報到 北北基19縣市發布大雨特報\" tcode=\"午後大雷雨報到 北北基19縣市發布大雨特報\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152489/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/0b16bac0cb613db9621aa08942ae094a.jpg\" alt=\"柯P今參加雙城論壇 暢談兩岸關係將簽備忘錄\" tcode=\"柯P今參加雙城論壇 暢談兩岸關係將簽備忘錄\"></a>\r\n                                </div>\r\n                                                            <div class=\"item\">\r\n                                    <a href=\"/realtimenews/article/animal/20170702/1151629/\" target=\"_blank\">\r\n                                      <img class=\"owl-lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"http://twimg.edgesuite.net/images/thumbnail/other/0bbcb61c502bd56701cdd4f535ffa8d5.jpg\" alt=\"【躲貓貓片】貓咪躲櫃過程 令網友議論紛紛\" tcode=\"【躲貓貓片】貓咪躲櫃過程 令網友議論紛紛\"></a>\r\n                                </div>\r\n                                                    </div>\r\n                        <div class=\"xPrev\">上一則</div>\r\n                        <div class=\"xNext\">下一則</div>\r\n                    </section><!--十月圍城--><script type=\"text/javascript\" src=\"http://twimg.edgesuite.net/property/js/jquery.carouFredSel-6.2.1.js\"></script><style>\n#october {width:650px;height:200px;overflow:hidden;}\n#october .slidebox {width:650px;height:200px;}\n#october .slidebox .pics {float:left;width:650px;height:183px;overflow:hidden;margin:10px 2px 10px 2px;}\n#october .slidebox .pics img {max-width:650px;height:auto;}\n</style>\n<div style=\"width:100%;margin-top:-10px;\"></div>\n      <div id=\"october\">          \n                    \n      </div>\t\t\t\n<script type=\"text/javascript\">\n$(document).ready(function() {\n    $('#october').carouFredSel({\n        items: 1,\n        direction: \"up\",\n                infinite: true,\n                circular: true,\n        scroll: {\n                    items: 1,\n                    duration: 1250,\n                    timeoutDuration: 2500,\n                    easing: 'swing',\n                    pauseOnHover: 'immediate'   \n                },\n    });\n});\n</script><!--十月圍城--><style>\r\n                        .realword {padding-top:5px;padding-bottom:30px;}\r\n                        .realword .link1 a {color:red;font-size:22px;font-weight:bold;}\r\n                        .realword .link1 {float:left;width:320px;text-align:center;}\r\n                        .rtddd .sp_ad {padding: 0.625em 20px;}\r\n                        .rtddd .sp_ad time {display: inline;font-size: 1em;margin-right: 20px;vertical-align: middle;}\r\n                        .rtddd .sp_ad h2 {background-color:#049000;display: inline;font-size: 1em;margin-right: 20px;vertical-align: middle;}\r\n                        .rtddd .sp_ad h1 {display: inline;}\r\n                        .rtddd .sp_ad h1 a {display: inline;font-size:16px;color:black;padding-left: 0px;}\r\n                        .rtddd .ccc h2 {background-color: #318597; padding:2px 14px;}\r\n                    </style>\n<script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('minibar');})</script><div class=\"abdominis rlby clearmen\">\r\n                        <h1 class=\"dddd\"><time>2017 / 07 / 02</time></h1>\n<ul class=\"rtddd slvl\">\n<li class=\"rtddt sport\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152754/%E3%80%90%E6%9B%B4%E6%96%B0%E3%80%91%E4%B8%AD%E4%BF%A1%E9%A6%96%E5%B1%806%E5%AE%89%E7%8C%9B%E6%94%BB10%E4%BA%BA%E6%AC%A1%E3%80%801%E4%B8%8A%E4%B8%AD%E4%BF%A15:0%E7%B5%B1%E4%B8%80\" target=\"_blank\">\r\n                                        <time>17:26</time><h2>體育</h2>\r\n                                        <h1><font color=\"#383c40\">【更新】中信首局6安猛攻10人次 1上中...(235)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt property even\">\r\n                                    <a href=\"/realtimenews/article/property/20170702/1152703/%E6%9F%B4%E6%99%BA%E5%B1%8F%E8%88%87%E7%94%B7%E5%8F%8B%E6%84%9B%E5%B7%A2%E6%96%B0%E7%AF%89%E3%80%802.8%E5%84%84%E3%80%8C%E7%90%A2%E8%B3%A6%E3%80%8D%E6%9B%9D%E5%85%89\" target=\"_blank\">\r\n                                        <time>17:25</time><h2>地產</h2>\r\n                                        <h1><font color=\"#383c40\">柴智屏與男友愛巢新築 2.8億「琢賦」曝...(0)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life hsv\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152489/%E3%80%90%E4%B8%8D%E6%96%B7%E6%9B%B4%E6%96%B0%E3%80%91%E6%9F%AF%EF%BC%B0%E4%BB%8A%E5%8F%83%E5%8A%A0%E9%9B%99%E5%9F%8E%E8%AB%96%E5%A3%87%E3%80%80%E6%9A%A2%E8%AB%87%E5%85%A9%E5%B2%B8%E9%97%9C%E4%BF%82%E5%B0%87%E7%B0%BD%E5%82%99%E5%BF%98%E9%8C%84\" target=\"_blank\">\r\n                                        <time>17:19</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">【不斷更新】柯P今參加雙城論壇 暢談兩岸...(18709)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life even\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152761/%E9%95%B7%E5%BA%9A%E6%80%A5%E8%A8%BA%E9%A2%A8%E6%9A%B4%E3%80%80%E4%B8%BB%E5%A7%94%E6%9D%8E%E7%9F%B3%E5%A2%9E%E7%99%BC%E4%BF%A1%E9%81%93%E5%88%A5%E3%80%81%E8%AD%89%E5%AF%A6%E4%B8%8B%E5%8F%B0\" target=\"_blank\">\r\n                                        <time>17:19</time><h2>生活</h2>\r\n                                        <h1><font color=\"#383c40\">長庚急診風暴 主委李石增發信道別、證實下...(0)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt enter\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152661/%E8%BF%B7%E4%BF%A1%E6%B0%A3%E5%8A%9F%E7%99%82%E6%B3%95%E6%83%B9%E7%A6%8D%E3%80%80%E6%B5%B7%E8%80%81%E8%97%8F%E9%81%AD%E6%8C%87%E5%AE%B3%E7%99%8C%E5%A6%BB%E9%80%81%E5%91%BD\" target=\"_blank\">\r\n                                        <time>17:17</time><h2>娛樂</h2>\r\n                                        <h1><font color=\"#ff0000\">迷信氣功療法惹禍 海老藏遭指害癌妻送命(28)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt blog even\">\r\n                                    <a href=\"/realtimenews/article/forum/20170702/1152688/%E7%BF%92%E8%A8%AA%E6%B8%AF%E9%96%B1%E5%85%B5%E6%8C%AB%E9%A6%99%E6%B1%9F\" target=\"_blank\">\r\n                                        <time>17:14</time><h2>論壇</h2>\r\n                                        <h1><font color=\"#383c40\">習訪港閱兵挫香江(59)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt enter\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152730/%E7%B2%89%E7%B5%B2%E7%9B%AE%E6%93%8A%E3%80%8C%E9%9B%99%E5%AE%8B%E3%80%8D%E5%B3%87%E9%87%8C%E5%B3%B6%E6%90%AD%E5%90%8C%E8%BB%8A%E3%80%80%E5%AE%8B%E6%85%A7%E5%96%AC%EF%BC%9A%E6%B2%92%E6%9C%89%E5%9B%9E%E6%87%89%E5%83%B9%E5%80%BC\" target=\"_blank\">\r\n                                        <time>17:14</time><h2>娛樂</h2>\r\n                                        <h1><font color=\"#ff0000\">粉絲目擊「雙宋」峇里島搭同車 宋慧喬:沒...(116)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt polit even hsv\">\r\n                                    <a href=\"/realtimenews/article/politics/20170702/1152680/%E5%85%8D%E7%B0%BD%E5%9C%8B167%E5%80%8B%E5%8B%9D%E4%B8%AD%E5%9C%8B%E3%80%80%E9%A6%AC%E8%8B%B1%E4%B9%9D%E6%AD%B8%E5%8A%9F%E5%8F%B0%E4%BA%BA%E8%A1%8C%E5%96%84\" target=\"_blank\">\r\n                                        <time>17:11</time><h2>政治</h2>\r\n                                        <h1><font color=\"#ff0000\">免簽國167個勝中國 馬英九歸功台人行善(2354)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt enter\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152718/%E5%BF%8D%E7%97%9B%E9%80%81%E5%88%A5%E6%A5%B5%E9%81%93%E4%BA%A1%E7%88%B6%E3%80%80%E9%AD%8F%E5%A6%82%E8%90%B1%E5%A7%8A%E5%A6%B9%E6%B4%8B%E8%94%A5%E6%96%87%E6%88%B3%E6%B7%9A%E9%BB%9E\" target=\"_blank\">\r\n                                        <time>17:11</time><h2>娛樂</h2>\r\n                                        <h1><font color=\"#ff0000\">忍痛送別極道亡父 魏如萱姊妹洋蔥文戳淚點(161)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt animal even hsv\">\r\n                                    <a href=\"/realtimenews/article/animal/20170702/1152713/%E3%80%90%E7%8D%A8%E5%AE%B6%E7%9B%B4%E6%93%8A%E3%80%91%E5%8F%B0%E7%81%A3%E9%BB%91%E7%86%8A%E6%B3%A2%E6%AF%94%E9%80%83%E9%9B%A2%E7%8D%B8%E6%AC%84%E3%80%80%E4%B8%AD%E9%BA%BB%E9%86%89%E6%A7%8D%E5%B0%B1%E9%80%AE\" target=\"_blank\">\r\n                                        <time>17:10</time><h2>動物</h2>\r\n                                        <h1><font color=\"#ff0000\">【獨家直擊】台灣黑熊波比逃離獸欄 中麻醉...(5348)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152752/%E9%81%8E%E5%BA%A6%E6%BB%91%E6%89%8B%E6%A9%9F%E5%B0%8E%E8%87%B4%E6%89%8B%E7%97%9B%E3%80%80%E3%80%8C%E9%80%993%E6%8B%9B%E3%80%8D%E6%9C%89%E6%95%88%E6%94%B9%E5%96%84\" target=\"_blank\">\r\n                                        <time>17:08</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\"> 過度滑手機導致手痛 「這3招」有效改善(82)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life even\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152757/%E3%80%90%E9%9B%99%E5%9F%8E%E8%AB%96%E5%A3%87%E3%80%91%E9%80%81%E7%81%AB%E7%82%AC%E5%85%89%E9%9B%95%E6%93%BA%E9%A3%BE%E7%87%88%E8%A2%AB%E5%AB%8C%E5%AF%92%E9%85%B8%E3%80%80%E6%9F%AF%EF%BC%B0%E9%80%99%E6%A8%A3%E5%9B%9E\" target=\"_blank\">\r\n                                        <time>17:07</time><h2>生活</h2>\r\n                                        <h1><font color=\"#383c40\">【雙城論壇】送火炬光雕擺飾燈被嫌寒酸 柯...(3)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt inter\">\r\n                                    <a href=\"/realtimenews/article/international/20170702/1152753/%E6%98%9F%E5%9C%8B%E7%B8%BD%E7%90%86%E5%AE%B6%E5%8B%99%E4%BA%8B%E6%9C%AA%E5%B9%B3%E3%80%80%E5%BC%9F%E6%96%A5%E6%9D%8E%E9%A1%AF%E9%BE%8D%E6%BF%AB%E6%AC%8A\" target=\"_blank\">\r\n                                        <time>17:05</time><h2>國際</h2>\r\n                                        <h1><font color=\"#383c40\">星國總理家務事未平 弟斥李顯龍濫權(15)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt enter even hsv\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152628/%E8%98%87%E6%89%93%E7%B6%A0%E9%98%BF%E9%BE%94%E4%BC%91%E5%9C%98%E6%94%BE%E9%A2%A8%E3%80%80%E7%82%BA%E5%B8%A5%E5%93%A5%E9%8B%BC%E7%90%B4%E5%AE%B6%E8%B7%A8%E5%88%80%E5%90%88%E5%A5%8F\" target=\"_blank\">\r\n                                        <time>16:59</time><h2>娛樂</h2>\r\n                                        <h1><font color=\"#383c40\">蘇打綠阿龔休團放風 為帥哥鋼琴家跨刀合奏(187)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt local hsv\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152636/%E3%80%90%E6%9C%89%E7%89%87%E3%80%91%E9%AD%8F%E5%A6%82%E8%90%B1%E3%80%81%E9%AD%8F%E5%A6%82%E6%98%80%E7%88%B6%E8%A6%AA%E5%85%AC%E7%A5%AD%E3%80%80%E8%AD%A6%E9%87%8D%E5%85%B5%E8%92%90%E8%AD%89%E9%98%B2%E6%BB%8B%E4%BA%8B\" target=\"_blank\">\r\n                                        <time>16:59</time><h2>社會</h2>\r\n                                        <h1><font color=\"#ff0000\">【有片】魏如萱、魏如昀父親公祭 警重兵蒐...(63801)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life even\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152755/%E3%80%90%E9%9B%99%E5%9F%8E%E8%AB%96%E5%A3%87%E3%80%91%E7%9C%8B%E5%85%A9%E5%B8%82%E8%A1%97%E8%88%9E%E8%A1%A8%E6%BC%94%E3%80%80%E6%9F%AF%EF%BC%B0%EF%BC%9A%E4%B8%8A%E6%B5%B7%E8%88%9E%E8%B9%88%E5%9F%BA%E7%A4%8E%E5%A5%BD%E3%80%81%E5%8F%B0%E7%81%A3%E8%BC%83%E6%B4%BB%E6%BD%91\" target=\"_blank\">\r\n                                        <time>16:59</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">【雙城論壇】看兩市街舞表演 柯P:上海舞...(63)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt sport hsv\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152706/%E5%8F%B0%E5%8C%97%E7%BE%BD%E7%90%83%E5%85%AC%E9%96%8B%E8%B3%BD%E3%80%80%E5%91%A8%E5%A4%A9%E6%88%902%E6%AF%941%E9%80%86%E8%BD%89%E5%8B%9D%E5%B0%81%E7%8E%8B\" target=\"_blank\">\r\n                                        <time>16:58</time><h2>體育</h2>\r\n                                        <h1><font color=\"#ff0000\">台北羽球公開賽 周天成2比1逆轉勝封王(4095)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life even\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152748/%E3%80%90%E9%9B%99%E5%9F%8E%E8%AB%96%E5%A3%87%E3%80%91%E7%B8%BD%E7%B5%B1%E5%BA%9C%E7%A8%B1%E6%9F%AF%E5%85%A9%E5%B2%B8%E4%BA%A4%E6%B5%81%E3%80%80%E6%87%89%E8%A1%A8%E9%81%94%E5%9C%8B%E5%85%A7%E6%B0%91%E6%84%8F\" target=\"_blank\">\r\n                                        <time>16:54</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">【雙城論壇】總統府稱柯兩岸交流 應表達國...(231)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life hsv\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152624/%E3%80%90%E5%8B%B5%E5%BF%97%E7%89%87%E3%80%91%E8%AE%80%E6%9B%B8%E7%BF%BB%E8%BD%89%E4%BA%BA%E7%94%9F%E3%80%80%E8%93%AE%E8%97%95%E8%8C%B6%E5%B0%91%E5%A5%B3%E8%80%83%E4%B8%8A%E6%B8%85%E5%A4%A7\" target=\"_blank\">\r\n                                        <time>16:52</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">【勵志片】讀書翻轉人生 蓮藕茶少女考上清...(7882)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt local even hsv\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1150973/%E3%80%90%E9%87%91%E8%AE%9A%E7%89%87%E3%80%91%E4%B8%80%E6%94%AF%E6%89%8B%E6%A9%9F%E7%82%BA%E5%9C%8B%E7%88%AD%E5%85%89%E3%80%80%E6%A5%B5%E5%9C%B0%E6%94%9D%E5%BD%B1%E5%A5%AA%E5%9C%8B%E9%9A%9B%E9%87%91%E7%8D%8E\" target=\"_blank\">\r\n                                        <time>16:50</time><h2>社會</h2>\r\n                                        <h1><font color=\"#ff0000\">【金讚片】一支手機為國爭光 極地攝影奪國...(33765)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt local hsv\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152629/%E4%B8%8A%E7%8F%AD%E6%97%8F%E8%A2%AB%E7%95%B6%E8%A9%90%E9%A8%99%E8%BB%8A%E6%89%8B%E3%80%80%E6%85%B6%E5%B9%B8%E4%BF%9D%E4%BD%8F%E7%99%BE%E8%90%AC%E5%AD%98%E6%AC%BE\" target=\"_blank\">\r\n                                        <time>16:49</time><h2>社會</h2>\r\n                                        <h1><font color=\"#ff0000\">上班族被當詐騙車手 慶幸保住百萬存款(2354)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt inter even\">\r\n                                    <a href=\"/realtimenews/article/international/20170702/1152742/%E6%8B%BF%E5%90%B9%E5%A1%B5%E6%A7%8D%E6%8F%92%E8%82%9B%E9%96%80%E5%BE%8C%E7%81%8C%E6%B0%A3%E3%80%80%E5%8F%8B%E4%BA%BA%E7%9B%B4%E8%85%B8%E5%8F%97%E6%90%8D%E7%A0%B4%E6%B4%9E\" target=\"_blank\">\r\n                                        <time>16:49</time><h2>國際</h2>\r\n                                        <h1><font color=\"#ff0000\">拿吹塵槍插肛門後灌氣 友人直腸受損破洞(921)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life hsv\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152709/%E3%80%90%E6%9C%89%E7%89%87%E3%80%91%E5%A4%A7%E5%AD%B8%E6%8C%87%E8%80%83%E8%8B%B1%E6%96%87%E8%80%83%E9%A1%8C%E3%80%80%E8%80%83%E7%94%9F%EF%BC%9A%E5%81%8F%E9%9B%A3%E4%B8%94%E9%96%B1%E8%AE%80%E9%A1%8C%E8%BC%83%E9%95%B7\" target=\"_blank\">\r\n                                        <time>16:48</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">【有片】大學指考英文考題 考生:偏難且閱...(1037)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt sport even\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152741/%E5%AF%8C%E9%82%A6%E6%96%97%E5%85%AD%E6%88%B0%E6%A1%83%E7%8C%BF%E3%80%80%E6%96%B0%E6%B4%8B%E6%8A%95%E9%BA%A5%E5%8A%9B%E6%88%88vs%E5%8F%B2%E5%8D%9A%E5%A8%81\" target=\"_blank\">\r\n                                        <time>16:47</time><h2>體育</h2>\r\n                                        <h1><font color=\"#ff0000\">富邦斗六戰桃猿 新洋投麥力戈vs史博威(325)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life hsv\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152611/%E5%9C%8B%E6%96%87%E7%A7%91%E3%80%8C%E9%BD%8A%E6%9F%8F%E6%9E%97%E3%80%8D%E5%85%A5%E9%A1%8C%E3%80%80%E5%9C%8B%E6%96%87%E8%80%81%E5%B8%AB%EF%BC%9A%E4%B8%AD%E9%96%93%E5%81%8F%E9%9B%A3\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">國文科「齊柏林」入題 國文老師:中間偏難(2394)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt life even hsv\">\r\n                                    <a href=\"/realtimenews/article/life/20170702/1152638/%E5%8C%97%E5%8C%97%E5%9F%BA19%E7%B8%A3%E5%B8%82%E7%99%BC%E5%B8%83%E5%A4%A7%E9%9B%A8%E7%89%B9%E5%A0%B1%E3%80%80%E6%A1%83%E7%AB%B9%E7%AD%897%E7%B8%A3%E5%B8%82%E7%99%BC%E5%B8%83%E8%B1%AA%E9%9B%A8%E7%89%B9%E5%A0%B1\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>生活</h2>\r\n                                        <h1><font color=\"#ff0000\">北北基19縣市發布大雨特報 桃竹等7縣市...(30045)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt enter hsv\">\r\n                                    <a href=\"/realtimenews/article/entertainment/20170702/1152724/%E6%9B%B9%E6%A0%BC%E5%A5%89%E9%80%81%E5%8D%83%E8%90%AC%E3%80%80%E5%AC%8C%E5%A6%BB%E9%80%99%E6%A8%A3%E8%8A%B1%E2%80%A6%E2%80%A6\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>娛樂</h2>\r\n                                        <h1><font color=\"#ff0000\">曹格奉送千萬 嬌妻這樣花……(1369)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt sport even\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152732/%E5%B0%8F%E9%A6%AC%E4%BA%9E%E5%A4%AA%E5%8D%80%E9%96%8B%E6%89%93%E3%80%80%E5%8F%B0%E7%81%A3%E5%B0%91%E6%A3%92%E3%80%81%E6%AC%A1%E9%9D%92%E5%B0%91%E6%A3%92%E6%98%8E%E6%88%B0%E6%97%A5%E6%9C%AC\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>體育</h2>\r\n                                        <h1><font color=\"#383c40\"> 小馬亞太區開打 台灣少棒、次青少棒明戰...(132)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt local\">\r\n                                    <a href=\"/realtimenews/article/local/20170702/1152738/%E4%B8%AD%E9%A2%A8%E7%BF%81%E9%8E%96%E5%B1%8B%E5%85%A7%E7%84%A1%E5%9B%9E%E6%87%89%E3%80%80%E8%AD%A6%E6%B6%88%E7%A0%B4%E7%AA%97%E7%99%BC%E7%8F%BE%E3%80%8C%E7%9D%A1%E8%91%97%E4%BA%86%E3%80%8D\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>社會</h2>\r\n                                        <h1><font color=\"#ff0000\">中風翁鎖屋內無回應 警消破窗發現「睡著了...(300)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                        <li class=\"rtddt sport even\">\r\n                                    <a href=\"/realtimenews/article/sports/20170702/1152737/%E3%80%90%E9%81%B8%E7%A7%80%E3%80%91%E4%B8%AD%E4%BF%A1%E8%A6%81%E5%A4%9A%E9%81%B8%E6%8D%95%E6%89%8B%E3%80%80%E5%85%A7%E3%80%81%E5%A4%96%E9%87%8E%E6%89%8B%E4%B9%9F%E8%80%83%E9%87%8F\" target=\"_blank\">\r\n                                        <time>16:45</time><h2>體育</h2>\r\n                                        <h1><font color=\"#383c40\">【選秀】中信要多選捕手 內、外野手也考量(791)</font></h1>\r\n                                    </a>\r\n                                </li>\r\n                                                </ul>\n<nav class=\"page_switch lisw fillup\" style=\"margin-top:0em;margin-bottom:1em;text-align:center\"><a href=\"/realtimenews/section/new/1\" title=\"1\" class=\"enable\">1</a><a href=\"/realtimenews/section/new/2\" title=\"2\">2</a><a href=\"/realtimenews/section/new/3\" title=\"3\">3</a><a href=\"/realtimenews/section/new/4\" title=\"4\">4</a><a href=\"/realtimenews/section/new/5\" title=\"5\">5</a><a href=\"/realtimenews/section/new/6\" title=\"6\">6</a><a href=\"/realtimenews/section/new/7\" title=\"7\">7</a><a href=\"/realtimenews/section/new/8\" title=\"8\">8</a><a href=\"/realtimenews/section/new/9\" title=\"9\">9</a><a href=\"/realtimenews/section/new/10\" title=\"10\">10</a><a href=\"/realtimenews/section/new/11\" title=\"下10頁\">下10頁</a>                        </nav><span class=\"clear man\"></span>\r\n                    </div>\r\n                </div>\r\n                <div class=\"abdominis\"></div>\r\n              </article><aside id=\"sitesidecontent\" class=\"manu lvl\"><div id=\"rectangleAD1\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('rectangleAD1');})</script></div>\r\n                <div id=\"rectangleAD2\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('rectangleAD2');})</script></div>\r\n                <div id=\"MiniLREC1\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('MiniLREC1');})</script></div>\r\n                <div id=\"MiniLREC2\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('MiniLREC2');})</script></div>\r\n                <div id=\"MiniLREC3\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('MiniLREC3');})</script></div>\r\n                <div id=\"MiniLREC4\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('MiniLREC4');})</script></div>\r\n                <section id=\"section-hot-sidebox\" class=\"shsb slvl clearmen  shsbinternational\"><header><h1>國際最<U+00A0>Hot</h1>\n<span><a target=\"_blank\" href=\"/appledaily/hotdaily/international\">看更多</a></span></header><article><ul>\n<li>\n<h2><a href=\"/appledaily/article/international/20170702/37701932/hotdailyart_right\">6萬港人勇爭民主 回歸20...</a></h2>\n<span>12935</span>\n</li>\n<li>\n<h2><a href=\"/appledaily/article/international/20170702/37701916/hotdailyart_right\">FBI:失蹤陸生已遇害 助...</a></h2>\n<span>7021</span>\n</li>\n<li>\n<h2><a href=\"/appledaily/article/international/20170702/37701945/hotdailyart_right\">港陷分裂「習發出最嚴峻警告...</a></h2>\n<span>4366</span>\n</li>\n<li>\n<h2><a href=\"/appledaily/article/international/20170702/37702051/hotdailyart_right\">中國南韓敷衍 川普沒耐性</a></h2>\n<span>2779</span>\n</li>\n<li>\n<h2><a href=\"/appledaily/article/international/20170702/37701909/hotdailyart_right\">2死6傷 紐約醫院離職醫 ...</a></h2>\n<span>2867</span>\n</li>\n</ul></article></section><section id=\"facebookbox\" class=\"fbbx slvl clearmen\"><header><h1>Facebook<U+00A0></h1>\r\n        <a id=\"fblikebtn\" class=\"on\">蘋果粉絲團</a>\r\n    </header><article><div id=\"fb-root\"></div>\r\n        <script language=\"javascript\">\r\n            (function(d, s, id) {\r\n              var js, fjs = d.getElementsByTagName(s)[0];\r\n              if (d.getElementById(id)) return;\r\n              js = d.createElement(s); js.id = id;\r\n              js.src = \"//connect.facebook.net/zh_TW/all.js#xfbml=1\";\r\n              fjs.parentNode.insertBefore(js, fjs);\r\n            }(document, 'script', 'facebook-jssdk'));\r\n        </script><div id=\"changeFBlike\">\r\n            <script language=\"javascript\">\r\n                if (GeoDFP['CC'] == 'US' || GeoDFP['CC'] == 'CA') {\r\n                    document.write('<div class=\"fb-like-box\" data-href=\"https://www.facebook.com/AppleDailyUS/\" data-width=\"300\" data-height=\"370\" data-show-faces=\"false\" data-stream=\"true\" data-show-border=\"true\" data-header=\"false\"></div>');\r\n                }\r\n                else {\r\n                    document.write('<div class=\"fb-like-box\" data-href=\"http://www.facebook.com/appledaily.tw\" data-width=\"300\" data-height=\"370\" data-show-faces=\"false\" data-stream=\"true\" data-show-border=\"true\" data-header=\"false\"></div>');\r\n                }\r\n            </script>\n</div>\r\n    </article></section><div id=\"halfpage\" class=\"ads rtb rtf\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('halfpage');})</script></div>\r\n              </aside>\n</div>\r\n            <div id=\"BottomBanner\"><script type=\"text/javascript\">googletag.cmd.push(function() {googletag.display('BottomBanner');})</script></div>\r\n            <link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/dateinput_skin.css\">\n<div class=\"abkct clearmen\"><a onclick=\"javascript:window.scroll(0,0)\" class=\"abktp\">回到最上面</a></div>\n<section id=\"extras\" class=\"fexbr\"><div class=\"sqzer fillup\">\n        <a href=\"/index/dailyquote/\" title=\"每日一句\" class=\"dyw\"><span data-tooltip=\"每天一句好話\"></span>每日一句</a>\n        <a href=\"/index/lottery\" title=\"樂透發票\" class=\"lnr\"><span data-tooltip=\"看看你手氣\"></span>樂透發票</a>\n        <a href=\"#\" title=\"線上美語\" class=\"oneg\" onclick=\"JavaScript:window.open('/index/englishlearning/','','width=650,height=495')\"><span data-tooltip=\"學習英文\"></span>線上美語</a>\n        <a href=\"/index/weather\" title=\"天氣\" class=\"wkw\"><span data-tooltip=\"今天一周天氣預報\"></span>天氣</a>\n        <a href=\"/index/complain\" title=\"爆料投訴\" class=\"rpter\"><span data-tooltip=\"爆料給蘋果\"></span>爆料投訴</a>\n        <a href=\"/index/prize\" title=\"中獎名單\" class=\"itul\"><span data-tooltip=\"蘋果送大獎!\">中獎名單</span></a>\n        <a href=\"/index/ticket\" title=\"贈獎活動\" class=\"pguss\"><span data-tooltip=\"贈獎活動\"></span>贈獎活動</a>\n        <a href=\"/index/mobileguide\" title=\"行動版\" class=\"wmvs\"><span data-tooltip=\"行動版\">行動版</span></a>\n    </div>\n</section><footer id=\"corpfoot\"><div class=\"sqzer\">\n        <figure><a href=\"http://www.nextdigital.com.hk/investor/\"><img src=\"http://twimg.edgesuite.net/images/NextDigital/logo_NextMedia_m.png\"></a></figure><section id=\"corpcompanies\" class=\"clearmen\"><a href=\"/\" class=\"first\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ft_AppleDaily.png\" alt=\"蘋果日報 AppleDaily\"></a>\n            <a href=\"/actionnews/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ft_AnimatedNews.png\" alt=\"動新聞\"></a>\n            <a href=\"http://www.applelive.com.tw/livechannel/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/applelive.gif\" alt=\"蘋果Live\"></a>\n            <a href=\"http://applevr.appledaily.com.tw/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/VRlogo87x40.png\" alt=\" 蘋果VR\" width=\"83\" height=\"30\"></a>\n            <a href=\"http://sharpdaily.tw/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ft_SharpDaily.png\" alt=\"爽報\"></a>\n            <a href=\"http://www.nextmag.com.tw/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ft_NextMag.png\" alt=\"壹周刊\"></a>\n            <a href=\"http://fashion.appledaily.com.tw/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/applefashion_website_head_39x30.png\" alt=\"蘋果時尚\"></a>\n            <a href=\"http://www.tomonews.com/\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/tomonews_blue.png\" alt=\"Tomonews\" style=\"margin-top:9px\"></a>\n            <a href=\"/teded\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/ted.png\" alt=\"Ted\"></a>\n            <a href=\"http://fami.tw/pc\" class=\"last\" target=\"_blank\"><img src=\"http://twimg.edgesuite.net/appledaily/images/core/01_PC_Fami_v1.png\" alt=\"fami\"></a>\n        </section><section id=\"corpinfo\" class=\"fillip\"><a href=\"/rss/\" style=\"color:red\">RSS</a>\n            <a href=\"/index/aboutus/\">了解蘋果日報</a>\n            <a href=\"/index/contactus/\">聯絡我們</a>\n            <a href=\"/adguide\" target=\"_blank\">廣告刊登</a>\n            <a href=\"/index/faq/\">常見問題</a>\n            <a href=\"/index/sitemap/\">網站導覽</a>\n            <a href=\"/index/termofuse/\">使用條款</a>\n            <a href=\"/index/authorization/\">授權申請程序</a>\n            <a href=\"/index/privacy/\">隱私權說明</a>\n            <a href=\"/index/disclaimer/\">免責與分級</a>\n            <a href=\"/index/community/\">蘋果社群</a>\n            <a href=\"http://www.facebook.com/nextmediastudent/\" target=\"_blank\">校園培果計畫</a>\n            <a href=\"http://www.104.com.tw/jobbank/custjob/index.php?r=cust&amp;j=5e3a4326486c3e6a30323c1d1d1d1d5f2443a363189j01&amp;jobsource=checkc\" target=\"_blank\">蘋果徵才</a>\n            <a href=\"/index/subscribe\" class=\"last\">訂閱蘋果</a>\n        </section><p id=\"copyright\">c 2017 www.appledaily.com.tw Limited. All rights reserved. 台灣蘋果日報 版權所有 不得轉載</p>\n    </div>\n</footer><link rel=\"stylesheet\" href=\"http://twimg.edgesuite.net/appledaily/images/css/appledaily.backtotop.css\">\n<script src=\"http://twimg.edgesuite.net/appledaily/images/js/jquery.appledaily.backtotop.js\"></script><div class=\"back-to-top-side\"><a onclick=\"javascript:window.scroll(0,0)\" class=\"back-to-top-btn overcooked\">回到最上面</a></div>\n<!-- .back-to-top-side -->\n<script type=\"text/javascript\">\n    $(document).ready(function() {\n       var opacity = 0.5,\n            toOpacity = 1,\n            duration = 250;\n        $('.opacity').css('opacity', opacity).hover(function() {\n            $(this).fadeTo(duration, toOpacity);\n        }, function() {\n            $(this).fadeTo(duration, opacity);\n        });\n     });\n\n    var $window = $(window);\n    var $extras = $('#extras');\n    var $corpfoot = $('#corpfoot');\n    var $door = $('#door');\n    var $doorLeft = $('#door-left');\n    var $doorRight = $('#door-right');\n    var doorMarginTop = ($door.css('margin-top')) ? parseInt($door.css('margin-top').replace('px',''), 10) : 0;\n    var scrollTargetTop = 130;\n    $(window).scroll(function() {\n      var bottomPos;\n      if ($extras.length && $corpfoot.length) {\n        bottomPos = Math.min($extras.offset().top, $corpfoot.offset().top);\n      } else if (!$extras.length && !$corpfoot.length) {\n        bottomPos = $(document).height();\n      } else {\n        bottomPos = ($extras.offset() || $corpfoot.offset()).top;\n      }\n\n      var scrollTop = $window.scrollTop();\n      var bannerHeight = Math.max($doorLeft.height(),$doorRight.height());\n      var checkPoint = scrollTop+bannerHeight;\n\n      if ((scrollTop>scrollTargetTop) && (checkPoint < bottomPos)) {\n        $door.css('position','fixed').css('top','-'+doorMarginTop+'px');\n      } else {\n        if (checkPoint >= bottomPos) {\n          $door.css('position','absolute').css('top',(bottomPos-bannerHeight-doorMarginTop)+'px');\n        } else {\n          $door.css('position','relative').css('top','0px');\n        }\n      }\n    }).trigger('scroll');\n</script><!-- Google Analytics --><script>\n  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n  ga('create', 'UA-2067247-40', 'auto', {'sampleRate':1});\n  ga('require', 'linkid', 'linkid.js');\n  ga('require', 'displayfeatures');\n  </script><noscript>\n    <iframe src=\"//www.googletagmanager.com/ns.html?id=GTM-P5MXMC\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>\n</noscript>\n<script>\n            dataLayer = [{\n            'pageLevel' : 'Listing',\n            'videoArticle': 'non-video',\n            'publishDay': '',\n            'columnist' : '',\n            'column' : ''\n         }];\n    \n    (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n    })(window,document,'script','dataLayer','GTM-P5MXMC');\n</script><div id=\"nxm_iframeDiv\" style=\"display:none\"></div>\n<div id=\"nxm_vtrk_iframeDiv\" style=\"display:none\"></div>\n<!--page idle-->\n<link href=\"http://twimg.edgesuite.net/appledaily/images/adidle/css/Ted_fancybox.css\" rel=\"stylesheet\" type=\"text/css\">\n<script src=\"http://twimg.edgesuite.net/appledaily/images/adidle/js/Ted_plugin.js\"></script><script src=\"http://twimg.edgesuite.net/appledaily/images/adidle/js/Ted_adidle.js\"></script><script language=\"JavaScript\">\n    var intRand = Math.floor((Math.random()*10));\n    var strHtml = 'Ted';\n    if(intRand>3 && intRand<6){\n        strHtml = 'infographic';\n    }\n    if(intRand>6){\n        strHtml = 'Sale';\n    }\n    document.write('<a class=\"pageidle\" data-fancybox-type=\"iframe\" href=\"http://www.appledaily.com.tw/'+strHtml+'_adidle.html#'+Math.random()+'\"></a>');\n</script><!--page idle-->\n</div>\r\n    </div>\r\n    <script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script><script>\r\n        $(document).ready(function($) {\r\n          /* main carousel */\r\n          $('#carousel').on('onInitAfter',function(e){\r\n            $(this).find('.owl-dots').append( '<span class=\"masker\"></span>' );\r\n          }).owlCarousel({\r\n            mouseDrag:false,\r\n            touchDrag:true,\r\n            pullDrag:false,\r\n            navText:['下一則','上一則'],\r\n            nav:false,\r\n            navSpeed:500,\r\n            dotsSpeed:500,\r\n            dots:false,\r\n            items:1,\r\n            autoplay:true,\r\n            autoplayHoverPause:false,\r\n            autoplayTimeout: 5000,\r\n            lazyLoad:true,\r\n            info: (typeof getInfo == 'function') ? getInfo : {},\r\n            loop:true\r\n          }).mouseenter(function() {\r\n            $(this).addClass('on');\r\n            $(this).trigger('pause.owl');\r\n            $('#splash').addClass('on');\r\n          }).mouseleave(function() {\r\n            $(this).removeClass('on');\r\n            $(this).trigger('autoplay.owl');\r\n            $('#splash').removeClass('on');\r\n          });\r\n\r\n          $('.xPrev').click(function() {\r\n            $('#carousel').trigger('prev.owl');\r\n          });\r\n          $('.xNext').click(function() {\r\n            $('#carousel').trigger('next.owl');\r\n          });\r\n\r\n          $('.xPrev, .xNext').mouseenter(function() {\r\n            $('#carousel').addClass('on');\r\n            $('#carousel').trigger('pause.owl');\r\n            $('#splash').addClass('on');\r\n          }).mouseleave(function() {\r\n            $('#carousel').removeClass('on');\r\n            $('#carousel').trigger('autoplay.owl');\r\n            $('#splash').removeClass('on');\r\n          });\r\n\r\n          /* firewire */\r\n          $('#firewire').owlCarousel({\r\n            mouseDrag:false,\r\n            touchDrag:false,\r\n            pullDrag:false,\r\n            animateOut: 'slideOutDown-100',\r\n            animateIn: 'slideInDown-100',\r\n            nav:false,\r\n            navSpeed:1000,\r\n            dots:false,\r\n            items:1,\r\n            autoplay:true,\r\n            autoplayHoverPause:true,\r\n            autoplayTimeout: 6000,\r\n            lazyLoad:true,\r\n            loop:true\r\n          });\r\n\r\n        });\r\n\r\n        function getInfo(owlInfo){\r\n          $('#carousel').data('currentPosition', owlInfo['currentPosition']);\r\n        }\r\n\r\n        $( document ).ready(function() {\r\n          var mainImgs = $('#carousel').find('.owl-item').not('.cloned').find('.item').find('img');\r\n          var mainLinks = $('#carousel').find('.owl-item').not('.cloned').find('.item').find('a');\r\n\r\n          function trackHomeMainImg(action, label) {\r\n            if ( ga ) ga('send', 'event', 'HomeMainImg', action, label);\r\n            if (window['console'] !== undefined) { console.log('SendGA: '+action) };\r\n          }\r\n\r\n          function isAD(imgAlt) {\r\n            return ((imgAlt) && (imgAlt.toUpperCase().substring(0,2)==\"AD\"));\r\n          }\r\n\r\n          function mainImgView(idx) {\r\n            var imgAlt = $(mainImgs[idx]).attr('tcode');\r\n            if (isAD(imgAlt)) trackHomeMainImg('views', imgAlt);\r\n          }\r\n\r\n          function mainImgClick(e) {\r\n            var imgAlt = $(e.currentTarget).find('img').attr('tcode');\r\n            if (isAD(imgAlt)) trackHomeMainImg('clicks', imgAlt);\r\n          };\r\n\r\n          $('#carousel').on('onTransitionEnd', function(e) {\r\n            var idx = $('#carousel').data('currentPosition');\r\n            if ($.isNumeric(idx)) mainImgView(idx);\r\n          });\r\n\r\n          /* entry track */\r\n          if ($('#carousel')) mainImgView(0);\r\n\r\n          /* bind click event */\r\n          $('#carousel').find('.owl-item').find('.item').find('a').click(mainImgClick);\r\n\r\n        });\r\n    </script><!-- YAHOO AD --><script type=\"text/javascript\">\r\n        var sectionCode = sectionCode || [];\r\n        sectionCode.push(\"3fbb0747-092b-4c67-b6dc-c522d10c2475\");\r\n        (function(){\r\n          var script = document.createElement(\"script\");\r\n          script.async = true;\r\n          script.src = \"https://s.yimg.com/av/gemini/ga/gemini.js\";\r\n          document.body.appendChild(script);\r\n        })();\r\n   </script><!-- YAHOO AD -->\n</body>\n</html>\n"
# crawler 2
library(httr)
## Warning: package 'httr' was built under R version 3.3.3
apple2 <- GET(newsurl)


# Get HSR Time Table
library(httr)
url <- 'https://www.thsrc.com.tw/tw/TimeTable/SearchResult'

payload <- list(
'StartStation'='977abb69-413a-4ccf-a109-0272c24fd490',
'EndStation'='60831846-f0e4-47f6-9b5b-46323ebdcef7',
'SearchDate'='2017/07/02',
'SearchTime'='15:00',
'SearchWay'='DepartureInMandarin'
)

res <- POST(url = url, body = payload, encode = 'form')
res
## Response [https://www.thsrc.com.tw/tw/TimeTable/SearchResult]
##   Date: 2017-07-02 09:29
##   Status: 200
##   Content-Type: text/html; charset=utf-8
##   Size: 102 kB
## 
## 
## <!DOCTYPE html>
## <html lang="zh-tw">
## 
## 
## 
## <meta charset="utf-8" />
## <link rel="shortcut icon" href="/Content/favicon/favicon.ico" />
## <link rel="apple-touch-icon-precomposed" href="/Content/favicon/57_57.pn...
## ...
# http://twtraffic.tra.gov.tw/twrail/EasySearch.aspx

Magrittr

data(iris)
sum(tail(head(iris), 3)$Petal.Length)
## [1] 4.6
iris %>% head() %>% tail(3) %>% .$Petal.Length %>% sum()
## [1] 4.6

CSS Selector

test <- '<html> 
 <body> 
 <h1 id="title">Hello World</h1> 
 <a href="#" class="link">This is link1</a> 
 <a href="# link2" class="link">This is link2</a> 
 </body> 
</html>
'
## by tag
read_html(test) %>% html_nodes('h1') %>% html_text()
## [1] "Hello World"
read_html(test) %>% html_nodes('a') %>% html_text()
## [1] "This is link1" "This is link2"
## by css attribute
read_html(test) %>% html_nodes('#title') %>% html_text()
## [1] "Hello World"
read_html(test) %>% html_nodes('.link') %>% html_text()
## [1] "This is link1" "This is link2"

Parse Apple Page

# loading library
library(rvest)

# get applenews page
newsurl <- 'http://www.appledaily.com.tw/realtimenews/section/new/'
apple <- read_html(newsurl, encoding = 'utf-8')

# parse applenews 
rtddt <- apple %>% html_nodes('.rtddt')
#as.character(rtddt[1])
title    <- rtddt %>% html_nodes('h1') %>% html_text()
category <- rtddt %>% html_nodes('h2')  %>% html_text()
dt       <- rtddt %>% html_nodes('time')  %>% html_text()

url      <- rtddt %>% html_nodes('a') %>% html_attr('href')
domain   <- 'http://www.appledaily.com.tw'
url2     <- paste0(domain, url)

# organize data into a dataframe
applenews <- data.frame(title = title, category = category, url = url2, time = dt)

Get Content

library(rvest)
#applenews[1, 'url']
content <- read_html('http://www.appledaily.com.tw/realtimenews/article/life/20170702/1152672/全台最大新住民家庭日 5000人同歡') 

content %>% html_nodes('#rt_headpic .life') %>% html_text()
content %>% html_nodes('#summary') %>% html_text()
content %>% html_nodes('.gggs time') %>% html_text()
content %>% html_nodes('.clicked') %>% html_text()


getArticle <- function(url){
    content <- read_html(url)
    title   <- content %>% 
             html_nodes('#h1') %>% html_text()
    
    summary <- content %>% 
             html_nodes('#summary') %>% html_text()
    
    dt      <- content %>% 
             html_nodes('.gggs time') %>% html_text()
    
    clicked <-content %>% 
             html_nodes('.clicked') %>% html_text()
    
    data.frame(title = title, summary = summary, dt = dt, stringsAsFactors = FALSE)
}

getArticle('http://www.appledaily.com.tw/realtimenews/article/entertainment/20170702/1152617/%E3%80%8A%E6%88%91%E4%B8%8D%E7%AC%A8%E3%80%8B77%E6%AD%B2%E5%B0%8F%E8%B1%AC%E7%88%BA%E7%88%BA%E3%80%80%E6%8B%92%E4%BB%98%E7%BD%B0%E6%AC%BE%E8%A2%AB%E5%88%A4%E5%9D%90%E7%89%A2', '娛樂')

reorganize get news function

# loading library
library(rvest)


getURL <- function(pageurl){
  # get applenews page
  newsurl <- pageurl
  domain  <- 'http://www.appledaily.com.tw'
  apple <- read_html(newsurl, encoding = 'utf-8')
  dfall <- data.frame()
  
  # parse applenews 
  rtddt <- apple %>% html_nodes('.rtddt a')
  for (ele in rtddt){
    url      <- ele %>% html_attr('href')
    url2     <- paste0(domain, url)
    df       <- getArticle(url2)
    dfall    <- rbind(dfall, df) 
  }
  dfall
}
applenews <- getURL('http://www.appledaily.com.tw/realtimenews/section/new/')

applenews <- data.frame()
url <- 'http://www.appledaily.com.tw/realtimenews/section/new/'
for(i in 1:3){
  df <- getURL(paste0(url , i))
  applenews <- rbind(applenews, df)
}


write.csv(x=applenews, file = 'applenews.csv')