diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d5bdb47 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "webdata/stdlibs/url-normalizer.js"] + path = webdata/stdlibs/url-normalizer.js + url = https://github.com/g0v/url-normalizer.js.git diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1d52d2c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php +php: +- 5.5 +- 5.4 +- 5.3 +- hhvm + +script: php tests/run-all.php diff --git a/tests/models/Crawler/Appledaily/Crawl.test b/tests/models/Crawler/Appledaily/Crawl.test new file mode 100644 index 0000000..8e51011 --- /dev/null +++ b/tests/models/Crawler/Appledaily/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Appledaily::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Appledaily::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Appledaily/Parse.test b/tests/models/Crawler/Appledaily/Parse.test new file mode 100644 index 0000000..35cbe90 --- /dev/null +++ b/tests/models/Crawler/Appledaily/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_Appledaily::parse (523056.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/523056.html'); + $result = Crawler_Appledaily::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/523056.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Appledaily/data/523056.html b/tests/models/Crawler/Appledaily/data/523056.html new file mode 100644 index 0000000..e07a383 --- /dev/null +++ b/tests/models/Crawler/Appledaily/data/523056.html @@ -0,0 +1,599 @@ + + + + + + + + + 阿拉比卡墜空頭!要咖啡降價?別想了~ | 即時新聞 | 20141212 | 蘋果日報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+

阿拉比卡墜空頭!要咖啡降價?別想了~

+
+
+
+ + + +
+
+
+

阿拉比卡咖啡豆價格已墜入空頭,但今年來仍累計大漲59%。路透

+
+
+
+
+

字級:

+ +
+
+ +
+ +
+
+
+
+

《華爾街日報》報導,阿拉比卡(arabica)咖啡豆價格在周四墜入空頭,但別急著期待你每天喝的咖啡降價!因為全球最大阿拉比卡咖啡豆產地巴西近來的降雨,緩解了下季咖啡豆產量減少的疑慮。
 
美國洲際期貨交易所(ICE Futures)的阿拉比卡咖啡豆3月期貨昨下跌1.2%,收每磅1.764美元,寫下近5個月來交易最活絡合約的新低價,而且自10月22日每磅2.219美元的高點挫跌逾20%,正式墜入空頭熊市。
 
今年稍早阿拉比卡的價格曾因巴西天候乾旱而不斷飛漲,所以即使如今在短短不到2個月內就跌入空頭,阿拉比卡今年來漲幅仍高居所有商品之冠。
 
今年至今阿拉比卡期貨價累計大漲59%,咖啡業者依然持續再將高漲的成本逐步轉嫁給消費者。阿拉比卡品質較羅布斯塔(robusta)咖啡豆優異,所以通常是專業咖啡業者採用的選擇,羅布斯塔則主要作為即溶咖啡原料。(劉利貞/綜合外電報導)

+
+

+

+ + <<即時新聞動起來>>

【動即時】:最鄉民的影音頻道


+ 【蘋論陣線】:最新評論及獨立媒體每日總覽

+ 有話要說 投稿「即時論壇」

onlineopinions@appledaily.com.tw
+
+ +
+
+ +
+ +
+
+ +
+ +
+ + + +
+ +
+ + + + + + + + + + +
+
+ + + + + diff --git a/tests/models/Crawler/Appledaily/data/523056.json b/tests/models/Crawler/Appledaily/data/523056.json new file mode 100644 index 0000000..ff41a12 --- /dev/null +++ b/tests/models/Crawler/Appledaily/data/523056.json @@ -0,0 +1,4 @@ +{ + "title": "阿拉比卡墜空頭!要咖啡降價?別想了~", + "body": "《華爾街日報》報導,阿拉比卡(arabica)咖啡豆價格在周四墜入空頭,但別急著期待你每天喝的咖啡降價!因為全球最大阿拉比卡咖啡豆產地巴西近來的降雨,緩解了下季咖啡豆產量減少的疑慮。\n \n美國洲際期貨交易所(ICE Futures)的阿拉比卡咖啡豆3月期貨昨下跌1.2%,收每磅1.764美元,寫下近5個月來交易最活絡合約的新低價,而且自10月22日每磅2.219美元的高點挫跌逾20%,正式墜入空頭熊市。\n \n今年稍早阿拉比卡的價格曾因巴西天候乾旱而不斷飛漲,所以即使如今在短短不到2個月內就跌入空頭,阿拉比卡今年來漲幅仍高居所有商品之冠。\n \n今年至今阿拉比卡期貨價累計大漲59%,咖啡業者依然持續再將高漲的成本逐步轉嫁給消費者。阿拉比卡品質較羅布斯塔(robusta)咖啡豆優異,所以通常是專業咖啡業者採用的選擇,羅布斯塔則主要作為即溶咖啡原料。(劉利貞/綜合外電報導)\n\n \n\n \n\n \n\n \n\n <<即時新聞動起來>>\n\n【動即時】:最鄉民的影音頻道<\/a>\n\n【蘋論陣線】:最新評論及獨立媒體每日總覽<\/a>\n\n有話要說 投稿「即時論壇」\n\n onlineopinions@appledaily.com.tw<\/a>" +} \ No newline at end of file diff --git a/tests/models/Crawler/Appledaily/data/README.md b/tests/models/Crawler/Appledaily/data/README.md new file mode 100644 index 0000000..fc7fd8e --- /dev/null +++ b/tests/models/Crawler/Appledaily/data/README.md @@ -0,0 +1,14 @@ +Appledaily (TW) data +================== + +The `.html` files are downloaded 2014-12-12. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `523056.html` + From: http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523056/ \ No newline at end of file diff --git a/tests/models/Crawler/Appledaily/data/listing.html b/tests/models/Crawler/Appledaily/data/listing.html new file mode 100644 index 0000000..95aae2a --- /dev/null +++ b/tests/models/Crawler/Appledaily/data/listing.html @@ -0,0 +1,13347 @@ + + + + + + + + + + 蘋果日報|Apple Daily|首頁 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+ + + +
+

動新聞 

更多新聞
+
+
+ +
+

特選話題 ---阿基師帶熟女上摩鐵 好男人形象崩解 

+ +
+ +
+

衝200萬粉絲送萬元好禮

+
+ +
+
+
+

更多蘋果 

+ +
+
+
+ + + +
+ +
+ + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + 今日蘋果 | 蘋果日報 + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+ +
+
+
+

新聞總覽

+ +
+
+ + + +

有感降價 機票跌千元 客運省7趴 粥品減5塊

+

【綜合報導】有感降價來了!國際油價狂跌,國內汽、柴油近半年每公升大跌7.6元及8.4元,預估下周可能再降0.6元,95無鉛汽油將跌破28元;油價下跌帶動陸空運具全面降價,下周一起國內線機票將推離峰5折優惠,金門機票降逾千元,中長程國道客運最多降30元,約7%,連同下月將降價的糖及天然氣,家戶可望月省數百元。但民眾抱怨,...

+ +
+
+ +
+

頭條要聞 

Top
+ +
+
+

要聞

+ +
+ + + + + + + +
+

地方綜合

+ +
+ + + + + + + + + +
+

娛樂 

Top
+
+

娛樂名人

+ +
+
+ + + + + + + + + + +
+

蘋果國際 

Top
+ +
+
+

國際新聞

+ +
+ + + + + +
+

體育 

Top
+ +
+ + + + + + + + + + +
+

財經 

Top
+ +
+ + + + + + + + + + + + + + +
+

地產 

Top
+ +
+ + + + + + + + +
+

副刊 

Top
+
+

副刊焦點

+ +
+ + + + +
+ +
+

論壇與專欄 

Top
+ + + +
+
+
+ + +
+ + + +
+ +
+ + + + + + + + + + +
+
+ + + + + + + + + 頭條要聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+

頭條

  • 有感降價 機票跌千元 客運省7趴 粥品減5塊

    有感降價 機票跌千元 客運省7趴 粥品減5塊

    【綜合報導】有感降價來了!國際油價狂跌,國內汽、柴油近半年每公升大跌7.6元及8.4元,預估下周可能再降0.6元,95無鉛汽油將跌破28元;油價下跌帶動陸空運具全面降價,下周一起國內線機票將推離峰5折優惠,金門機票降逾千

    ...繼續閱讀
  • 彭淮南看好 明年工資增4%

    彭淮南看好 明年工資增4%

    中央銀行總裁彭淮南昨在立院財委會表示,很多企業明年準備調薪,將使實質工資再升4%,假使物價漲幅不到2%,控制在1.5%,等於實質工資至少增2.5%,民眾荷包受惠。

    ...繼續閱讀

要聞

  • 走紅5年 阿基師買9000萬屋

    走紅5年 阿基師買9000萬屋

    【娛樂中心、生活中心╱台北報導】六十歲的阿基師(鄭衍基)被拍到跟熟女粉絲上摩鐵,他前天開記者會「鉅細靡遺」講太多,強調只有嘴對嘴,反衍生更多疑點;而記者發現阿基師已從民族西路老公寓換成重慶北路豪宅,據查一戶近九千萬元,進

    ...繼續閱讀
  • 「阿基師是造神與毀神的經典」

    「阿基師是造神與毀神的經典」

    社會怪象 阿基師跟熟女上摩鐵引發軒然大波,他出面仍滅不了火,「閃靈」團長Doris昨在臉書寫「阿基師是被造神與毀神的台灣經典」,她受訪說對社會造神現象不以為然,對阿基師廚藝沒質疑,私領域不予置評,「不喜歡社會賦予一個專業

    ...繼續閱讀

社會

  • 金髮狼襲胸3女「很刺激」

    金髮狼襲胸3女「很刺激」

    【楊靜茹╱南投報導】南投市一名染金髮男子,前天尾隨兩名穿越國小校園返家的高中女學生,從後熊抱襲胸,兩女嚇得尖叫,不久這名色狼又在附近巷弄鎖定另名落單女生,摀嘴搓胸後逃逸。色狼犯後剪短髮染黑躲查緝,警方昨根據監視器畫面找到

    ...繼續閱讀
  • 剎車失靈 垃圾車連18撞

    剎車失靈 垃圾車連18撞

    「砰、砰、砰!」北市環保局一名周姓駕駛(50多歲)昨上午7時許開著垃圾車(大圖,箭頭處),行經士林洲美快速道路高架橋,下橋時疑煞車失靈,失控連續追撞前方18輛車,造成一名女子輕傷送醫。事後現場交通大打結,有車主不顧危險直

    ...繼續閱讀

生活

  • 申訴榜首 台灣大3連莊

    申訴榜首 台灣大3連莊

    【陳思豪╱台北報導】北市府昨公布今年度消費爭議申訴統計,申訴量最多為電信類,並以台灣大哥大居榜首;台灣大已連三年居此類申訴量榜首,且依NCC(國家通訊傳播委員會)十月公布的最新相關調查,台灣大申訴量也最多。北市府指,其用

    ...繼續閱讀
  • 海研五號船難 確定人為疏失

    海研五號船難 確定人為疏失

    【許敏溶╱台北報導】我國最大、最先進的海洋研究船「海研五號」,今年國慶日在澎湖附近沉沒,航港局昨指出,該船沉沒確有人為疏失,船長與船員都有疏失;快速沉沒則是因船體遭礁岩劃過的裂痕太長,封艙無法達到效果,但完整報告需待航港

    ...繼續閱讀

政治

  • 「救黨」34藍委拱朱選主席

    「救黨」34藍委拱朱選主席

    【綜合報導】國民黨主席補選啟動,今明兩天領表。三十四名藍委昨連署支持新北市長朱立倫參選,希望朱承擔責任「救救國民黨」;新北市府指朱目前將全力做好市政,也會在適當時機及場合表達對黨務看法。多次表態不選的台北市長郝龍斌昨改口

    ...繼續閱讀
  • 辣蘋果:表態竟這麼難(余艾苔)

    辣蘋果:表態竟這麼難(余艾苔)

    九合一慘敗,馬英九辭去黨主席以示負責;外界原本以為,手控下屆總統黨內提名大權的黨主席,朱立倫、王金平、胡志強、郝龍斌等黨內重量級人士會紛紛表態參選,沒想到竟是一片冷清。

    ...繼續閱讀

地方綜合

  • 小資聖誕套餐 兩人700元有找

    小資聖誕套餐 兩人700元有找

    【陳威叡╱新北報導】聖誕節腳步趨近,新北市多家餐飲業者推出聖誕饗宴接受預訂,有業者推出輕食為主的聖誕雙人套餐,不用七百元即可享用,詢問度超高;也有業者鎖定朋友共度佳節,推出六人火雞分享餐,更加送蛋糕增買氣,至今訂位已超過

    ...繼續閱讀
  • 球星放鳥 粉絲可退2千元

    球星放鳥 粉絲可退2千元

    【陳思豪╱台北報導】在台北市舉辦的二○一四傳奇球星夢幻賽上月二日落幕,球迷期待的美國NBA球星麥葛瑞迪(Tracy McGrady),竟賽前才宣布因傷無法出賽,引爆廣告不實爭議。北市法務局協調主辦單位非要整合行銷團隊同意

    ...繼續閱讀

論壇

  • 趙少康傳真:陳水扁放不放(趙少康)

    趙少康傳真:陳水扁放不放(趙少康)

    放不放陳水扁的議題像幽靈一樣揮之不去,纏繞了台灣6年,社會為此付出重大代價,綠營在九合一選舉中不敢提,卻在選後挾大勝的餘威逼迫政府放扁。 馬英九總統在08、09年時,應對陳水扁要求,基於對前總統的尊重及參考各國先例,如果

    ...繼續閱讀
  • 柯P的I-Voting為何失敗(白瑞傑)

    柯P的I-Voting為何失敗(白瑞傑)

    這次台北市的勞動局長票選,隨著鄉民的熱門人選一一被遴選委員會剔除,已經注定了還未投票就宣告失敗的命運。 遴選委員會掌握提名生殺大權,是導致勞動局長選舉失敗的直接原因。即使抽離網路科技因素,我們也知道,像香港這樣的鳥籠提名

    ...繼續閱讀

法庭

  • 造謠拒洗門風 男殺婦判15年

    造謠拒洗門風 男殺婦判15年

    【黃哲民、鮮明╱連線報導】南投木工師傅許瑞彬造謠鄰婦黃素卿的丈夫有小三,被黃婦要求洗門風道歉,否則提告妨害名譽,許男不願當眾出醜又怕挨告,多次向黃婦求饒被拒,去年竟狠戳黃婦七刀致死,落網辯稱黃婦自己倒向刀刃喪命,最高法院

    ...繼續閱讀
  • 假學歷騙高薪 男獲判免賠

    假學歷騙高薪 男獲判免賠

    【吳珮如╱台北報導】三十二歲男子曾詠翔,去年駕駛BMW撞死蕭姓男大生,疑因炫富引發公憤,後來他任職的百辰光電公司,發現曾男只有中華大學畢業學歷,卻造假成清華大學研究所肄業,取得月薪四萬八千元的管理部專員職位,因此提告要求

    ...繼續閱讀

暖流

  • A3540 跛婦顧癱夫 辭工陷困頓

    A3540 跛婦顧癱夫 辭工陷困頓

    「阿旺,是記者小姐來看你。」林美雅幫46歲丈夫吳錦旺擦澡、撒上痱子粉、再輕拍打他手腳,「物理治療師教我的,透過拍打按摩,活絡他的氣血,我每天幫他運動2小時,冬天他的手腳也不會冰冷。」報導•攝影╱孫敏聿

    ...繼續閱讀
  • 中風男獲63萬 養4口家

    中風男獲63萬 養4口家

    【李佳玲╱台北報導】7月30日《暖流》版報導吳炯霖《夫中風 4口做手工苦撐》,當時蘋果基金會撥款3萬元紓困,見報後還獲839筆讀者捐款共63萬6577元。送款時,吳炯霖正做著胸章手工,他說,現在走路仍不穩,沒公司願意僱用

    ...繼續閱讀

投訴

  • 保養廠技師 踹客戶車發洩

    保養廠技師 踹客戶車發洩

    你知道愛車送到保養廠保養過程中會發生什麼事嗎?新北市一名男子將車輛開到NISSAN裕信新莊服務廠保養,因未關閉行車記錄器,意外拍到保養廠員工之間起爭執,竟怒踹打客戶車輛發洩的誇張行徑。對此,裕隆日產公司公關室表示,經查,

    ...繼續閱讀
  • 簡訊漫遊遲未通 害損失訂單

    簡訊漫遊遲未通 害損失訂單

    【孫崇軒╱新北報導】台灣之星用戶前往香港洽商,為顧及與台灣有業務往來,在香港當地致電向台灣之星客服申請開通簡訊漫遊,但在香港數日卻遲無法收到訊號,導致業務損失。

    ...繼續閱讀
+

更多蘋果 

+ +
+
+
+ +
+ + + +
+ +
+ + + + + + + + + + +
+ + + 娛樂蘋道|首頁|蘋果日報

娛樂頻道 | 蘋果日報 | APPLE DAILY

台灣  香港 
蘋果日報自律委員會 Nextmedia
+ + + + +
+ +
+ + + + + + + + +
+ + + + + + 國際新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+

國際頭條

  • 殘暴 IS製手冊 教性侵童奴

    殘暴 IS製手冊 教性侵童奴

    【簡竹君╱綜合外電報導】佔據伊拉克與敘利亞部分區域的伊斯蘭激進組織「伊斯蘭國」(Islamic State,IS),俘虜近5000名女奴隸,其中多淪為IS戰士的性奴,IS還公布類似「女奴使用手冊」,以Q&A問答方式,闡述

    ...繼續閱讀
  • 虐囚遭國際撻伐 美關阿富汗監牢

    虐囚遭國際撻伐 美關阿富汗監牢

    張渝萍╱綜合外電報導美國參議院情報委員會日前公布中央情報局(Central Intelligence Agency,CIA)虐囚報告,引發國際抨擊。現任及退休CIA官員紛紛出面反駁,稱報告是政治操作,指這份單方認定的報告

    ...繼續閱讀

國際新聞

  • 摩納哥王妃 誕下龍鳳胎

    摩納哥王妃 誕下龍鳳胎

    摩納哥 【張渝萍╱綜合外電報導】摩納哥夏琳王妃前晚為56歲的亞伯特二世親王生下一對龍鳳胎,是該國自13世紀建國以來,王室首見龍鳳胎。官方鳴放42響禮炮隆重迎接這對小姊弟,教堂鐘聲也持續15分鐘,慶祝王位後繼有人。

    ...繼續閱讀
  • 惹火北韓遭駭 索尼修改新片

    惹火北韓遭駭 索尼修改新片

    全球 簡竹君╱綜合外電報導 將於聖誕節上檔的好萊塢喜劇《名嘴出任務》(The Interview),昨在洛杉磯首映,電影公司索尼影業娛樂公司,罕見不開放媒體採訪紅毯也取消專訪。據駭客竊自索尼的電郵,這部以刺殺北韓領導人金

    ...繼續閱讀
  • 闖祕魯聖地留字 綠色和平致歉

    闖祕魯聖地留字 綠色和平致歉

    祕魯 韓政燕╱綜合外電報導 「綠色和平」組織(GREENPEACE)為呼籲世人關注氣候變遷,周一非法闖入聯合國教科文組織列為世界遺產的祕魯千年聖地「納斯卡線」鋪設標語,引起祕魯震怒,揚言提告。綠色和平昨致歉,願接受調查。

    ...繼續閱讀
  • 男遞紙條給前面的人 「你女友出軌了!」

    男遞紙條給前面的人 「你女友出軌了!」

    【動新聞╱綜合報導】美國一名球迷日前去看球賽,無意中看到前方同樣也在觀賽的男子,身旁的女友用手機與別人談情,忍不住寫紙條通知這名綠帽男。 據英國《鏡報》報導,一名叫「雷」(Lye)的男子,在底特律入場觀看一場美式足球賽

    ...繼續閱讀
  • 別讓魚兒不開心 海上漂27萬噸塑膠垃圾

    別讓魚兒不開心 海上漂27萬噸塑膠垃圾

    [動新聞/綜合報導]國際研究人員近日發表一份報告指出,有多達27萬噸的塑膠垃圾漂在海上,這些垃圾可裝滿3.8萬輛垃圾車,或者是570架載滿乘客的波音747重量。 據 美國《新聞周刊》報導,撰寫這份報告的主筆、五環流研究

    ...繼續閱讀
  • 辣椒粉襲獄卒 13囚越獄2死

    辣椒粉襲獄卒 13囚越獄2死

    【動新聞╱綜合報導】 本周二在印度東北部賈坎德邦的柴巴薩市,有1間監獄運送54名囚犯,結果在數人數的時候,有15名犯人把事先準備好的辣椒粉撒向獄卒;獄卒於是開槍,擊斃其中兩名將要面臨審判的囚犯,另外有13名成功脫逃。

    ...繼續閱讀
  • 湖冰比玻璃還乾淨 美的令人屏息

    湖冰比玻璃還乾淨 美的令人屏息

    【動新聞╱綜合報導】斯洛伐克與波蘭邊境的特拉山區(Tatras Mountains)景色優美如畫,吸引不少遊客。最近網路上出現一段影片,兩名登山客走在結冰的湖上,而湖冰清澈得像玻璃一樣、完美透明,可清晰看見河床上的石頭,

    ...繼續閱讀
  • 太美無法當警察? 女告訓練營性騷

    太美無法當警察? 女告訓練營性騷

    【動新聞╱綜合報導】 美國29歲的女子赫麗(Amanda Holley)前天對紐約與紐澤西港口事務管理局警隊提告,因為她在訓練過程中受到性騷擾與性別歧視,最後甚至被逼辭職。 赫麗表示,訓練營的人常叫她芭比或是美國女孩

    ...繼續閱讀
  • 鴨子聽雷 證人講1小時 法官才知不是說英文

    鴨子聽雷 證人講1小時 法官才知不是說英文

    【動新聞╱綜合報導】 英國法庭日前鬧出一個大笑話;一名38歲的婦人,因遭性侵到法庭上作證,沒想到她邊哭邊講了一小時,全場沒人聽得懂,法官還一度以為是音響問題,結果是書記官發現,這名婦人講得並不是英文,而是克里奧爾語,

    ...繼續閱讀
  • 南非烏龍手語翻譯員 現成勵志演說家

    南非烏龍手語翻譯員 現成勵志演說家

    [動新聞/綜合報導]去年12月10日出現在南非前總統曼德拉喪禮的烏龍手語翻譯員詹捷(Thamsanqa Jantjie),近來以自身不凡經歷為題材,到處演講鼓勵精神病患,成為受歡迎的勵志演說家。    據報導,詹捷承認

    ...繼續閱讀
  • 惡整小偷撇步 美國人這麼做

    惡整小偷撇步 美國人這麼做

    【動新聞╱綜合報導】 寄到家的包裹老是被偷,該怎麼辦?美國華盛頓一名33歲女子赫茲爾,連續2個月以來,放在門口的包裹都會不翼而飛,包含衣服、生活用品以及聖誕禮物,損失超過2萬5千元。 有天,她在庭院遛狗,忽然想到

    ...繼續閱讀

中國新聞

  • 出賣閨密偷吃  上海妹被修圖變賣淫女

    出賣閨密偷吃 上海妹被修圖變賣淫女

    【動新聞╱綜合報導】 中國上海一名妙齡女子,上個月看到閨密琳琳偷吃,趕緊告訴她老公,結果琳琳和那個男人分手,但是她開始接到一堆莫名其妙的電話,問她「上海妹,一晚多少錢啊」、「你打錯啦」,更慘的是她老公的朋友竟然在色情網站

    ...繼續閱讀

雙語天下

  • No, No, No!

    No, No, No!

    Marlon is showing off his new Corvette when Stella asks to take it for a spin. M: Marlon   S: Stella S: Hey, t

    ...繼續閱讀
+

更多蘋果 

+ +
+
+
+ +
+ + + +
+ +
+ + + + + + + + + + +
+ + + + + + + + + 體育新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ +

蘋果日報 | APPLE DAILY

+
+ + + +
+ 台灣  + 香港  +
+
+ 昨日瀏覽量 :  +
+
+
+ 蘋果日報自律委員會 + + Nextmedia +
+
+
+
+ +
+
+
+
+ +
+
+
+

體育焦點

  • 高士特無故解約 3車手 怒討獎金

    高士特無故解約 3車手 怒討獎金

    滅頂新風波【詹健全╱綜合報導】9月南韓仁川亞運女子自由車全能金牌、台灣車后蕭美玉昨在臉書上求助車迷,因為弟弟蕭世鑫莫名遭頂新魏家集團旗下的高士特職業自由車隊提前解約,還惡意扣住近60萬元比賽獎金。

    ...繼續閱讀
  • 車隊批違紀:獎金均分其他人

    車隊批違紀:獎金均分其他人

    【詹健全╱綜合報導】爆出拒發資遣車手比賽獎金的高士特車隊,總經理廖偉宇昨在臉書上發表4項聲明,但對於車手因「有損公司聲譽與形象」而被解約的詳情則拒絕透露,僅說:「比賽獎金都已均分給其他車手。」 趕在蕭世鑫、劉金í

    ...繼續閱讀

大運動場

  • 程思嘉參戰 8台將開打

    程思嘉參戰 8台將開打

    中國公開賽 【黎建忠╱綜合報導】總獎金55萬美元(約1715萬台幣)中國女子高爾夫巡迴賽(CLPGA)-中國公開賽,今天上午7點5分在深圳觀瀾湖球場展開首回合,台灣共8女將參賽-,包括上個月獲中巡、歐巡合辦的廈門公開賽冠

    ...繼續閱讀
  • 至少拍銅 陳思羽21歲以下組晉4

    至少拍銅 陳思羽21歲以下組晉4

    桌球年終總決賽 【王毓健╱台北-曼谷電話採訪】2014年國際桌總世界巡迴賽年終總決賽昨在泰國開打,我國21歲女將陳思羽在21歲以下單打表現搶眼,取得分組第1晉級4強,也讓我國至少1銅入袋。

    ...繼續閱讀

    籃球瘋

    • 咆哮甜瓜 菜鳥造反 老大嗆開扁 尼克10連敗

      咆哮甜瓜 菜鳥造反 老大嗆開扁 尼克10連敗

      【蔡裕隆╱綜合報導】籠罩在連敗陰影的尼克,昨天被ESPN運動網爆料起內鬨,老大「甜瓜」安東尼(Carmelo Anthony)因捍衛籃板球不利,遭2年級小弟哈達威(Tim Hardaway)幹譙,安東尼氣到差點扁哈達威。

      ...繼續閱讀
    • Kobe打主控 豪:我應不在場上

      Kobe打主控 豪:我應不在場上

      【陳雍仁╱綜合報導】《洛杉磯每日新聞》報導,湖人主帥史考特(Byron Scott)要讓一哥Kobe(Kobe Bryant)承擔更多的控球任務,這表示台裔之星林書豪的發揮空間更受限。湖人明天上午10點30分將作客馬刺(

      ...繼續閱讀

    投打對決

    • 林哲瑄 砲轟小朋友 回味打擊下毒手

      林哲瑄 砲轟小朋友 回味打擊下毒手

      Nike台灣棒球訓練營【楊逸民╱台中報導】Nike台灣棒球訓練營昨天結訓日,16名職棒球星組隊和青棒學員明星隊進行3局友誼賽,陳金鋒擔任總教練,但棒次張泰山安排,他把自己排第1棒,「恰恰」彭政閔打2棒,張泰山說:「這是照

      ...繼續閱讀
    • 想返中職 倪福德:帶回新觀念

      想返中職 倪福德:帶回新觀念

      【楊逸民╱台中報導】倪福德昨天現身台灣棒球訓練營,經紀公司還在幫他與中信兄弟交涉合約,他說:「台灣是我的家鄉,當然會想再回來台灣打球。」

      ...繼續閱讀

    足球新聞

    運彩分析

      +

      更多蘋果 

      + +
      +
      +
      + +
      + + + +
      + +
      + + + + + + + + + + +
      + + + + + + + + + 蘋果副刊|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      +
      +
      + +

      蘋果日報 | APPLE DAILY

      +
      + + + +
      + 台灣  + 香港  +
      +
      + 昨日瀏覽量 :  +
      +
      +
      + 蘋果日報自律委員會 + + Nextmedia +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +

      副刊焦點

      旅遊與探險

      • 台中 遊逛 萌樂園

        台中 遊逛 萌樂園

        現正在台中舉辦的泰迪熊嘉年華,為原本綠意優雅的秋紅谷、草悟道,注入了繽紛的色彩與活潑的氣息。可愛的親子泰迪熊造型,不僅吸睛搶眼,更受到大、小遊客的喜愛。還有飯店業者趁機推出泰迪熊住房專案,除了送熊玩偶外,客房內更有大型熊

        ...繼續閱讀

      美食天地

      • 走訪香港 型格飲品店

        走訪香港 型格飲品店

        近年精品咖啡風潮吹入香港,開設許多精品咖啡館,除了在世界咖啡大師比賽拿下亞軍的The Cupping Room,還有從精品咖啡跨足茶飲的The Tea Academics,都是香港最潮流的店家。報導╱石永豪 攝影╱吳朝奎

        ...繼續閱讀
      • 聖誕麵包 甜蜜紮實

        聖誕麵包 甜蜜紮實

        義大利的潘尼頓(Panettone)、德國的史多倫(Stollen)和法國的咕咕霍夫(Kugelhopf)等,都是歐洲地區慶祝聖誕節常見的蛋糕麵包,因為加了大量糖漬或酒漬果乾,質地或像蛋糕般柔軟,或帶著紮實口感,滋味都頗

        ...繼續閱讀

      車市3C

      家庭與健康

      • 多吃Omega-3食物 讓眼睛水汪汪

        多吃Omega-3食物 讓眼睛水汪汪

        現代人低頭成癮,長時間用眼容易造成眼睛乾澀,開業眼科醫師鐘珮禎提醒,手機螢幕小,應避免拿來觀看影片或玩遊戲。另外,最好每用眼1小時就休5~10分鐘,平常可多吃富含不飽和脂肪酸Omega-3食物,有助減少發炎和乾眼症;營養

        ...繼續閱讀
      • Detox water難排毒 營養流失僅添味

        Detox water難排毒 營養流失僅添味

        在歐美社群網站相當盛行的Detox water(排毒水),這股風潮最近也吹進台灣,日前有部落客分享心得,只要將水果泡在水中冷藏8小時後飲用,號稱就能排毒、消脂,再加上顏色鮮豔絢麗,裝在透明罐中十分賞心悅目。不過台安醫院營

        ...繼續閱讀
      +

      副刊專欄 

      +
      +
      +

      流行尖端

      + +
      +
      +

      旅遊探險

      + +
      +
      +

      美食天地

      + +
      +
      +

      車市3C

      + +
      +
      +

      家庭與健康

      + +
      +
      +
      +

      更多蘋果 

      + +
      +
      +
      + +
      + + + +
      + +
      + + + + + + + + + + +
      + + + + + + + + + 財經新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + +
      +
      +
      + +

      蘋果日報 | APPLE DAILY

      +
      + + + +
      + 台灣  + 香港  +
      +
      + 昨日瀏覽量 :  +
      +
      +
      + 蘋果日報自律委員會 + + Nextmedia +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +

      財經焦點

      • 大戶條款 張盛和曾銘宗互槓

        大戶條款 張盛和曾銘宗互槓

        唇槍舌戰【林巧雁、廖珮君╱台北報導】台股「大戶條款」存廢,金管會和財政部昨在財委會上不同調。金管會主委曾銘宗公開表態「廢大戶條款」,張盛和則呼籲「宜修不宜廢」,2名財金首長在國會殿堂上演互槓局面。大戶條款到底要修還是要廢

        ...繼續閱讀
      • 露天拍賣年度熱搜 第1名竟是EXO

        露天拍賣年度熱搜 第1名竟是EXO

        【動新聞╱綜合報導】號稱全台最大拍賣網站平台「露天市集」,昨天公布年度熱搜關鍵字排行,第1名竟是韓國男團EXO,露天說EXO實在太火紅了,相關商品賣到不行,所以勇奪熱搜NO.1。第2名是行動電源,第3名是紅米,第4~10

        ...繼續閱讀

        熱門話題

        • 赴監院陳情 台新金:財部違法

          赴監院陳情 台新金:財部違法

          雙方交火【林潔禎╱台北報導】在彰銀(2801)董事改選失利下,台新金(2887)昨赴監察院陳情指控財政部違反約定,委任律師陳彥希表示,在公法中找不到任何條文,授權財政部到市場爭奪經營權,「以市場派手法徵求委託書,財政部的

          ...繼續閱讀
        • 台新告財部 曾銘宗:別搞太兇

          台新告財部 曾銘宗:別搞太兇

          【廖珮君、林巧雁╱台北報導】台新金(2887)因喪失彰銀(2801)經營權,先怒告財政部、再向監察院申訴,金管會主委曾銘宗昨說,台新金打官司是憲法保障的權力,金管會尊重,但呼籲台新「不要搞太兇,影響金融股、或社會觀感,這

          ...繼續閱讀

        投資理財

        • hTC智慧手環 傳CES見客

          hTC智慧手環 傳CES見客

          即將亮相【陳俐妏╱台北報導】宏達電(2498)首款穿戴裝置已整整傳了1年,原本傳出將於年底推出,但目前仍未見蹤影,最新外電消息指出,宏達電神秘穿戴產品將在明年1月初的美國消費性電子大展(CES)亮相,且這款產品並非目前市

          ...繼續閱讀
        • 國寶、幸福人壽標售 逾5家買主探詢

          國寶、幸福人壽標售 逾5家買主探詢

          【廖珮君╱台北報導】國寶、幸福2家問題壽險公司標售案,已有超過5家金融業潛在買主探詢。金管會規劃,將在明年首季完成標售。市場推測,最具有買方出價實力者,可能包括國壽、富邦、中壽、三商美邦及中信人壽等壽險業者。據金管會規劃

          ...繼續閱讀

        國際財經

        • 新興市場教父 墨比爾斯:陸股牛市才起步

          新興市場教父 墨比爾斯:陸股牛市才起步

          油價將彈【賴宇萍╱綜合外電報導】「新興市場教父」墨比爾斯(Mark Mobius)接受彭博專訪時直言,陸股牛市才剛起步,將趁陸股經歷5年來最大震盪期加碼,並廣泛買進各類股票,包括石化股在內,看好油價將從5年低點反彈。

          ...繼續閱讀
        • 沙國嗆不減產 油價恐見50美元

          沙國嗆不減產 油價恐見50美元

          【劉利貞、陳冠穎╱綜合外電報導】掌控全球40%原油供應OPEC(石油輸出國家組織)大砍明年原油需求至12年新低,國際油價瀕臨60美元保衛戰,最大產油國沙烏地阿拉伯仍堅持不減產,甚至反嗆「為什麼得減產?」分析師預期跌勢難挽

          ...繼續閱讀

        科技3C

        • 第3方支付卡關 詹宏志感傷

          第3方支付卡關 詹宏志感傷

          再度開砲【蕭文康╱台北報導】網家(8044)集團董事長詹宏志昨與智榮基金會董事長施振榮宣布首次華人巨微趨勢研究整合上合作,會後詹宏志對於第3方支付仍躺在立法院表示很感傷,他預期本會期不易完成立法,呼籲立法諸公即使在動盪時

          ...繼續閱讀
        • 精元平板外接鍵盤 明年營收佔比翻倍

          精元平板外接鍵盤 明年營收佔比翻倍

          【王郁倫╱台北報導】精元(2387)多角化發展,平板外接鍵盤受惠2 in 1裝置出貨走旺,明年營收佔比將翻倍站上10%,另外將推出3D懸浮觸控板,計劃打入筆電供應鏈。看好物聯網商機,精元也開發出iBeacon(室內定位系

          ...繼續閱讀

          綜合產業

          • 屈臣氏台灣下季突破500店

            屈臣氏台灣下季突破500店

            加速拓展 【林海╱台北報導】台灣藥妝龍頭屈臣氏今年強打自有品牌與電子商務,帶動業績、來客數均持續成長,明年除了持續2大策略外,也將持續展店,並開創新的改裝特色店,在台總店數明年第1季將突破500家。

            ...繼續閱讀
          • 南僑砸近千萬辦展 重振台灣美食形象

            南僑砸近千萬辦展 重振台灣美食形象

            【林海╱台北報導】食安事件頻傳,重創台灣美食形象與糕餅業買氣,烘焙油脂龍頭南僑(1702)砸下近千萬元,26日邀郭元益、洪瑞珍、台中太陽堂等合辦伴手禮嘉年華,共計60廠商、120個攤位,南僑會長陳飛龍表示,希望對國內食品

            ...繼續閱讀

            金融保險

            • 9成國人 認同長照需求

              9成國人 認同長照需求

              調查出爐 【黃國棟╱台北報導】知易行難,用在國人對長期照顧的準備最貼切,據新光人壽與中華民國家庭照顧者關懷總會合作公布的國人長期照護大調查,發現超過9承受訪者都認同未來人生可能面臨長期照護需求,但7成5比例不會主動搜尋長

              ...繼續閱讀
            • 4類型投資人 明年投資教戰

              4類型投資人 明年投資教戰

              【陳瑩欣╱台北報導】中信銀財富管理處協理廖亭亭昨日表示,對450名往來的財富管理客戶進行投資取向調查發現,明年投資人類型可分為保守溫馴的綿羊、穩健規劃的山羊、追求成長的羚羊、勇於挑戰的黑羊等4種不同類型,其中40.6%民

              ...繼續閱讀

              頭家生意

              • 好創意 你買單

                好創意 你買單

                群眾集資(crowdfunding)平台在近3年來竄紅, 主要透過網路直接面對大眾募集小額資金的平台, 募資端在平台上提出企劃吸引網友注意並投注金援。 3年多來,國內外台灣提案者有約1250個團隊, 募資總金額已達3億元

                ...繼續閱讀
              +

              更多蘋果 

              + +
              +
              +
              + +
              + + + +
              + +
              + + + + + + + + + + +
              + + + + + + + + + 房市地產|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              + + + +
              +
              +
              + +

              蘋果日報 | APPLE DAILY

              +
              + + + +
              + 台灣  + 香港  +
              +
              + 昨日瀏覽量 :  +
              +
              +
              + 蘋果日報自律委員會 + + Nextmedia +
              +
              +
              +
              +
              +
              +
              +
              + +
              +
              +
              +
              + +
              +
              +
              +

              地產焦點

              • 北捷280億聯開案 開賣卡關

                北捷280億聯開案 開賣卡關

                【洪安怡╱台北報導】北市新舊政府團隊交接在即,對捷運聯合開發案的決策未定,不少將完工的聯開案恐因此延宕。捷運蘆洲站「希望城市」近完工,但2年前預售不成已先讓代銷業者蒙受上億元損失;捷運內湖站「交11」、捷運辛亥站「敦南捷

                ...繼續閱讀
              • 陶朱隱園隔震墊 亞洲最大

                陶朱隱園隔震墊 亞洲最大

                【潘姿羽╱台北報導】台北市信義計劃區指標豪宅「陶朱隱園」工地首度公開亮相,昨日展示全亞洲最大尺寸、與美國加州APPLE新總部及美國NASA太空總署太空梭展示館同等級的隔震墊,耐震度7級。

                ...繼續閱讀

              家居王

              • 台灣常用電地暖 木地板專用 施工快

                台灣常用電地暖 木地板專用 施工快

                地暖系統 從腳暖到心寒冷的冬天常讓人手腳冰冷,身體不適。在眾多讓家裡變溫暖的方法中,地暖系統最能達到中醫說的「溫足而涼頂」(腳暖了,身體就舒服了),而且無聲、低耗能、耐用性高、空氣不乾燥,使用壽命幾乎和房子一樣。採訪╱洪

                ...繼續閱讀
              • 石築南法莊園 小石牆伴午茶

                石築南法莊園 小石牆伴午茶

                怡然慢活走在宜蘭縣三星鄉「日光小鎮」的民宿莊園裡,會讓人有置身歐洲郊區的感覺,連空氣的流動都彷彿放慢了腳步。仿南法莊園建築的主建物是棟石頭屋,前後都有廣大的庭院可以散步休憩。採訪╱洪儷容 攝影╱彭仁義

                ...繼續閱讀

              豪宅王

              • 奇品軒閣 機能綠意 大器鋪陳舒適豪墅

                奇品軒閣 機能綠意 大器鋪陳舒適豪墅

                在市中心忙碌工作,回市郊坐擁大坪數,漸成為現代人偏好的居住模式,「奇品軒閣」坐落於台中10期重劃區靜謐街邊,外觀新穎跳脫,面寬8米起為周邊最大,充分感受離塵不離城的慢活與閒適。採訪╱洪子恩 攝影╱陳恒芳

                ...繼續閱讀
              • 古根漢 溫泉舒身 綠意娛心

                古根漢 溫泉舒身 綠意娛心

                藝園夢想爬山呼吸芬多精,泡湯舒緩身心靈,是許多人的假日夢想,志嘉建設在新竹國家藝術園區,打造豪墅「古根漢」,讓你2個願望 天天滿足,還在實品屋頂樓打造空中花園,可欣賞綠意景觀。採訪╱倪浩倫 攝影╱范厚民

                ...繼續閱讀

                地產王

                • 9陷阱 別被DM廣告呼攏了

                  9陷阱 別被DM廣告呼攏了

                  拆解 DM廣告糖衣琳瑯滿目的建案DM廣告,低總價、高報酬率、景觀好、地段佳,看得心癢癢,恨不得馬上訂一間嗎?為了避免陷入裹著糖衣的廣告陷阱,記得,下手買屋前,一定要停、看、聽。採訪╱鄭婷方

                  ...繼續閱讀
                • 行義路生活圈 溫泉綠地 優樂園

                  行義路生活圈 溫泉綠地 優樂園

                  【郭寶懃╱台北報導】台北市北投區行義路為著名溫泉觀光休憩區,還有磺溪流經當地,不僅擁有溫泉,磺流兩側也有綠地、人行步道,居住環境相當清幽,吸引不少建商來此推案,多規劃中大坪數的大樓產品,每坪開價75~90萬元。

                  ...繼續閱讀

                中古好屋

                • 文山指南路三段 優質學區房價3字頭

                  文山指南路三段 優質學區房價3字頭

                  雙北小新窩甜蜜蜜結婚買房是人生大事,但房價高漲,新婚族想購置屬於彼此的第1間房,總是傷透腦筋,本期《靚屋王》特別推薦雙北適合新婚族購屋條件的區域,來解決新婚夫婦的煩惱。記者╱徐馬政妘 攝影╱范厚民

                  ...繼續閱讀
                • 板橋溪崑區 總價千萬買3房大樓

                  板橋溪崑區 總價千萬買3房大樓

                  【徐馬政妘╱新北報導】新婚族若想在新北市購置屬於小倆口的第1間房,考慮到生活機能、休憩空間及交通方便性,專家表示,可以選購新北市板橋溪崑地區周邊的中古物件,總價1000萬元可買3房大樓。

                  ...繼續閱讀

                房產月刊

                • 區域房市:總價千萬元內 小宅順銷

                  區域房市:總價千萬元內 小宅順銷

                  一如雙北市的情況,大桃園近年房價漲幅驚人,但隨著總價門檻不斷提高,大坪數產品成交明顯鈍化,因此2~3房產品重回市場主力,不過現階段購屋民眾態度趨於保守,成交期較先前拉長不少。文/陳英寰

                  ...繼續閱讀
                • 區域房市:總價友善 台中小宅搶客

                  區域房市:總價友善 台中小宅搶客

                  受到土地價格上漲影響,台中市房價持續攀升,大樓購屋門檻動輒千萬元起跳,讓小資族難以入手,基於總價考量,近期台中房市吹起一陣「小宅風」,不僅符合少子化趨勢,總價也可降低至千萬以下,強力吸引購屋者目光。文/莊亞築 攝影/陳義

                  ...繼續閱讀
                +

                更多蘋果 

                + +
                +
                +
                + +
                + + + +
                + +
                + + + + + + + + + + +
                + + + + + + + + + 論壇與專欄|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                + + + +
                +
                +
                + +

                蘋果日報 | APPLE DAILY

                +
                + + + +
                + 台灣  + 香港  +
                +
                + 昨日瀏覽量 :  +
                +
                +
                + 蘋果日報自律委員會 + + Nextmedia +
                +
                +
                +
                +
                +
                +
                +
                + +
                +
                +
                +
                + +
                +
                +
                +

                蘋論

                • 蘋論:天人交戰 人定勝天

                  蘋論:天人交戰 人定勝天

                  名人劈腿被抓包不好笑,但他們的藉口卻很好笑。阿基師新發明的開悟理論是最新的笑點。阿基師說那位女士心情不好,帶她上摩鐵幫她「開悟」。禪宗公案裡很多人是被師父棍棒打頭而開悟,阿基師用什麼棒子開悟之呢?太陽花女王去摩鐵商議援交

                  ...繼續閱讀

                  人間異語

                  • 人間異語:追求性 讓我找回生命動能

                    人間異語:追求性 讓我找回生命動能

                    Q:遇過怎樣的性騷擾?A:我出生公教家庭,父母管教嚴厲,尤其我媽,是情緒的獨裁者,完全不容許反駁。爸則是常在媽罵人時,把我推出去當箭靶,每次我都愣在那不知所措,而這不知所措竟延續到往後性騷擾事件中。

                    ...繼續閱讀

                    論壇

                    • 趙少康傳真:陳水扁放不放(趙少康)

                      趙少康傳真:陳水扁放不放(趙少康)

                      放不放陳水扁的議題像幽靈一樣揮之不去,纏繞了台灣6年,社會為此付出重大代價,綠營在九合一選舉中不敢提,卻在選後挾大勝的餘威逼迫政府放扁。馬英九總統在08、09年時,應對陳水扁要求,基於對前總統的尊重及參考各國先例,如果陳

                      ...繼續閱讀

                    名采

                    • 我們都喝 雀巢長大

                      我們都喝 雀巢長大

                      克寧奶粉是雀巢的,鷹牌煉乳也是雀巢的,再加上雀巢咖啡、雀巢檸檬茶、雀巢美祿巧克力麥芽飲品;在喝的世界,雀巢陪我們很多也很久了。40幾年前,我在高雄的郊區小巷度過童年,就是大玻璃罐裝雀巢即溶咖啡教我初識了什麼叫咖啡。

                      ...繼續閱讀

                    人間事

                    • 頭等艙貴客 特殊要求難滿足

                      頭等艙貴客 特殊要求難滿足

                      盛著豐腴鵝肝的麵包,佐上幾滴檸檬汁提味的魚子醬,泰航馬德里飛往曼谷的頭等艙內,只有我及一位西方面孔的中年男子,我挑選著新上映的院線片,消磨用餐時光。頭等艙配置兩名空服員,一位是稍有年紀的女性座艙長,另一位是相貌俊美的泰籍

                      ...繼續閱讀
                    +

                    所有作家 

                    + +
                    +

                    新聞專欄 

                    +
                    +
                    +

                    頭條要聞

                    + +
                    +
                    +

                    娛樂

                    + +
                    +
                    +

                    國際

                    + +
                    +
                    +

                    財經

                    + +
                    +
                    +

                    房市地產

                    + +
                    +
                    +

                    體育

                    + +
                    +
                    +
                    +

                    更多蘋果 

                    + +
                    +
                    +
                    + +
                    + + + +
                    + +
                    + + + + + + + + + + +
                    + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    +
                    +
                    + +

                    蘋果日報 | APPLE DAILY

                    +
                    + + + +
                    + 台灣  + 香港  +
                    +
                    + 昨日瀏覽量 :  +
                    +
                    +
                    + 蘋果日報自律委員會 + + Nextmedia +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    +
                    +
                    + +

                    蘋果日報 | APPLE DAILY

                    +
                    + + + +
                    + 台灣  + 香港  +
                    +
                    + 昨日瀏覽量 :  +
                    +
                    +
                    + 蘋果日報自律委員會 + + Nextmedia +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    +
                    +
                    + +

                    蘋果日報 | APPLE DAILY

                    +
                    + + + +
                    + 台灣  + 香港  +
                    +
                    + 昨日瀏覽量 :  +
                    +
                    +
                    + 蘋果日報自律委員會 + + Nextmedia +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    +
                    +
                    + +

                    蘋果日報 | APPLE DAILY

                    +
                    + + + +
                    + 台灣  + 香港  +
                    +
                    + 昨日瀏覽量 :  +
                    +
                    +
                    + 蘋果日報自律委員會 + + Nextmedia +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + + + + + + + + 蘋果即時新聞|蘋果日報|Apple Daily + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + + +
                    +
                    +
                    + +

                    蘋果日報 | APPLE DAILY

                    +
                    + + + +
                    + 台灣  + 香港  +
                    +
                    + 昨日瀏覽量 :  +
                    +
                    +
                    + 蘋果日報自律委員會 + + Nextmedia +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +

                    + + +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + +
                    +
                    + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Appledaily/data/listing.json b/tests/models/Crawler/Appledaily/data/listing.json new file mode 100644 index 0000000..43dbc14 --- /dev/null +++ b/tests/models/Crawler/Appledaily/data/listing.json @@ -0,0 +1,767 @@ +[ + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261700/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261709/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261712/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261735/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261742/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261747/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261753/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261809/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261816/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261820/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261829/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36261835/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262017/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262028/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262031/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262034/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262102/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262305/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262391/", + "http://www.appledaily.com.tw/appledaily/article/entertainment/20141212/36262393/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141204/36245319/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261554/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261554/大戶條款張盛和曾銘宗互槓", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261560/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261560/新興市場教父墨比爾斯:陸股牛市才起步", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261568/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261568/沙國嗆不減產油價恐見50美元", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261573/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261573/薪情曝光索尼影業CEO年薪近億竟是老闆的2倍", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261576/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261576/愛立信控小米侵權印度暫時禁售", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261579/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261579/ebay明年初擬裁員3000人", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261582/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261582/赴監院陳情台新金:財部違法", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261590/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261590/台新告財部曾銘宗:別搞太兇", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261595/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261595/fb粉絲封彭淮南神一樣的男人", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261598/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261598/大戶條款若廢中小型股喊衝", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261601/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261601/hTC智慧手環傳CES見客", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261607/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261607/國寶、幸福人壽標售逾5家買主探詢", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261613/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261613/吃到飽不停4G明年上衝1000萬戶", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261616/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261616/力晶:未來5年半導體成長由「上網」決定", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261621/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261621/油價崩爽到輪胎廠", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261628/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261628/財部買101股權卡在價格", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261633/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261633/經濟部長首度鬆口15日重啟貨貿談判", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261636/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261636/滅頂衝擊味全11月營收減2成", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261639/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261639/王永在14日告別式馬總統將出席", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261642/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261642/日圓貶中美晶明年好賺", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261648/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261648/台綜院上調經濟成長率今年3.36明年3.43", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261651/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261651/9成國人認同長照需求", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261657/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261657/4類型投資人明年投資教戰", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261660/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261660/第3方支付卡關詹宏志感傷", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261666/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261666/精元平板外接鍵盤明年營收佔比翻倍", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261669/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261669/屈臣氏台灣下季突破500店", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261675/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261675/南僑砸近千萬辦展重振台灣美食形象", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261678/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36261678/好創意你買單", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36262323/", + "http://www.appledaily.com.tw/appledaily/article/finance/20141212/36262323/露天拍賣年度熱搜第1名竟是EXO", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260928/頭等艙貴客特殊要求難滿足", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260935/跳蛋與扭蛋", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260938/Daydreamer's", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260941/我們都喝雀巢長大", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260947/年輕女傭的清白", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260952/已讀不回的病毒", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36260957/他在床上很神勇", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36261389/人間異語:追求性讓我找回生命動能", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262212/蘋論:天人交戰人定勝天", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262427/趙少康傳真:陳水扁放不放(趙少康)", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262433/", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262433/柯P的I-Voting為何失敗(白瑞傑)", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262437/自己的局長自己選(胡博硯)", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262440/推動社會住宅的3大關鍵(彭揚凱)", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262445/", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262445/蘋中信:「權責相副」很難嗎(劉靜怡)", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262452/每日一短蘋", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262454/新聞魔法", + "http://www.appledaily.com.tw/appledaily/article/forum/20141212/36262457/《蘋果論壇》徵稿", + "http://www.appledaily.com.tw/appledaily/article/headline/20141210/36256554", + "http://www.appledaily.com.tw/appledaily/article/headline/20141211/36258143/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141211/36259858/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36244538/聖誕趴踢女人心機戰前密集保養", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36244609/好驚人!史上最強「一擦毛孔飛縮12.5%」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260453/兵工廠二0五兵工廠設計研發的故事", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260516/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260516/陳宇風超體貼愛妻葉家妤入住知名月子中心", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260535/韓研究:不用藥搞定頂上困擾!", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260962/A3540跛婦顧癱夫辭工陷困頓", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260969/中風男獲63萬養4口家", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260973/【我的一句鼓勵】余姿音社工\r", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260976/保養廠技師踹客戶車發洩", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260983/簡訊漫遊遲未通害損失訂單", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36260987/買電腦預付萬元店家擅取消", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261389/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261389/人間異語:追求性讓我找回生命動能", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261427/今年聖誕我最亮眼,OUTLANDER晶讚聖誕樹揭幕!", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261437/跨年開蝦咪趴?來場狂歡電影趴吧!", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261450/天際探索話題發燒航空夢領航時代", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261456/果粉注意!!iPadAir2和iPadmini3$0起", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261462/《蘋果》聖誕搞怪變裝大賽大募集!就缺你一個,趕快EMAIL報名!", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261700", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261758/金髮狼襲胸3女「很刺激」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261765/剎車失靈垃圾車連18撞", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261768/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261768/阿兵哥車震少女書包避孕藥露餡", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261771/16刀殺女友惡男抄佛經逃死刑", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261774/博彩誆必贏非法吸金逾5億元", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261777/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261777/空姐掉行李警找回失物搶合照", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261780/我很不爽", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261786/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261786/「救黨」34藍委拱朱選主席", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261793/辣蘋果:表態竟這麼難(余艾苔)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261796/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261796/「航母殺手」沱江艦海測", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261799/陳德銘訪慈濟盼服貿能加快", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261802/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261802/選立委陳為廷:帳戶僅400元", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261806/扁家提6名醫入鑑定醫療團", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261921/造謠拒洗門風男殺婦判15年", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261929/假學歷騙高薪男獲判免賠", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261931/教唆誣女記者女主播被訴", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261934/法律信箱:當債務人購屋消滅時效15年", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261939/申訴榜首台灣大3連莊", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261945/海研五號船難確定人為疏失", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261948/明天下探11℃周日短暫回暖", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261951/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261951/三餐外食37歲女罹直腸癌", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261958/死前急救是折磨8成民眾寧放棄", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36261960/健康雲:剖腹產陰道鬆弛程度小", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262118/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262118/有感降價機票跌千元客運省7趴粥品減5塊", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262134/彭淮南看好明年工資增4%", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262139/民生品掀減價潮豬肉日貨降3成", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262148/中低收補充保費扣繳調高", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262151/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262151/勞工「周休二日工時40小時」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262156", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262156/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262156/走紅5年阿基師買9000萬屋", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262162", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262162/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262162/「阿基師是造神與毀神的經典」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262166/雨傘運動無懼清場200人被捕", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262176/改變香港「不再金錢至上」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262179/何韻詩站前線喊真普選", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262182/女大生跪禱「我很害怕」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262185/粉領撐住不走「等被捕」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262188/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262188/拿林益世照男蟲詐女500萬", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262200/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262200/「以為遇到真愛人生毀了」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262202/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262202/旗津跨港纜車拼亞洲最高", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262209/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262209/14歲孫中風劉泰英:疑毒油害的", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262212/蘋論:天人交戰人定勝天", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262216/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262216/擄人餵毒惡男性侵高三女", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262227/熱搜竄紅遠通負評多登榜首", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262235/瘋啥:平板比耐摔三星勝iPad", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262239/昨日《蘋果》被發現的錯與批評", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262243/《蘋果日報》最鄉民的影音頻道動即時", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262249/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262249/色老闆量3圍襲女胸臀", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262258/女大生控也被逼填三圍", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262261/黃世銘料能領1200萬退俸", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262265/今天我最美", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262268/北市勞動局長2人突退選", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262275/遴選惹議「盼柯自選局長」", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262308/小資聖誕套餐兩人700元有找", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262315/球星放鳥粉絲可退2千元", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262318/喜迎聖誕新北明辦踩街", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262321/「我沒錢坐小黃才開車」男子開車撞傷書記官", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262326/指控四海遊龍斷貨逼遷女店長吞藥抗議", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262331/每日動一句美國演員喬許布洛林", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262334/《蘋果》空拍金鐘清場時刻", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262336/雨傘運動這一天記住每一張臉", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262354/虎尾大掃除 雪恥全國第一髒汙名", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262356/", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262356/驚險全都錄街頭上演警匪追逐戰", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262361/女感情受挫投海 母泣:別留我自己活", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262369/賓士車緊黏貨車 駕駛控惡意擋車", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262374/每天一圓仔:媽媽壞壞就是不讓圓仔睡", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262376/喜事變喪事比熊犬剖腹6胎全夭折", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262379/女攀13樓頂欲輕身女警機警伸手救人", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262382/清秀少年當家開千萬金流賭場", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262384/八點檔女星陪長者猛落淚", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262389/罷免蔡正元連署達標可望進行投票", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262425/WeWillBeBack雨傘運動不結束", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262427/趙少康傳真:陳水扁放不放(趙少康)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262433/柯P的I-Voting為何失敗(白瑞傑)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262437/自己的局長自己選(胡博硯)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262440/推動社會住宅的3大關鍵(彭揚凱)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262445/蘋中信:「權責相副」很難嗎(劉靜怡)", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262452/每日一短蘋", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262454/新聞魔法", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36262457/《蘋果論壇》徵稿", + "http://www.appledaily.com.tw/appledaily/article/headline/20141212/36263277/【衝衝衝!蘋果日報好禮大方送200萬粉絲就差你一個】", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261964/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261964/摩納哥王妃誕下龍鳳胎", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261973/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261973/惹火北韓遭駭索尼修改新片", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261976/闖祕魯聖地留字綠色和平致歉", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36261979/No,No,No!", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262067/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262067/殘暴IS製手冊教性侵童奴", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262074/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262074/虐囚遭國際撻伐美關阿富汗監牢", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262340/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262340/男遞紙條給前面的人 「你女友出軌了!」", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262342/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262342/別讓魚兒不開心 海上漂27萬噸塑膠垃圾", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262344/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262344/辣椒粉襲獄卒13囚越獄2死", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262347/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262347/湖冰比玻璃還乾淨美的令人屏息", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262351/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262351/太美無法當警察?女告訓練營性騷", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262364/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262364/鴨子聽雷證人講1小時法官才知不是說英文", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262367/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262367/出賣閨密偷吃上海妹被修圖變賣淫女", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262372/南非烏龍手語翻譯員 現成勵志演說家", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262386/", + "http://www.appledaily.com.tw/appledaily/article/international/20141212/36262386/惡整小偷撇步美國人這麼做", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246395/塗鴉猴犀利旅館變街頭藝品", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246413/一張躺椅。改變她", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246427/餐具MIT!別有滋味", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246451/在家工作清新有勁", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246476/美女主持人夏慧麟吵著在家伸腿看電視", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246502/Mauviel銅鍋漂亮上桌", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246517/只是放木柴就好有家的感覺", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246530/想起住在國外才藝教室吸引阿ㄅㄟ", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36246792/古根漢溫泉舒身綠意娛心", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248233/廚具正妹SWEET甜美笑容+親切服務擄獲貴婦心", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248239/帥過頭:我就是黑心投資客", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248336/房市陷衰退藍燈今年最慘", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248344/今年房市代表字價格漲到「頂」", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248347/區域計劃毀農地環團喊刪", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248352/房市速報錄年漲7%澳洲房產吸台客", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248355/8月新竹縣實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248406/中和運動中心旁休憩機能拉抬詢問度", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248423/土城運動中心旁3字頭吸北市通勤客", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248436/淡水•南加州鄰居一家親", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248453/水湳向上早市居民「太好住了不想搬」", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248471/新一點利十甲黃昏市場旁1字頭價購屋買菜都輕鬆", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248487/苓雅/武廟市場交通休憩機能強婆婆媽媽最愛", + "http://www.appledaily.com.tw/appledaily/article/property/20141205/36248504/左營/自由黃昏市場上班族方便", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248635/基隆廟口店面1樓租金報酬率6", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248650/迪化街店面待售屋開價破億元", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248663/曾于菖熱忱服務賣厝兼搬家", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248675/藝術擺Q", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248687/神秘金工", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248699/清浴室酵素搞定", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248820/拉門的水漬走開!", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36248830/收租養地小商圈小本滾大錢", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249397/信義房屋中科國安店社區店貼近需求", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249413/C1~C3站商圈夜市機能最讚", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249424/C4~C7站低密度區國宅熱銷", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249432/黃奕家樂觀積極愈挫愈勇", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249445/9陷阱別被DM廣告呼攏了", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249492/行義路生活圈溫泉綠地優樂園", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249516/台北市單價80萬元以下熱銷個案", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249519/公園上璟面公七自然公園", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249546/新捷都千坪基地設施多元", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249562/小宅開門見灶增高洗手檯面化煞", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249698/東京港區10年中古屋供不應求", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249706/處理不點交先談判訴訟勞神傷財", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249713/新北市單價50萬元以下熱銷個案", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249716/索菲特戶戶雙面採光", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249732/中央都滙大樓透天複合住宅", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249748/草屯親水公園旁清幽環境優質居", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249777/台中市總價800萬元以上熱銷個案", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249780/捷運大東站旁透天500萬可入手", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249805/高雄總價800萬元以上熱銷個案", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249808/福懋樹河堤雙面景觀", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249824/春天裡整層主臥規劃", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249844/房貸利率總覽", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249848/豐域每層大面積露台", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36249864/綻美規劃孝親套房", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250457/單價28萬吸客小坪新案銷9.5成", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250463/關島300萬元屋賣2倍價", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250468/女跨足土地開發曾8個月沒收入", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250472/巢運基金會「明年再夜宿」", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250474/8月桃園縣實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250682/朱的寶飾故宮國寶穿上身", + "http://www.appledaily.com.tw/appledaily/article/property/20141206/36250718/房蛹破繭而出冬天過春來了!", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252119/名家專欄房市無法脫離現實需求面", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252123/房仲先鋒科達房產集團董事長賴建程", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252153/房仲被控賺價差坑10萬", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252162/讓客戶住新家房貸專員超拼", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252166/賣屋刊自售網省成本", + "http://www.appledaily.com.tw/appledaily/article/property/20141207/36252171/8月新北市實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141208/36253131/建商巡禮:奧斯卡建設父子聯手擘劃", + "http://www.appledaily.com.tw/appledaily/article/property/20141208/36253150/居家風水:工作室風水大解析", + "http://www.appledaily.com.tw/appledaily/article/property/20141208/36253634/新北重劃區開價衝6字頭", + "http://www.appledaily.com.tw/appledaily/article/property/20141208/36253646/台中「單元2」成富人新聚落", + "http://www.appledaily.com.tw/appledaily/article/property/20141208/36253657/大內高手「做房仲回家都在哭」單親媽熬出一片天", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254688/房地合一課稅5~45奢侈稅將配套退場", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254778/封面故事帝寶褪色豪宅戰國時代來臨", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254788/封面故事宏盛帝寶寫下豪宅史傳奇", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254801/封面故事被標籤化的帝寶M型社會下的衝突圖騰?", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254813/封面故事笑看帝寶風水", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36254830/封面故事我能取代帝寶!", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36255339/礁溪溫泉宅開價翻倍漲", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36255346/自住客撐買盤佔逾6成", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36255351/興隆公營宅曝光「豪宅規格」", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36255357/9月台北市實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141209/36255360/全國獨家成交快訊", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36256601/群耀V1大竹住宅指標案", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36256777/海外地產躋身入主倫敦房產的黃金年代世界富豪的藏寶盒倫敦", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36256797/財經動向限購令鬆綁中國房市撥霾見日", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36257877/怕房地稅店面降千萬求售", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36257883/淡水萬戶待售賣壓最大", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36257888/都更健檢夯北市明年續辦", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36257891/好宅周報住宅東北方擺鹽燈有益脾胃", + "http://www.appledaily.com.tw/appledaily/article/property/20141210/36257895/9月高雄市實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36259326/區域房市逆勢走強小宅當道!", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36259331/區域房市不畏房市利空政策雙北小宅異軍突起", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36260033/淡水海景宅港客買百戶", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36260040/企業主尋總部6成看好內湖", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36260045/型男房仲拼6年菜鳥變店長", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36260049/房市速報錄創見再購「國寶」單價121萬較前年低", + "http://www.appledaily.com.tw/appledaily/article/property/20141211/36260053/8月新竹市實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260493/建築HOUSE收藏『好事』聯勤三喜", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260559/台灣常用電地暖木地板專用施工快", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260599/石築南法莊園小石牆伴午茶", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260619/小裝修夢想餐廳達陣", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260634/katespadenewyork紐約潮牌台灣買得到家飾品", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260650/住進飛遜的家拜兒子之賜", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260671/好有朝氣哪家公司?", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260690/拼木厚工娃娃音樂盒惹人愛", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260709/黑壓壓的重金屬fu", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36260730/奇品軒閣機能綠意大器鋪陳舒適豪墅", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36261498/台中興大特區最美的河岸建築", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36261508/易家大禾大中壢稀有2200坪大基地", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36261518/帥過頭:選後是進場時間點買氣會愈來愈好!", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36261525/區域房市:總價千萬元內小宅順銷", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36261542/區域房市:總價友善台中小宅搶客", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262399/北捷280億聯開案開賣卡關", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262406/陶朱隱園隔震墊亞洲最大", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262412/開朗showgirl轉戰管家秘書", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262416/房市速報錄北市府7年拼1179公營宅", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262418/9月台中市實價登錄價格", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262421/全國獨家成交快訊", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262462/文山指南路三段優質學區房價3字頭", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262476/板橋溪崑區總價千萬買3房大樓", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262489/中和首見庭院景觀宅比利時", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262505/內湖安泰街3字頭價好誘人", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262520/黎明/教師新村環境好退休族夢幻優選", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262535/4國宅卡好位房價低自住出租兩相宜", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262547/鄉林新月灣飯店級設施在家度假", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262559/微笑公園商圈/捷運相挺1字頭房價吸睛", + "http://www.appledaily.com.tw/appledaily/article/property/20141212/36262573/三民親子公園愛河河岸以南透天600萬起", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36260464/兵工廠二0五兵工廠設計研發的故事", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261838/高士特無故解約3車手怒討獎金", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261849/車隊批違紀:獎金均分其他人", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261853/塞砲換殷仔官網喊燒", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261863/蘋果體育粉絲團蘋果運動超級吧", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261866/林哲瑄砲轟小朋友回味打擊下毒手", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261880/想返中職倪福德:帶回新觀念", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261883/楊鈞場內轟徐爺爺美濃贏了", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261887/仁善龜山4強碰頭桃園篤定爭冠", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261892/游霆崴108球完投西苑驚險晉級16強", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261894/咆哮甜瓜菜鳥造反老大嗆開扁尼克10連敗", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261903/Kobe打主控豪:我應不在場上", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261907/威金斯首場雙10狼嚎止6連敗", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261910/浪花兄弟破火箭哈登砍34分白忙", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261914/達欣撂狠話本周沒拿兩勝禁假", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261918/程思嘉參戰8台將開打", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261985/至少拍銅陳思羽21歲以下組晉4", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261991/蘋果《運彩王》誠徵投注心法!", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261993/美國職籃賽程12月13日(台灣時間)", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36261999/歐洲冠聯賽戰績", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36262002/西甲聯賽12月13日賽程(台灣時間)", + "http://www.appledaily.com.tw/appledaily/article/sports/20141212/36262005/德甲聯賽12月13日賽程(台灣時間)", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36258048/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36258048/LOTTO輕量旗艦鞋款", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36258064/【好心有好運—奧比斯慈善獎券】", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260503/金門建縣百年套書面世百年榮耀•幸福金門", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260529/電玩宅速配《哥吉拉》", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260531/電玩宅速配《祕境探險4:盜賊末路》", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260546/聖誕麵包甜蜜紮實", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260579/潘那朵尼果香濃郁", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260756/德式肉排酥香迷人", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260769/樹幹蛋糕甜蜜暖心", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260785/餅乾小點馨香撲鼻", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260802/美式火雞肉厚紮實", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260832/造型餅乾可愛討喜", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260841/水果磅蛋糕紮實香濃", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260858/薑餅拐杖糖可愛討喜", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260873/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260873/烘豆趣從識豆開始", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260899/自家烘焙平底鍋搞定", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260914/配方豆秀專屬風味", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260990/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36260990/彩妝保養品搶敗4.5折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261019/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261019/百貨周年慶倒數女鞋1折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261032/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261032/帽子占卜吃人夠夠指數", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261041/大樂透解盤:091114283645勝出", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261043/來找碴", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261048/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261048/老夫子搞怪新風貌自我陶醉", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261051/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261051/家用品優惠下殺5.3折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261080/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261080/禦寒羽絨衣搶購7.4折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261093/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261093/聖誕玩具採買3.7折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261118/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261118/品牌女裝下殺2折起", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261128/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261128/二次人生燃燒吧騎單車7日環島想證明自己還行", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261158/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261158/瑞典籍306匹性能旗艦登台VolvoS60V60T6正式售價出爐", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261179/精品電視瘋4K好看更動聽", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261203/Google年度熱搜臉書奪冠4大網購列前10名", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261210/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261210/網購個人年菜首登場早鳥優惠起跑下殺5折", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261239/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261239/泰國直擊手機開戰車軍裝辣模陪玩", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261264/懷舊風情打造歐式優雅", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261283/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261283/冬日高領小臉修容術大餅臉byebye", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261324/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261324/多吃Omega-3食物讓眼睛水汪汪", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261341/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261341/Detoxwater難排毒營養流失僅添味", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261347/【吃喝玩樂】逆轉腎護腎7必知", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261350/走訪香港型格飲品店", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261383/KBOOK《火星任務》抽獎活動", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261394/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261394/台中遊逛萌樂園", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261476/蘇格登大師精選x世界名廚感官美饌–全感品酩體驗精彩奇幻呈現", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36261489/信義區發生神秘事件蘋果好奇獨家揭密", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36262338/", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36262338/80年代西洋玉女你還記得幾個?", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36262639/日本超人氣女子天團AKB4812/13即將現身Nikon攤位", + "http://www.appledaily.com.tw/appledaily/article/supplement/20141212/36262956/掉髮分真假?客製化治療正夯", + "http://www.appledaily.com.tw/realtimenews/article/3c/20141212/523270/打開這個功能 i6不怕沒電找不到", + "http://www.appledaily.com.tw/realtimenews/article/3c/20141212/523273/蘋果「保護殼」新標準 要1公尺防摔", + "http://www.appledaily.com.tw/realtimenews/article/beauty/20141212/523160/辣妹為何「上面穿多下面穿少」宛宛兒有新解", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/522704/歐巴唱進大學當教授 粉絲幻想搞師生戀", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/522930/駁包養 阿基師:亂講!相信我人格", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523014/女主播保胎棄化療癌逝 黃安:不理性", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523034/官三代女友生日 張艾嘉兒辦趴甜啾咪", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523036/微風女團小露酥胸 輕鬆收服男粉絲", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523047/【更新】上原亞衣被KO惹 B咖AV女優吹____", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523057/小茉莉任人掐E奶 做公益撇整形傳說", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523061", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523061/淫片港姐遭婉君威脅 性愛對話恐流出", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523067/李敏鎬斷腳指甲討拍拍 嘟嘟臉腫麼了", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523077/史上最強老爸3度出馬 保證女兒不再被抓", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523078/楊伊湄哀怨不順嚷報應 又遭鄉民噓翻", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523080/張小燕李艷秋雙女王 隔30年合開《密室》", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523085/《貧民百萬富翁》佳偶6年情逝 宣告分手", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523098/六月提前破水生啦!兒跟李易一個樣", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523100", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523100/", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523100/【獨家】阿基師親口表示:退出媒體!", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523100/阿基師親口表示:退出媒體!", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523103/楊丞琳讚中國小生「很合拍」 ", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523133/", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523133/BY2妹哈幼齒婚頭 深夜急嫁賭王之子", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523142/高倉健臨終前4天 5千字遺書曝光", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523145/金球提名喜上加喜 綺拉奈特莉懷孕啦", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523147/48歲香港豔星高低奶 露出OO反高潮", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523167/吳君如來台搞淫戲 舞男含冰舔爆女星胳肢窩", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523172/巨乳優香斷開父女戀 假戲真做愛上鮮肉男", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523194/徐玄即刻救援 代孕婦賣唱 ", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523210/1/", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523210/阿基師GG的真相!馬總統死亡之握+1", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523217/許瑋甯超短裙點燈 示範圍巾七種打法", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523219/超閃der!中島美嘉秀訂婚鑽戒", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523240/女星只吃1餐 成功脫脂7公斤", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523250/阿雅吃飽太閒 翻出舊照嚇自己", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523290/有沒有蕭亞軒做酒店妹的八卦!?", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523316/蛇姬變爆乳SM女王 燒到破表吊點滴", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523326/黃仲崑抗禿 Lulu怕下垂", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523334/小百合美聲開唱 大百合一日限定合體啦!", + "http://www.appledaily.com.tw/realtimenews/article/entertainment/20141212/523342/炎亞綸揪PopuLady處女「呼」!", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/522981/李嘉欣幻化黑魔女 美洲豹騷動酥胸", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523030/慢了大半年 阿Sa撞衫志玲姊姊 ", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523031/鄭秀文穿繽紛潮衫 「打起精神上班去」", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523053/尹恩惠撞衫米蘭達 輸給超模認了吧", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523058/維密天使無內褲高衩裙 完勝豐臀金腰內肉", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523060/太香豔!紅底鞋王賣bra 找來首席舞孃", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523107/真的!4歲娃 當J.Crew設計師", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523108/辣肉全都露!薛凱琪成背影殺手", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523202/到暑五秒賣衫 用肌膚貼嫩男", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523247/惡魔秘書蕾絲鑽石配 完美示範女人味", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523268/長谷川潤耍心機 當媽照賣性感唇", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523292/沒多一個零! 6億寶格麗祖母綠項鍊登台", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523304/超凍感!俯式冰橇衝進Moncler櫥窗", + "http://www.appledaily.com.tw/realtimenews/article/fashion/20141212/523317/MCM哭了 另類代言人太陽花女神", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/522848/【動新聞】沙國囂張 油價狂洩40美元不遠了", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523000/馬雲登亞洲首富 李嘉誠:幹得好!", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523039/【動新聞】財經ShowgirlMaggie 苗條愛健身", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523051/【動新聞】等廢大戶條款 中小型股先飆", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523056/阿拉比卡墜空頭!要咖啡降價?別想了~", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523081/【更新】益智節目結合App 超刺激!", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523094/【更新】反大戶條款 林伯豐:禿頭就禿頭吧!", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523095/hTC水管相機RE優惠價4990元 延長至明年2/28", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523101/【更新】明年房市景氣 新光銀看淡", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523159/陳冲談證所稅 「莫忘初衷」", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523232/這個「油」漲逾18 明年還會漲", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523235/【更新】駱錦明伉儷耶誕點燈 台工銀今年獲利成長5成", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523239/從天堂到地獄 比特幣年跌7成", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523242/不滿韓航千金 南韓民眾怒吃堅果!", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523260/F-欣厚馬國跨足生質燃料廠", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523279/ITA2降稅清單若定 經部:台GDP可略增", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523280/台新再發聲明回擊財部惡意曲解合約", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523296/陌陌掛牌首日大漲26 市值逾900億", + "http://www.appledaily.com.tw/realtimenews/article/finance/20141212/523367/GUCCI人事大地震 時尚情侶檔下台", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523045/該票選的是事,不是人!", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523069/【想想論壇】東德轉型正義系列底層工人寫革命史:民主文物館靈魂人物賽羅(下)", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523166/【民報】南方朔:國民黨見了棺材也不落淚!", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523305/黃袍加身?還是復行視事?", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523311/【民報TOTTORO專欄】馬桶計劃夜未央", + "http://www.appledaily.com.tw/realtimenews/article/forum/20141212/523364/【公庫】跪求勞動部,留口飯給我們吃!", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523063/", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523063/一點也不重要 但這人講3遍被推爆", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523065/先別管iPhone了! 你聽過iBento嗎", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523082/朱立倫選黨主席 哆啦A夢哭哭了", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523091/貨品倒了堅不放手 工人「青蛙蹲」被拋飛", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523182/【更新】倒數第二名有獎麵粉22公斤一袋", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523301/夢幻極品 保時捷911GT3搶先試駕", + "http://www.appledaily.com.tw/realtimenews/article/fun/20141212/523357/這5項都中 恭喜!你找對人了", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/522774/【更新】爸媽嗑藥瘋狂做愛12天 4歲兒險被餓死", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/522857/", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/522959", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/522959/77年愛情約定 93歲婦來台為見他", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/522960/【更新】強國情侶空中打架辱空姐 曼谷飛南京客機折返", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523028/金鐘清場行車暢順 港官員:對經濟是正面訊息", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523043/金鐘通車後馬路 「公民抗命」字句仍在", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523050/【更新】佔領行動最後陣地 銅鑼灣下周清場", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523059/日本公布2014代表漢字 「稅」", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523064/搞社運都年輕人? 九旬翁獲釋仍要再戰", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523076/【更新】情侶大鬧機艙被捕 網友:「就在曼谷斃了吧」", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523092/加拿大溫哥華島4.4地震", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523106/避免政府關門重演 美眾院通過11兆預算案", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523114/PornHub調查男人持久度 北京嚇嚇叫", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523118/運匠女友險被性侵 上門理論被砍傷", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523124/港立法會清場 最快下周一執行", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523127/無聊少年拿空氣槍亂瞄 差點被警察擊斃", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523134/日本連日大風雪 恐影響周日大選投票", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523153/威而鋼又有新用途 可能有助老人失智", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523165/客機空中盤旋90分 機上女客嚇到尖叫", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523176/劣質肉渣疑雲 麥當勞找《流言終結者》自清", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523201/【更新】長頸鹿誤中捕獸夾 護生部隊麻醉搶救", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523214/曾經歷六四 北京人被捕仍挺雨傘運動 ", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523231/破產政府養不起 老虎飄洋過海展開新生活", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523236/", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523236/南韓驚現恐怖碎屍案 凶嫌與女死者均中國人", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523274/銅鑼灣民眾問何時清場 警回:看4點記者會", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523286/深圳好色女局長坐牢 買通醫生保外就醫", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523288/「大肚子一樣撞死你」 孕婦遭惡駕駛拖行", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523289/北大方正賄賂令計劃家族 幫令妻入籍日本", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523295/寒夜女嬰被棄垃圾桶 好心人聞聲救命", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523297/3男嫖1女 女嫌時間太久慘遭殺死", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523306/暴風雨襲舊金山 15萬戶停電多處淹水", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523307/很諷刺~方正集團北大持股70 強調做人方正", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523325/【更新】明年起 挪威政府不再補貼民眾獵殺海豹", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523328/想寄東西上月球? 1萬4圓夢", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523338/歌手何韻詩獲釋感想 必須進入荒謬體制挑戰", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523346/英國幸運司機只花50元 買4房3廳附地下室", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523352/英男「沙發旅行」 32美女大方借宿", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523355/百人轉戰旺角「購物」 警舉黃旗警告", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523360/西班牙堅持課稅 谷歌關閉新聞服務", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523361/阿嬤手舉電線半小時 護300車行駛", + "http://www.appledaily.com.tw/realtimenews/article/international/20141212/523363/黃之鋒獲選年度人物 法新社:民主不容忽視", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522876/【動即時】心寒!年終200元 尾牙僅湯圓", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522922/【更新】穿山甲寶寶滿月 保育員許願「要大便喔!」", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522938/", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522938/《蘋果》找到了 愛心金錢豹姊", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522938/【獨家】《蘋果》找到了 捐外套的愛心豹姊", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522957/", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/522957/【更新】北一女111校慶 柯P女兒表演啦啦隊", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523024/【更新】林佳龍開支票 打造多功能會展中心", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523032/資優生考前視茫茫 腦子長腫瘤作祟", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523048/【更新】金大生當實習地勤 「幫自己開票真有趣」", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523062/宜縣因應流感防疫 擴大施打疫苗對象", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523071/【更新】經常想上廁所 頻尿被當摸魚好困擾", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523079/今年多重要? 22張照片讓你知道!", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523112/台電多花60億買燃料?台電:報導不實", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523120/厲害!中研院院士錢煦獲羅傑•雷維爾獎章", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523121/【更新】二手衣義賣 香奈兒洋裝1200起標", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523123/阿基師傳引退 qn:巧遇嘴麻和煮菜是2碼子事", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523130/服務學習打分數?教育部:不可能", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523131/漢堡王確定月底喊漲 套餐漲價4至9元", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523139/理想冰箱與冷氣品牌 日立均奪冠", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523149/【四方報】新二代小學生短短幾句作文 竟讓老師感動不已", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523156/【動新聞】人車爭道顧人怨 國中單車社考照", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523157/【更新】熱氣球飛進兆豐農場 升空800米要拚元旦曙光", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523162/阿基師請長假?福容飯店:還不知此事", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523170/嘉義市國際管樂節19日開幕20日踩街", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523174/接科技部長?李世光:沒有這回事", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523180/重建美食王國 台灣美食展明年7月復出", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523181/【苦勞網】賴香伶接受遞補1214上場選局長", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523189/新北耶誕圍巾限量送 許瑋甯教你如何穿搭", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523190/花海節抽獎有「詭」 民眾質疑黑箱作業", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523205/騙很大? 高島屋蘋果「28入特價99元」", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523220/Flickr跨裝置 iPad版服務今上路", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523310/【晴雨娃】冷不停!明天還是冷 下周二寒流到更冷", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523323/12月12日台灣彩券開獎號碼", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523329/市議員探癌童 送旅行箱要她快康復去旅行", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523345/越捷航空今首航 桃機熱舞吸睛", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523358/社團帳號遭封鎖 網友疑臉書想收費", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523362/【民報舒國治專欄】生日快樂!小津導演", + "http://www.appledaily.com.tw/realtimenews/article/life/20141212/523366/【公庫】與社會交往的藝術—港台國際交流展", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522772/【更新】誇張! 馬尾女童遭捉弄竟罵「X你娘」", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522782/【更新】疑因感情因素 男子跳後勁溪", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522845/【更新】惡主人丟狗!官員硬拗:是讓狗跑步", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522861/【更新】RCA受害員工求償27億 明年4月宣判", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522862/【更新】清晨烈火 八旬廟公燒成焦屍", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522868", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522906/【動新聞】2樓鐵捲門未開 國中生攀女兒牆墜樓", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522907/【更新】為穿婚紗埋線瘦臂 準新娘竟冒30膿包", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522911/【更新】太陽花學運 北檢傳訊帆神、戰神", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522921/【更新】誘騙外籍女下海 24小時當性奴剝削", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522985/撬機車坐墊偷錢 3嫌偷錢還盜領30萬", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522998/【更新】潘安文宣案 起訴羈押被告全釋回", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/522999/【更新】茱麗葉移至水牛學校 打開生命新一頁", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523007/【動新聞】原裝娜娜回不來了 充氣的底加", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523011/【更新】服藥失控攻擊警消 警開槍制伏", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523016/【更新】宜蘭特教高一男生 不幸溺斃五結鄉五股圳", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523033/【更新】必贏集團吸金5億 3幹部收押禁見", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523040/購物忘拿回信用卡 被店員盜刷", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523042/警破跨國毒品案 阻1公噸原料流入市面", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523049/擅贈記憶體促銷 燦坤員工被炒魷魚", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523054/【更新】停車起糾紛 5煞追進急診室打人", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523055/吵架女友亂報案 好吧!害男友被逮", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523073/1歲女童淪出氣筒 慘遭失業男打成植物人", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523093/少女問師「做愛會懷孕嗎?」 揭與役男發生性關係", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523115/【更新】撞路燈受傷 神回「命一條」不就醫", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523116/精液辯稱是精油 警破情色養生館", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523119/連線山寨法院騙密碼 女台商遭詐6000萬", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523141/分局旁酒駕肇逃 警狂追百米逮人", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523144/愛家男裝肖維 強姦搶劫樣樣來", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523146/女女戀被阻撓 護理師痛毆女友母親", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523151/遷戶籍投票 中壢仁德里長妨害投票法辦", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523158/【更新】機車超車越雙黃線 男騎士遭砂石車輾斃", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523161/警回馬槍逮人 狡獪嫌睡夢中落網", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523169/八旬母只給30元 不肖男放火燒屋", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523178/女嬰嗆奶臉發青 警火速護送就醫", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523184/女騎士鑰匙掉水溝 警察哥哥幫妳勾起來", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523187", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523187/小三進家門氣跑元配 夫懊悔燒炭", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523187/小三進家門氣跑元配 花心夫懊悔燒炭", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523188/失智翁離家失蹤 警調監視器助尋回", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523211/脫下有色眼鏡 來看酒店幹部行善告白", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523216/人壽公司總監過世 義女認祖歸宗勝訴", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523221/與女友上汽旅 完事後男暴斃亡", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523237/【更新】殺人犯躲大陸18年 今晚遣返回台", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523257/客房播TVBS新聞 涵碧樓判賠6萬", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523261/疑女友另結新歡 城隍廟前殺人遭訴", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523287/議員丈夫賄選 登門拜訪:你家有幾票?", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523300/女喝茫數度仆街 投宿賓館後氣絕", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523308/越勞集體唱K兼拉K 冒名應訊遭警識破", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523318/失智男搭錯車疑凍死路旁 家屬控警:怎不多一點關心", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523344/臉書罵作家「卑鄙小人」 判賠3萬元", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523350/", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523350/騎士撞安全島 飛30公尺身亡", + "http://www.appledaily.com.tw/realtimenews/article/local/20141212/523368/【公庫】教師工會要勞動人權勞動局長給問嗎?", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523233/【更新】「行政指導錯誤」 扁保外就醫爭議羅瑩雪挨批", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523252/【更新】達欣浪費25分領先 靠罰球勝金酒 ", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523285/【黑豹旗】宋文華強壓美和 平鎮順利晉8強", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523360/西班牙堅持課稅 谷歌關閉新聞服務", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523361/阿嬤手舉電線半小時 護300車行駛", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523362/【民報舒國治專欄】生日快樂!小津導演", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523363/黃之鋒獲選年度人物 法新社:民主不容忽視", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523364/【公庫】跪求勞動部,留口飯給我們吃!", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523366/【公庫】與社會交往的藝術—港台國際交流展", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523367/GUCCI人事大地震 時尚情侶檔下台", + "http://www.appledaily.com.tw/realtimenews/article/new/20141212/523368/【公庫】教師工會要勞動人權勞動局長給問嗎?", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/522912/【更新】扁何時可保外就醫 羅瑩雪:我沒時間表", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/522935/【更新】峰迴路轉 賴香伶將加入勞動局長遞補遴選", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/522947/【更新】內閣制削總統權 朱立倫搶黨魁推修憲公投", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/522953/【更新】朱立倫宣布參選黨主席 幕僚中午低調完成領表", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523009/【更新】鄭文燦赴高雄取經 陳菊猛誇", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523025/【更新】朱立倫提修憲 鄭文燦:歡迎跟進民進黨", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523066/不滿未被重視 原民聲明擬辭柯P市政顧問", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523068/朱立倫參選黨主席 妖西:不抄黨產甭談改革", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523070/​陳德銘顯疲態打瞌睡 餐廳吃飯遇「火警」", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523083/自稱柯P首席幕僚 傳大鬧熱炒店遭毆", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523089/【更新】請益老市長 李登輝勉柯P:謙卑、冷靜、忍耐", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523096/柯P入開發教? 李柏鋒:獨裁者炫耀效率", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523128/修憲公投綁總統大選 朱預計:2020年實施內閣制", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523136/王金平黨籍案 朱立倫暗示上任將撤告", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523143/朱立倫參選黨主席 吳敦義:歡迎與感謝", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523164/​【更新】鄉民詞彙大考驗 毛揆只知道「婉君」", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523171", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523171/扁保外就醫聲明異議 高院駁回", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523175/陳德銘與嚴長壽會面 大談當代兩岸教育差異", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523177/", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523177/​參訪木頭工房 陳德銘:木頭不是都被我們買光了?", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523209/【民報】台大教授張麟徵:朱立倫「風派」立委不會聽他的", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523212/毛治國:我有選擇 不會接受這個工作", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523223/​陳德銘訪台東 遇法輪功成員場外抗議", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523228/【更新】林佳龍拜會林明溱 10字箴言談跨黨合作", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523233/【更新】「行政指導錯誤」 扁保外就醫爭議羅瑩雪挨批", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523241/陳水扁入獄、就醫 懶人包一次看懂", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523243/阿扁聲明異議被駁 陳致中要法務部面對", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523244/陳菊探扁 籲盡速讓扁保外就醫", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523245/【民報】三大面向看朱立倫「黨主席大冒險」", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523253/​陳德銘訪台東博物館 館長:三千年前早已通過服貿", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523256/九合一選舉 李登輝兩度強調:民進黨沒有贏", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523259/陳致中臉書PO文 陳總統病情不能再拖", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523265/胡志強不參選黨主席 表態支持朱立倫", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523266/台東縣長做東道主 宴請陳德銘尷尬握不到手", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523293/【沃草】毛治國首次赴立院!台聯立委佔主席台:ITA是黑箱服貿翻版", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523320/羅瑩雪為扁開巧門遭打臉 法務部槓高院", + "http://www.appledaily.com.tw/realtimenews/article/politics/20141212/523330/【民報】百日戰爭秘辛林智堅用LINE決策強攻", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/522978/【更新】不行! 別輸給冷天氣", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523125/這兩種東西不是好捧油 也不是親戚喔", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523186/180cm代銷帥哥 時機歹仍狂賣新案", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523208/1.5桶金當英國包租公 小資也OK ", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523230/又快又安全 德國車庫門和車一樣強", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523238/房仲逆襲 管委會收帶看費遭控逃稅", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523269/毛治國踹共! 巢運要求年底前會面", + "http://www.appledaily.com.tw/realtimenews/article/property/20141212/523324/非洲孩童義演 感謝台灣助養人", + "http://www.appledaily.com.tw/realtimenews/article/recommend/20141212/523160/", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523099/【徐生明少棒】美濃6局下被大逆轉 小球員哭得好慘", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523155/【黑豹旗】隊長帶頭衝 南英險勝興大附農晉8", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523213/【徐生明少棒】徐展元客語播球賽 明年還要!", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523215/中華職棒公司清倉 各式商品20日俗賣", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523229/國際桌總年終總決賽 陳思羽U21女單封后", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523234/【徐生明少棒】李灝宇開轟終結比賽 龜山國小強勢奪冠", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523252/【更新】達欣浪費25分領先 靠罰球勝金酒 ", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523285/【黑豹旗】宋文華強壓美和 平鎮順利晉8強", + "http://www.appledaily.com.tw/realtimenews/article/sports/20141212/523340/【更新】富邦擊敗裕隆 拉出3連勝", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/522884/【更新】辣模為男友守貞 豈料他對獄友「插菊」", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/522973/【更新】警逼民拆屋 他就讓「公權力改道」", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523046/你會玩「彈簧圈」? 神人影片教你這才叫玩", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523075/可愛貓頭鷹凍僵落地 吹過暖氣活蹦亂跳", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523097/1795年時空膠囊 麻州議會基石挖出", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523122/【更新】自己的奶自己揉 日美胸達人創「不求人按摩爪」", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523222/金髮女師藉口看影片 性侵13歲男孩得逞", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523248/女性好康來了! 精壯男大生都在校園裸奔", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523275/嚇死人 公園水池跳出一隻河童", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523315/氣死人聖誕節特展 票價1千24小時閉幕", + "http://www.appledaily.com.tw/realtimenews/article/strange/20141212/523353/立當鋼鐵人? 男猛吞金屬剖腹開刀13次" +] \ No newline at end of file diff --git a/tests/models/Crawler/BCC/Crawl.test b/tests/models/Crawler/BCC/Crawl.test new file mode 100644 index 0000000..7dcd89a --- /dev/null +++ b/tests/models/Crawler/BCC/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_BCC::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_BCC::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/BCC/Parse.test b/tests/models/Crawler/BCC/Parse.test new file mode 100644 index 0000000..09b3621 --- /dev/null +++ b/tests/models/Crawler/BCC/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_BCC::parse (2470299.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/2470299.html'); + $result = Crawler_BCC::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/2470299.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/BCC/data/2470299.html b/tests/models/Crawler/BCC/data/2470299.html new file mode 100644 index 0000000..86359dc --- /dev/null +++ b/tests/models/Crawler/BCC/data/2470299.html @@ -0,0 +1,782 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + 中國廣播公司全球資訊網 + + + + + + +
                    + + + + + + + + + +
                    + +
                    +
                    + + +
                    +
                    +
                    + + +
                    + +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    + +
                    + + + +
                    + +
                    +
                    +
                    +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    + + + + + + + + + +
                    + +
                    + + +
                    +
                    + + + + + + + + + + + + + + + + + + + +
                    + + +
                    + + +
                    + +
                    強烈大陸冷氣團明發威 愈晚愈冷
                    +
                    + +
                    +
                    2014/12/11 18:58 報導
                    +
                    +
                    + + +



                    + +
                    + +
                    字級大小:
                    +
                    + + + + + 受強烈大陸冷氣團影響,明天白天北部低溫約只有13、14度,南部約17到19度,明晚溫度將持續下降,預計到十四號的白天才有稍微回升的趨勢。

                    中央氣象局表示,明天強烈大陸冷氣團影響,中部以北及東北部氣溫較低,其他地區早晚氣溫亦低,而明晚低溫會再下降。

                    降雨方面,明天台灣北部及東半部地區有短暫雨,中南部地區及澎湖、金門、馬祖亦有局部短暫雨。

                    氣象局指出,大陸冷氣團在明天到十四號清晨影響台灣最為明顯,最低溫預計落在13、14日清晨,中部以北低溫可能降到11至13度,南部低溫也只有14、15度左右,整體氣溫要到14日白天後才有稍回升的趨勢。

                    氣象局表示,14日白天到15日大陸冷氣團減弱,各地氣溫將會再回升,不過從16日開始,新一波冷空氣又將南下,17日起影響台灣,這波冷空氣強度比上一波強,預計會來到強烈大陸冷氣團的等級。 + + + +
                    +
                    +
                    分享:
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    +
                    + +
                    +
                    點閱:208次
                    +
                    + + +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    + + + + + + + + + +
                    + + +
                    + +
                    + + +
                    +
                    + + + + + + + + + + +
                    時間:01:02~02:00/節目:新聞大解讀(重播) + + +
                    + + +
                    +
                    + + + + + + + + +
                    +
                    + +
                    + 搜尋 +
                    +
                    +
                    + + + + + + + + +
                    +
                    +
                    點閱排名
                    + +
                    +
                    + +
                    +
                    1
                    + +
                    點閱:1,272次
                    +
                    + +
                    +
                    2
                    + +
                    點閱:454次
                    +
                    + +
                    +
                    3
                    + +
                    點閱:302次
                    +
                    + +
                    +
                    4
                    + +
                    點閱:263次
                    +
                    + +
                    +
                    5
                    + +
                    點閱:208次
                    +
                    + +
                    +
                    6
                    + +
                    點閱:186次
                    +
                    + +
                    +
                    7
                    + +
                    點閱:182次
                    +
                    + +
                    +
                    8
                    + +
                    點閱:179次
                    +
                    + +
                    +
                    9
                    + +
                    點閱:174次
                    +
                    + +
                    +
                    10
                    + +
                    點閱:174次
                    +
                    + +
                    +
                    + +
                    + +
                    + + +
                    + +
                    +
                    + + + + + + + + + + + + +
                    + + +
                    +
                    收聽頻率
                    + +
                    +
                    +
                    +
                    AM648
                    +
                    台北、桃園
                    +
                    +
                    +
                    AM882
                    +
                    新竹
                    +
                    +
                    +
                    AM1413
                    +
                    苗栗、埔里
                    +
                    +
                    +
                    AM720
                    +
                    台中、彰化、南投
                    +
                    +
                    +
                    AM1350
                    +
                    嘉義、雲林
                    +
                    +
                    +
                    AM1296
                    +
                    台南
                    +
                    +
                    +
                    AM864
                    +
                    高雄、屏東
                    +
                    +
                    +
                    AM630
                    +
                    宜蘭
                    +
                    +
                    +
                    AM819
                    +
                    台東
                    +
                    +
                    +
                    AM855
                    +
                    花蓮
                    +
                    +
                    +
                    AM1116
                    +
                    玉里
                    +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + +
                    +
                    + 本網站內容屬於中國廣播公司全球資訊網所有,非經允許,不得轉載 All Rights Reserved.
                    + 台北市中山區松江路375號 + + 廣告業務聯絡 + + 客服信箱 + + 關於中廣 +
                    + + TEL:886-2-25019688
                    + Broadcasting Corporation of China No.375, Song Jiang Rd., Taipei, Taiwan, R.O.C. +
                    +
                    Design by NEWMEDIAMAX
                    +
                    +
                    + +
                    + + diff --git a/tests/models/Crawler/BCC/data/2470299.json b/tests/models/Crawler/BCC/data/2470299.json new file mode 100644 index 0000000..efc3ac9 --- /dev/null +++ b/tests/models/Crawler/BCC/data/2470299.json @@ -0,0 +1,4 @@ +{ + "title": "強烈大陸冷氣團明發威 愈晚愈冷", + "body": "受強烈大陸冷氣團影響,明天白天北部低溫約只有13、14度,南部約17到19度,明晚溫度將持續下降,預計到十四號的白天才有稍微回升的趨勢。\r\n\n 中央氣象局表示,明天強烈大陸冷氣團影響,中部以北及東北部氣溫較低,其他地區早晚氣溫亦低,而明晚低溫會再下降。\r\n\n 降雨方面,明天台灣北部及東半部地區有短暫雨,中南部地區及澎湖、金門、馬祖亦有局部短暫雨。\n\n 氣象局指出,大陸冷氣團在明天到十四號清晨影響台灣最為明顯,最低溫預計落在13、14日清晨,中部以北低溫可能降到11至13度,南部低溫也只有14、15度左右,整體氣溫要到14日白天後才有稍回升的趨勢。\r\n\n 氣象局表示,14日白天到15日大陸冷氣團減弱,各地氣溫將會再回升,不過從16日開始,新一波冷空氣又將南下,17日起影響台灣,這波冷空氣強度比上一波強,預計會來到強烈大陸冷氣團的等級。" +} \ No newline at end of file diff --git a/tests/models/Crawler/BCC/data/README.md b/tests/models/Crawler/BCC/data/README.md new file mode 100644 index 0000000..585cbd2 --- /dev/null +++ b/tests/models/Crawler/BCC/data/README.md @@ -0,0 +1,14 @@ +BCC data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `2470299.html` + From: http://www.bcc.com.tw/newsView.2469790 \ No newline at end of file diff --git a/tests/models/Crawler/BCC/data/listing.html b/tests/models/Crawler/BCC/data/listing.html new file mode 100644 index 0000000..44d2685 --- /dev/null +++ b/tests/models/Crawler/BCC/data/listing.html @@ -0,0 +1,2088 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + 中國廣播公司全球資訊網 + + + + + + +
                    +
                    + + + + +
                    + + + + + + + + + + + + + + + +
                    + +
                    +
                    + + +
                    +
                    +
                    + + +
                    + +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    + +
                    + + + +
                    + +
                    +
                    +
                    +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    + + + + + + + + + +
                    + +
                    + + +
                    +
                    + + + + + + + + + + + + + + + + + +
                    + +
                    + 總覽 +
                    + +
                    + 政治 +
                    + +
                    + 國際 +
                    + +
                    + 兩岸 +
                    + +
                    + 財經 +
                    + +
                    + 生活 +
                    + +
                    + 社會 +
                    + +
                    + 體育 +
                    + +
                    + 影藝 +
                    + +
                    + 軼聞 +
                    + +
                    + 專題 +
                    + +
                    +
                    + 愛健康 +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + +
                    + + +
                    + + + + + +
                    + +
                    2014/12/12 12:44 報導
                    +
                    受到國際油價持續下跌影響,下周國內油價可望繼續降價,汽柴油每公升降七角,這是從2009年以來的最低點,所有汽油也全面跌破30元。中油表示,未來國際油價是否會繼續下跌,目前仍須觀察,但石油探勘仍有一定成本,未來...(觀看更多)
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    +
                    + + + + +
                    +
                    +
                    +
                    + + + + + + + + +
                    + + + + + +
                    +
                    新聞速報
                    + +
                    + +
                    +
                    + + +
                    + +
                    + + + + + + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + +
                    + +
                    +
                    新聞總覽
                    + + +
                    + +
                    + + + + + + + + + + + + + + + + + +
                    + + +
                    + + + +
                    +
                    + + + + + + + + + + +
                    時間:01:02~02:00/節目:新聞大解讀(重播) + + +
                    + + +
                    +
                    + + + + + + + + +
                    +
                    + +
                    + 搜尋 +
                    +
                    +
                    + + + + + + + + +
                    +
                    +
                    點閱排名
                    + +
                    +
                    + +
                    +
                    1
                    + +
                    點閱:1,269次
                    +
                    + +
                    +
                    2
                    + +
                    點閱:454次
                    +
                    + +
                    +
                    3
                    + +
                    點閱:301次
                    +
                    + +
                    +
                    4
                    + +
                    點閱:261次
                    +
                    + +
                    +
                    5
                    + +
                    點閱:204次
                    +
                    + +
                    +
                    6
                    + +
                    點閱:186次
                    +
                    + +
                    +
                    7
                    + +
                    點閱:182次
                    +
                    + +
                    +
                    8
                    + +
                    點閱:179次
                    +
                    + +
                    +
                    9
                    + +
                    點閱:174次
                    +
                    + +
                    +
                    10
                    + +
                    點閱:174次
                    +
                    + +
                    +
                    + +
                    + +
                    + + +
                    + +
                    +
                    + + + + + + + + + + + + +
                    + + +
                    +
                    收聽頻率
                    + +
                    +
                    +
                    +
                    AM648
                    +
                    台北、桃園
                    +
                    +
                    +
                    AM882
                    +
                    新竹
                    +
                    +
                    +
                    AM1413
                    +
                    苗栗、埔里
                    +
                    +
                    +
                    AM720
                    +
                    台中、彰化、南投
                    +
                    +
                    +
                    AM1350
                    +
                    嘉義、雲林
                    +
                    +
                    +
                    AM1296
                    +
                    台南
                    +
                    +
                    +
                    AM864
                    +
                    高雄、屏東
                    +
                    +
                    +
                    AM630
                    +
                    宜蘭
                    +
                    +
                    +
                    AM819
                    +
                    台東
                    +
                    +
                    +
                    AM855
                    +
                    花蓮
                    +
                    +
                    +
                    AM1116
                    +
                    玉里
                    +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + +
                    +
                    + 本網站內容屬於中國廣播公司全球資訊網所有,非經允許,不得轉載 All Rights Reserved.
                    + 台北市中山區松江路375號 + + 廣告業務聯絡 + + 客服信箱 + + 關於中廣 +
                    + + TEL:886-2-25019688
                    + Broadcasting Corporation of China No.375, Song Jiang Rd., Taipei, Taiwan, R.O.C. +
                    +
                    Design by NEWMEDIAMAX
                    +
                    +
                    + +
                    + + diff --git a/tests/models/Crawler/BCC/data/listing.json b/tests/models/Crawler/BCC/data/listing.json new file mode 100644 index 0000000..ba8c6da --- /dev/null +++ b/tests/models/Crawler/BCC/data/listing.json @@ -0,0 +1,19 @@ +[ + "http://www.bcc.com.tw/newsView.2469790", + "http://www.bcc.com.tw/newsView.2469901", + "http://www.bcc.com.tw/newsView.2469976", + "http://www.bcc.com.tw/newsView.2470114", + "http://www.bcc.com.tw/newsView.2470259", + "http://www.bcc.com.tw/newsView.2470262", + "http://www.bcc.com.tw/newsView.2470287", + "http://www.bcc.com.tw/newsView.2470299", + "http://www.bcc.com.tw/newsView.2470691", + "http://www.bcc.com.tw/newsView.2470836", + "http://www.bcc.com.tw/newsView.2471156", + "http://www.bcc.com.tw/newsView.2471157", + "http://www.bcc.com.tw/newsView.2471167", + "http://www.bcc.com.tw/newsView.2471173", + "http://www.bcc.com.tw/newsView.2471174", + "http://www.bcc.com.tw/newsView.2471175", + "http://www.bcc.com.tw/newsView.T" +] \ No newline at end of file diff --git a/tests/models/Crawler/CNA/Crawl.test b/tests/models/Crawler/CNA/Crawl.test new file mode 100644 index 0000000..258ead8 --- /dev/null +++ b/tests/models/Crawler/CNA/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_CNA::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_CNA::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/Parse.test b/tests/models/Crawler/CNA/Parse.test new file mode 100644 index 0000000..aee360d --- /dev/null +++ b/tests/models/Crawler/CNA/Parse.test @@ -0,0 +1,114 @@ +label = 'Crawler_CNA::parse (201308130021-1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/201308130021-1.html'); + $result = Crawler_CNA::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/201308130021-1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} + +class TestCase_Crawler_CNA_Parse_201308130087 extends UnitTestCase +{ + + function __construct() + { + $this->label = 'Crawler_CNA::parse (201308130087-1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/201308130087-1.html'); + $result = Crawler_CNA::parse($content); + $reference = json_decode(file_get_contents(__DIR__ . '/data/201308130087-1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} + +class TestCase_Crawler_CNA_Parse_201412120210 extends UnitTestCase +{ + + function __construct() + { + $this->label = 'Crawler_CNA::parse (201412120210-1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/201412120210-1.html'); + $result = Crawler_CNA::parse($content); + $reference = json_decode(file_get_contents(__DIR__ . '/data/201412120210-1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} + +class TestCase_Crawler_CNA_Parse_201412120137 extends UnitTestCase +{ + + function __construct() + { + $this->label = 'Crawler_CNA::parse (201412120137-1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/201412120137-1.html'); + $result = Crawler_CNA::parse($content); + $reference = json_decode(file_get_contents(__DIR__ . '/data/201412120137-1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/data/201308130021-1.html b/tests/models/Crawler/CNA/data/201308130021-1.html new file mode 100644 index 0000000..0311079 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201308130021-1.html @@ -0,0 +1,2039 @@ + + + + + + + 台旅團挪威車禍 1死7傷 | 熱門話題 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + +
                    + 首頁 > 熱門話題 > + 挪威巴士車禍 1台灣旅客喪生 + +
                    + + +
                    + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +

                    + 台旅團挪威車禍 1死7傷 +

                    + +
                    + 字級: + + +
                    + +
                    + 發稿時間:2013/08/13 11:24 + 最新更新:2013/08/13 11:24 +
                    +
                    + +
                    + 
+(中央社製圖,點開看大圖)

                    +(中央社製圖,點開看大圖)

                    +
                    +

                    (中央社台北13日電)由凱旋旅行社出團挪威的一個台灣旅行團,旅行團遊覽車在挪威發生車禍,台灣旅行團1死7傷,另一挪威人也於車禍不幸喪生。

                    根據外電報導,兩輛分別來自挪威與瑞典的旅遊巴士昨天在挪威西部相撞,兩車共約30名乘客有2人死亡、多人受傷。

                    法新社報導,兩輛巴士是昨天傍晚行駛在連結索根達爾(Sogndal)與萊康厄爾鎮(Lekanger)的公路時發生意外。

                    挪威媒體刊登的照片顯示,瑞典巴士正面全毀,擋風玻璃碎裂,多面車窗破裂。挪威西部以峽灣著稱,夏季很受遊客歡迎。

                    交通部觀光局指出,這個旅行團由凱旋旅行社在8日出團,預定20日返台,含領隊共23人,昨天在挪威布莉克斯達往索格納峽灣的途中,發生巴士與遊覽車對撞意外。

                    觀光局說,傷者均已送往醫院治療,凱旋旅行社並已連繫外交部駐挪威人員協助,並將協助旅客家屬前往處理後續事宜。

                    根據觀光局提供的死傷名單,包括旅客林玟伶(女、26歲)死亡;2名重傷旅客為林明叡(女)、陳玉滿(女);5位輕傷旅客為林偉郁(男)、龍瑩蓁(女)、鄭建明(女)、陳美利(女)、吳蘇麗英(女)。1020813

                    ※你可能還想看:

                    挪威車禍台女喪生 疑路窄肇事

                    挪威巴士車禍 傳1台女喪生

                    更多相關新聞

                    +
                    +
                    +
                    + + +
                    + ※本網站之文字、圖片及影音,非經授權,不得轉載、公開播送或公開傳輸及利用。 +
                    + + + + + + + + + + + + + + + + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    + + + +
                    +
                    + +
                    +
                    +
                    + +
                    + + +
                    +

                    (中央社記者蔡和穎台北13日電)外交部今晚表示,台灣...

                    +
                    +
                    + +
                    + + +
                    +

                    (中央社記者蔡和穎台北13日電)外交部發言人高安今天...

                    +
                    +
                    + +
                    +
                    + + + +
                    + + +
                    + +
                    +
                    +
                    + + + + + + + +
                    + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/CNA/data/201308130021-1.json b/tests/models/Crawler/CNA/data/201308130021-1.json new file mode 100644 index 0000000..4edd362 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201308130021-1.json @@ -0,0 +1,4 @@ +{ + "title": "台旅團挪威車禍 1死7傷", + "body": "(中央社製圖,點開看大圖)\n\n(中央社台北13日電)由凱旋旅行社出團挪威的一個台灣旅行團,旅行團遊覽車在挪威發生車禍,台灣旅行團1死7傷,另一挪威人也於車禍不幸喪生。\n\n根據外電報導,兩輛分別來自挪威與瑞典的旅遊巴士昨天在挪威西部相撞,兩車共約30名乘客有2人死亡、多人受傷。\n\n法新社報導,兩輛巴士是昨天傍晚行駛在連結索根達爾(Sogndal)與萊康厄爾鎮(Lekanger)的公路時發生意外。\n\n挪威媒體刊登的照片顯示,瑞典巴士正面全毀,擋風玻璃碎裂,多面車窗破裂。挪威西部以峽灣著稱,夏季很受遊客歡迎。\n\n交通部觀光局指出,這個旅行團由凱旋旅行社在8日出團,預定20日返台,含領隊共23人,昨天在挪威布莉克斯達往索格納峽灣的途中,發生巴士與遊覽車對撞意外。\n\n觀光局說,傷者均已送往醫院治療,凱旋旅行社並已連繫外交部駐挪威人員協助,並將協助旅客家屬前往處理後續事宜。\n\n根據觀光局提供的死傷名單,包括旅客林玟伶(女、26歲)死亡;2名重傷旅客為林明叡(女)、陳玉滿(女);5位輕傷旅客為林偉郁(男)、龍瑩蓁(女)、鄭建明(女)、陳美利(女)、吳蘇麗英(女)。1020813\n\n※你可能還想看:挪威車禍台女喪生 疑路窄肇事挪威巴士車禍 傳1台女喪生更多相關新聞" +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/data/201308130087-1.html b/tests/models/Crawler/CNA/data/201308130087-1.html new file mode 100644 index 0000000..57debe7 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201308130087-1.html @@ -0,0 +1,1941 @@ + + + + + + + 北京26樓頂最牛違建 限期拆 | 兩岸透視 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + +
                    + 首頁 + > + 兩岸透視 + + +
                    + + +
                    + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    + +

                    + 北京26樓頂最牛違建 限期拆 +

                    + +
                    + 字級: + + +
                    + +
                    + 發稿時間:2013/08/13 11:38 + 最新更新:2013/08/13 11:38 +
                    +
                    + +
                    +

                    (中央社台北13日電)中國大陸一處高級社區住戶花6年在26樓頂加蓋一棟240坪的兩層別墅,假山大樹俱全,堪稱北京「最牛違建」。北京市海淀區城管昨天要求住戶15天內自行拆除,否則將強制拆除。

                    新京報報導,這座宛如空中花園的誇張違建位於京城西部著名的高級社區「人濟山莊」。靠近馬路的B棟樓26層樓頂天臺加蓋兩層別墅,樓體是岩石質感外殼,外殼上還種有大樹。

                    社區居民表示,這座兩層別墅是B樓2605室屋主張必清耗時6年蓋的。新京報指出,張必清為中醫保健品連鎖銷售機構「奇經堂」的創始人。

                    多位居民表示,擔心頂樓違建會加重樓體承重,即使將違建拆除,大樓整體結構也可能受到破壞。有居民說,曾有居民向相關部門反映,但多年來沒有解決。

                    海淀城管紫竹院隊昨天下午在2605室大門上張貼限期整改通知書。通知書指出,人濟山莊4號樓頂層建設工程,建築面積為800平方公尺(約240坪),未依法取得規劃許可,屬違法建設。

                    紫竹院隊副隊長陳郁說,限期整改期限是15天,屋主可以申訴,也可以自行拆除。過了15天還沒動作,城管部門將報請海淀區政府啟動強拆程序。

                    不過陳郁表示,未來強拆通知書需要遞交到屋主本人手中,但現在一直未能聯繫到張必清。按以往的經驗,從限期整改到期到強拆執行,需要數月時間。1020813

                    +
                    +
                    +
                    + + +
                    + ※本網站之文字、圖片及影音,非經授權,不得轉載、公開播送或公開傳輸及利用。 +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    + + + + + + + +
                    +
                    +
                    +
                    + +
                    + 新聞圖輯 +
                    +
                    +
                    +
                    + + + + + + + + +
                    +
                    + +
                    + + +
                    + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/CNA/data/201308130087-1.json b/tests/models/Crawler/CNA/data/201308130087-1.json new file mode 100644 index 0000000..ceb5964 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201308130087-1.json @@ -0,0 +1,4 @@ +{ + "title": "北京26樓頂最牛違建 限期拆", + "body": "(中央社台北13日電)中國大陸一處高級社區住戶花6年在26樓頂加蓋一棟240坪的兩層別墅,假山大樹俱全,堪稱北京「最牛違建」。北京市海淀區城管昨天要求住戶15天內自行拆除,否則將強制拆除。\n\n新京報報導,這座宛如空中花園的誇張違建位於京城西部著名的高級社區「人濟山莊」。靠近馬路的B棟樓26層樓頂天臺加蓋兩層別墅,樓體是岩石質感外殼,外殼上還種有大樹。\n\n社區居民表示,這座兩層別墅是B樓2605室屋主張必清耗時6年蓋的。新京報指出,張必清為中醫保健品連鎖銷售機構「奇經堂」的創始人。\n\n多位居民表示,擔心頂樓違建會加重樓體承重,即使將違建拆除,大樓整體結構也可能受到破壞。有居民說,曾有居民向相關部門反映,但多年來沒有解決。\n\n海淀城管紫竹院隊昨天下午在2605室大門上張貼限期整改通知書。通知書指出,人濟山莊4號樓頂層建設工程,建築面積為800平方公尺(約240坪),未依法取得規劃許可,屬違法建設。\n\n紫竹院隊副隊長陳郁說,限期整改期限是15天,屋主可以申訴,也可以自行拆除。過了15天還沒動作,城管部門將報請海淀區政府啟動強拆程序。\n\n不過陳郁表示,未來強拆通知書需要遞交到屋主本人手中,但現在一直未能聯繫到張必清。按以往的經驗,從限期整改到期到強拆執行,需要數月時間。1020813" +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/data/201412120137-1.html b/tests/models/Crawler/CNA/data/201412120137-1.html new file mode 100644 index 0000000..6bacbc5 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201412120137-1.html @@ -0,0 +1,1981 @@ + + + + + + + 陳德銘率團訪台東 縣長設晚宴 | 兩岸透視 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + +
                    + 首頁 + > + 兩岸透視 + + +
                    + + +
                    + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    + +

                    + 陳德銘率團訪台東 縣長設晚宴 +

                    + +
                    + 字級: + + +
                    + +
                    + 發稿時間:2014/12/12 12:13 + 最新更新:2014/12/12 12:13 +
                    +
                    + +
                    +

                    (中央社記者盧太城台東縣12日電)大陸海協會經貿交流團,今天參訪台東,上午前往森林博物館,晚上台東縣長黃健庭在知本宴請團員。

                    海峽兩岸關係協會會長陳德銘率海協會經貿參訪團,今天上午前往台東縱谷海岸山脈的森林博物館,不過行程未對外開放。

                    陳德銘下午將參觀由佛光山在台東創辦、公益平台基金會董事長嚴長壽擔任董事長的均一中小學,以及阿水工房。傍晚參觀國立台灣史前文化館,黃健庭晚上在知本宴請團員。1031212

                    +
                    +
                    +
                    + + +
                    + ※本網站之文字、圖片及影音,非經授權,不得轉載、公開播送或公開傳輸及利用。 +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    + + + + + + + +
                    +
                    +
                    +
                    + +
                    + 新聞圖輯 +
                    +
                    +
                    +
                    + + + + + + + + +
                    +
                    + +
                    + + +
                    + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/CNA/data/201412120137-1.json b/tests/models/Crawler/CNA/data/201412120137-1.json new file mode 100644 index 0000000..760e8b5 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201412120137-1.json @@ -0,0 +1,4 @@ +{ + "title": "陳德銘率團訪台東 縣長設晚宴", + "body": "(中央社記者盧太城台東縣12日電)大陸海協會經貿交流團,今天參訪台東,上午前往森林博物館,晚上台東縣長黃健庭在知本宴請團員。\n\n海峽兩岸關係協會會長陳德銘率海協會經貿參訪團,今天上午前往台東縱谷海岸山脈的森林博物館,不過行程未對外開放。\n\n陳德銘下午將參觀由佛光山在台東創辦、公益平台基金會董事長嚴長壽擔任董事長的均一中小學,以及阿水工房。傍晚參觀國立台灣史前文化館,黃健庭晚上在知本宴請團員。1031212" +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/data/201412120210-1.html b/tests/models/Crawler/CNA/data/201412120210-1.html new file mode 100644 index 0000000..31418a2 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201412120210-1.html @@ -0,0 +1,1942 @@ + + + + + + + 成大三維超音波 助胎兒早期篩檢 | 教育文化 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + +
                    + 首頁 + > + 教育文化 + + +
                    + + +
                    + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    + +

                    + 成大三維超音波 助胎兒早期篩檢 +

                    + +
                    + 字級: + + +
                    + +
                    + 發稿時間:2014/12/12 15:31 + 最新更新:2014/12/12 15:31 +
                    +
                    + +
                    +

                    (中央社記者張榮祥台南12日電)成功大學研發出胎兒三維超音波影像自動分析系統,有助第一孕期胎兒早期唐氏症、胎兒基因缺陷及發育不全的篩檢。

                    這項系統是由成大資訊工程系教授孫永年團隊研發,在研究初期,就有兩篇論文登上超音波領域國際期刊Ultrasound in Medicine and Biology及Ultrasound in and Obstetrics Gynecology。

                    孫永年表示,超音波影像檢查具成本低、非侵入性等優點,廣泛使用在產前檢查,如今雖已發展出三維胎兒超音波影像,但因功能少,只能看到胎兒外觀,所以二維超音波檢查仍是主流。

                    不過,二維超音波影像雜訊多,且容易出現陰影遮蔽等缺點,要在第一孕期觀察胎兒解剖構造,不太容易。

                    孫永年團隊研發的胎兒三維超音波影像自動分析系統,是透過影像自動分割及定量參數量測技術,自動偵測胎兒臉部正中央的縱切面,並在縱切面上量測出頸部透明帶位置,找出最大寬度。

                    團隊又從臉部正中央縱切面的定位,搭配影像分割法,經標準化與座標化,確實定位出胎兒位置,量測出所要的頭圍、腹圍、身長等數值,協助做第一孕期(11週至13週)的產檢。

                    孫永年說,隨著胎兒成長,產檢觀察重點也不同,三維自動影像分析系統未來仍有發展空間,包括量測胎兒腦部發育與結構,藉此掌握懷孕後期胎兒發育是否正常等。

                    成大說,團隊成員曾查閱國內外文獻等資料,都沒有胎兒三維超音波影像分析系統等類似的研發報導,此系統應是國際首創。1031212

                    +
                    +
                    +
                    + + +
                    + ※本網站之文字、圖片及影音,非經授權,不得轉載、公開播送或公開傳輸及利用。 +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    + + + + + + + +
                    +
                    +
                    +
                    + +
                    + 新聞圖輯 +
                    +
                    +
                    +
                    + + + + + + + + +
                    +
                    + +
                    + + +
                    + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/CNA/data/201412120210-1.json b/tests/models/Crawler/CNA/data/201412120210-1.json new file mode 100644 index 0000000..fa60940 --- /dev/null +++ b/tests/models/Crawler/CNA/data/201412120210-1.json @@ -0,0 +1,4 @@ +{ + "title": "成大三維超音波 助胎兒早期篩檢", + "body": "(中央社記者張榮祥台南12日電)成功大學研發出胎兒三維超音波影像自動分析系統,有助第一孕期胎兒早期唐氏症、胎兒基因缺陷及發育不全的篩檢。\n\n這項系統是由成大資訊工程系教授孫永年團隊研發,在研究初期,就有兩篇論文登上超音波領域國際期刊Ultrasound in Medicine and Biology及Ultrasound in and Obstetrics Gynecology。\n\n孫永年表示,超音波影像檢查具成本低、非侵入性等優點,廣泛使用在產前檢查,如今雖已發展出三維胎兒超音波影像,但因功能少,只能看到胎兒外觀,所以二維超音波檢查仍是主流。\n\n不過,二維超音波影像雜訊多,且容易出現陰影遮蔽等缺點,要在第一孕期觀察胎兒解剖構造,不太容易。\n\n孫永年團隊研發的胎兒三維超音波影像自動分析系統,是透過影像自動分割及定量參數量測技術,自動偵測胎兒臉部正中央的縱切面,並在縱切面上量測出頸部透明帶位置,找出最大寬度。\n\n團隊又從臉部正中央縱切面的定位,搭配影像分割法,經標準化與座標化,確實定位出胎兒位置,量測出所要的頭圍、腹圍、身長等數值,協助做第一孕期(11週至13週)的產檢。\n\n孫永年說,隨著胎兒成長,產檢觀察重點也不同,三維自動影像分析系統未來仍有發展空間,包括量測胎兒腦部發育與結構,藉此掌握懷孕後期胎兒發育是否正常等。\n\n成大說,團隊成員曾查閱國內外文獻等資料,都沒有胎兒三維超音波影像分析系統等類似的研發報導,此系統應是國際首創。1031212" +} \ No newline at end of file diff --git a/tests/models/Crawler/CNA/data/README.md b/tests/models/Crawler/CNA/data/README.md new file mode 100644 index 0000000..136d9c2 --- /dev/null +++ b/tests/models/Crawler/CNA/data/README.md @@ -0,0 +1,23 @@ +CNA data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + +- `listing.html` + From the result of crawlIndex() + +- `201412120137-1.html` + From: http://www.cna.com.tw/news/acn/201412120137-1.aspx + +- `201412120210-1.html` + From: http://www.cna.com.tw/news/aedu/201412120210-1.aspx + +- `201308130087-1.html` + From: http://www.cna.com.tw/News/aCN/201308130087-1.aspx + +- `201308130021-1.html` + From: http://www.cna.com.tw/Topic/Popular/3907-1/201308130021-1.aspx diff --git a/tests/models/Crawler/CNA/data/listing.html b/tests/models/Crawler/CNA/data/listing.html new file mode 100644 index 0000000..03ab75a --- /dev/null +++ b/tests/models/Crawler/CNA/data/listing.html @@ -0,0 +1,17798 @@ + + + + + + + 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    + +
                    + + + + + + + + + + + +
                    + + + +
                    + + + + + + + + + + + + + + + + +
                    + + +
                    + + + + +
                    + + + + +
                    + +
                    + +
                    + + +
                    + +
                    + +
                    + +
                    + + + + +
                    +
                    +
                    +
                    +

                    新聞圖輯

                    +
                    +
                    +
                    +
                    + + + +
                    +
                    + 展場亮點:Show girl +
                    + +
                    + +
                    +
                    + 金馬51 得獎一瞬間 +
                    + +
                    + + + + +
                    +
                    + +
                    + + + + + + + + + + + + +
                    +
                    +
                    +
                    +

                    圖表新聞

                    +
                    +
                    + + +
                    + + + +
                    +
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + +
                    + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + +
                    + + + + + + + + + + + + + + +
                    +
                    +
                    +
                    +

                    新聞專題

                    +
                    +
                    +
                    +
                    + +

                    世界橋梁之旅 遊覽各國新玩法

                    +

                    每到一個國家旅遊,哪一座橋是你必走?百餘年歷史的倫敦塔橋、巴黎塞納河上最華麗的亞歷山大III世橋、連結林肯紀念堂與阿靈頓國...

                    + +
                    + +

                    台灣善待印傭 印尼總統掛保證

                    +

                    根據中華民國勞動部勞動力發展署統計,截至今年10月,在台移工人數已破54萬大關,史上新高,其中看護移工有21萬5000多人,大部分...

                    + + +
                    +
                    + +
                    + + +
                    + + + + +
                    + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-1 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/13 01:29

                    油價跌不停 歐股重挫

                    12/13 01:22

                    一度故障 英飛航管制系統修復

                    12/13 01:20

                    桌總年終賽 莊智淵男單晉級8強

                    12/13 00:37

                    法葡國會通過 籲承認巴勒斯坦

                    12/13 00:28

                    航管電腦當機 倫敦暫閉空域

                    12/13 00:09

                    電腦故障 倫敦空域暫時關閉

                    12/12 23:34

                    美股開盤下挫 能源股領跌

                    12/12 23:05

                    深圳前海微眾銀行獲准開業

                    12/12 23:04

                    德國百貨業迎耶誕採購旺季

                    12/12 23:01

                    德國電力45%來自燃煤火力發電

                    12/12 22:38

                    陳菊探扁 籲政府速予保外就醫

                    12/12 22:36

                    王岐山:反腐不是一陣子

                    12/12 22:27

                    安心 歐盟食品農藥殘留多合格

                    12/12 22:26

                    軍機穿越宮古海峽 陸要日尊重

                    12/12 22:26

                    新電價方案 台電規劃明年執行

                    12/12 22:16

                    加強關係 俄續對印租借核潛艦

                    12/12 22:13

                    大樂透頭獎 摃龜

                    12/12 22:11

                    今彩539 頭獎 1注中獎

                    12/12 22:07

                    超前部署護漁 魚貨增加收入

                    12/12 22:02

                    朱立倫選黨主席 不權謀勇於承擔

                    12/12 22:00

                    中國好聲音 1月小巨蛋開唱

                    12/12 21:57

                    俄央行干預匯市無效 盧布續貶

                    12/12 21:52

                    曼黛瑪璉特賣 無痕內衣熱銷

                    12/12 21:51

                    廣東天津福建 陸再設三自貿區

                    12/12 21:46

                    超商店員阻詐騙 金門警方表揚

                    12/12 21:42

                    投信人員賣股放寬 理財更有彈性

                    12/12 22:04

                    扁保外就醫案 法務部:審查中

                    12/12 21:24

                    陸企300億元 收購澳洲建設商

                    12/12 21:44

                    新版性平法上路 31萬準爸媽受惠

                    12/12 21:13

                    警回馬槍 呼呼大睡毒販落網

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-2 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 21:09

                    富智康證實印度廠24日停止營運

                    12/12 21:08

                    陸客鬧事 泰亞航客機折返曼谷

                    12/12 21:08

                    安樂死 歐盟僅荷比盧合法

                    12/12 21:04

                    訪台東 陳德銘:助陸客自由行

                    12/12 21:04

                    閰小妹動畫 13日金門特映

                    12/12 21:00

                    強烈風暴來襲 南加州疏散居民

                    12/12 20:58

                    朱立倫主張修憲 林佳龍歡迎

                    12/12 20:52

                    大樂透開獎

                    12/12 20:50

                    通緝犯藏陸18年 開賭場販毒遭逮

                    12/12 20:46

                    義媒:占中清場 但民主潮未歇

                    12/12 20:43

                    李紀珠:盼第三方支付具前瞻性

                    12/12 20:43

                    新電價公式何時上路 經部:盡快辦理

                    12/12 20:41

                    今彩539 開獎

                    12/12 20:38

                    陳思羽奪金 劉俊麟適時提點

                    12/12 20:38

                    跨界合作 網龍推多屏互動APP

                    12/12 20:31

                    陳德銘參觀台東史前館

                    12/12 20:29

                    刺激措施給力 陸新增貸款激增

                    12/12 20:24

                    耶誕妝冠軍 烏節中央城百利宮

                    12/12 20:22

                    常覺渾身不對勁 恐患泛焦慮症

                    12/12 20:19

                    聯合國氣候會議 台展減碳決心

                    12/12 20:18

                    台達電國際分享淨零耗能校園經驗

                    12/12 20:17

                    陳思羽奪金 贏得辛苦內心激動

                    12/12 20:17

                    ITA談判 經部爭工具機面板納入

                    12/12 20:11

                    LNG進口長約多 氣價落後反映

                    12/12 20:03

                    立委考鄉民用語 毛揆:週末惡補

                    12/12 19:58

                    新北映象60影像賽 13日揭曉

                    12/12 19:52

                    IEA砍2015年石油需求預測

                    12/12 19:52

                    駐星代表處微電影有獎徵答

                    12/12 20:56

                    希特勒謎樣傳說 化名藏身印尼

                    12/12 19:44

                    毛揆:104年Q1採新電價公式

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-3 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 19:42

                    傅崐萁:遊太魯閣 擬分級收費

                    12/12 19:40

                    綠:樂見朱立倫跟進推動憲改

                    12/12 19:36

                    千斤公益鹹菜 替關西學子加菜

                    12/12 19:36

                    韓SJ圭賢幫助父母首爾開賓館

                    12/12 19:35

                    選票壓力 陳冲歎長期政策不受青睞

                    12/12 19:33

                    周線中止連4紅 市值跌破26兆

                    12/12 19:32

                    朱立倫:不管府院 與民站一起

                    12/12 19:31

                    大英百品特展 穿越200萬年

                    12/12 19:31

                    飯店徵耶誕甜心 時薪5千元

                    12/12 19:30

                    接見不倒騎士 郝卸任仍將協助

                    12/12 19:29

                    共諜案遭收押 許乃權抗告遭駁

                    12/12 19:23

                    火車命名 阿美族想要邦查號

                    12/12 19:22

                    訂單減 勝華全面解僱員工再回聘

                    12/12 22:17

                    朱立倫:不當黨產應歸還國家

                    12/12 19:16

                    安樂死爭議 法國:是時候討論

                    12/12 19:15

                    即刻救援 火坑救4賣淫外籍女

                    12/12 19:12

                    扁保外案 陳致中籲法務部面對

                    12/12 19:12

                    朱立倫盼讓國民黨也有太陽花

                    12/12 19:10

                    台港兩會 16日舉行聯席會議

                    12/12 19:08

                    高院:保外就醫是矯正署權責

                    12/12 19:04

                    雞糞變黃金 石安牧場獲獎肯定

                    12/12 19:00

                    徐生明少棒賽 龜山國小奪冠

                    12/12 18:59

                    未繫安全帶 反遭警搜出毒品

                    12/12 18:58

                    廣告寵兒金秀賢 中韓代言品牌逾30

                    12/12 18:57

                    吳志揚:憲改應穩定避政爭

                    12/12 18:56

                    張小燕緊張女王 李艷秋忙覓鞋

                    12/12 18:55

                    澎湖獅子會 發起捐血週活動

                    12/12 18:54

                    靈鷲山頒獎學金 表揚澎湖學子

                    12/12 18:54

                    國民黨主席人選 林明溱表看法

                    12/12 18:54

                    朱立倫選黨主席 李登輝:很好

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-4 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 18:52

                    南水北調中線 年調1/6黃河量

                    12/12 18:51

                    輸銀擬分3年 增資200億

                    12/12 18:49

                    談黨產 郝:給朱立倫時間說明

                    12/12 18:48

                    開收盤資訊揭露 明年6月改新制

                    12/12 18:48

                    碩禾赴陸設廠 搶攻內需市場

                    12/12 18:47

                    ITA擴大 台GDP略增

                    12/12 18:46

                    虎科大結合漢翔 簽合作意向書

                    12/12 18:45

                    南京大屠殺國祭 習近平將出席

                    12/12 18:45

                    軍方前輩力薦 傅永茂出線

                    12/12 18:45

                    國民黨屏東主委4人 無保請回

                    12/12 18:44

                    扁異議聲明遭駁 羅瑩雪:尊重

                    12/12 18:43

                    胡志強北上會朱立倫 決定退選

                    12/12 18:41

                    跨年迎日出 花蓮推搭乘熱氣球

                    12/12 19:36

                    柯文哲請益 李登輝贈三原則

                    12/12 18:41

                    農委會:石斑魚產值今年逾76億

                    12/12 18:39

                    海邊3顆未爆彈 無火藥虛驚

                    12/12 18:51

                    票選十大火鍋 台電酸菜鍋居冠

                    12/12 18:33

                    新台幣匯率 收貶6.4分

                    12/12 18:32

                    現代財經獎 中央社獲兩項優勝

                    12/12 18:32

                    量縮整理 滬股週線三連揚

                    12/12 18:28

                    甥18年前器捐 舅獲優先換腎

                    12/12 20:33

                    陳思羽獲冠軍 揚威世界桌壇

                    12/12 18:23

                    日男排代表隊陸裔選手偷錢被捕

                    12/12 18:21

                    跨生質燃料 欣厚明年獲利大爆發

                    12/12 18:18

                    廢棄物能源化 環署擬推驗證制

                    12/12 18:17

                    台電:年份方式不同 燃料價格不能互比

                    12/12 18:22

                    北韓:殘疾者丟臉 非人道對待

                    12/12 18:09

                    女兒跋扈 趙亮鎬公開道歉

                    12/12 18:09

                    增發展 林佳龍林明溱推11共識

                    12/12 18:03

                    毛揆:每天當最後一天全力以赴

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-5 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 18:01

                    大陸地產大亨:別再讓我們翻牆

                    12/12 17:59

                    歐蘭德若卸任 月領近台幣60萬

                    12/12 17:58

                    中正大學抓漏系統 節水特優獎

                    12/12 17:58

                    油價跌 公平會:物價降要再等

                    12/12 17:57

                    憂香港前途 移民潮隱然浮現

                    12/12 17:55

                    陸股強漲 新加坡A50成長64%

                    12/12 17:55

                    索尼PS4登陸 1萬5有找

                    12/12 17:52

                    高院:扁保外就醫案是行政處分

                    12/12 17:51

                    朱立倫選主席 吳志揚:利整合

                    12/12 17:48

                    台灣美食展 2015年重出江湖

                    12/12 17:42

                    看不見的旅程 20日嘉縣演出

                    12/12 17:41

                    中市音樂賽 新民樂隊11連霸

                    12/12 17:40

                    台港澳愛心獎頒獎 5人獲得

                    12/12 17:34

                    日月光復工案 高市再現場查核

                    12/12 17:31

                    交易烏龍 益安生醫:無影響

                    12/12 17:30

                    謝龍介:黨中央決定是否主委直選

                    12/12 17:30

                    陳為廷選立委 賴清德:要協助

                    12/12 17:26

                    疑天冷高血壓發作 工人墜樓亡

                    12/12 20:51

                    菲大生裸跑爭法治 正妹瞪大眼

                    12/12 17:11

                    青少年頭痛視力異常 腦瘤作祟

                    12/12 17:10

                    大戶條款 林伯豐:禿頭就禿頭吧

                    12/12 17:10

                    王品ita展店 明年業績破億

                    12/12 17:10

                    高雄寵物展 毛小孩變裝

                    12/12 17:09

                    敦煌 將升格為地級市

                    12/12 17:59

                    扁保外案聲明異議 高院駁回

                    12/12 17:04

                    高軟園區 就業人數拚翻倍

                    12/12 17:04

                    台灣會議暨獎勵旅遊 首爾推廣

                    12/12 17:03

                    反對改革法案 義發起大罷工

                    12/12 17:02

                    104年起 輸入新化學物質須審核

                    12/12 16:55

                    油價直直落 憂喜兩樣情

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-6 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 16:54

                    港媒:最快下週清場銅鑼灣

                    12/12 16:52

                    嘉市國際管樂節 20日踩街

                    12/12 16:52

                    中投發展 林明溱:合作跨政黨

                    12/12 16:51

                    華僑高中飢餓12 體驗生命教育

                    12/12 16:50

                    外媒:陸央行向銀行注資4000億

                    12/12 16:50

                    嘉市1里長涉賄 檢方起訴

                    12/12 16:49

                    翻轉服務湊時數 融入正式課程

                    12/12 16:45

                    傳播貢獻獎 時間軸獲5獎

                    12/12 16:45

                    林佳龍會林明溱 暢談中投合作

                    12/12 16:36

                    冷氣團來襲 農改場籲摘受害果

                    12/12 16:33

                    朱立倫領表 吳敦義感謝歡迎

                    12/12 16:31

                    占立院案 黃國昌魏揚出庭

                    12/12 16:30

                    台南記者學會獻愛心 捐款家扶

                    12/12 16:25

                    當選宜蘭市長 江聰淵獲頒證書

                    12/12 16:24

                    台電超額盈餘回饋 年內完成

                    12/12 16:31

                    六月生了 李易臉書秀父子合照

                    12/12 16:21

                    特教生失聯2天 溺斃河圳

                    12/12 16:19

                    旗津纜車 陳菊:卡在軍用地

                    12/12 16:11

                    中華電供應商大會分享CSR經驗

                    12/12 16:09

                    朱立倫:總統大選併辦修憲公投

                    12/12 16:08

                    麻州議會下 挖出前人時空膠囊

                    12/12 16:06

                    新台幣收貶6.4分

                    12/12 16:05

                    朱立倫提修憲 陳菊鄭文燦表歡迎

                    12/12 16:03

                    微降 安倍內閣支持率45.4%

                    12/12 16:16

                    阿基師傳退出媒體 經紀人否認

                    12/12 15:58

                    徐生明少棒賽 文武兼備有獎

                    12/12 15:55

                    毛治國:獲馬總統充分授權

                    12/12 15:55

                    促中投合作 林佳龍林明溱會談

                    12/12 15:54

                    占中清場 陸港澳辦重彈舊調

                    12/12 15:52

                    美釀酒商 打造啤酒桶耶誕樹

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-7 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 15:51

                    車位糾紛 一路追打進醫院急診室

                    12/12 15:49

                    棄美籍 林洲民任北市都發局長

                    12/12 15:47

                    中彰投青年職涯發展中心揭牌

                    12/12 15:47

                    中華電獲標準普爾評AA

                    12/12 15:45

                    河北縣委書記涉貪 財產逾5億

                    12/12 15:44

                    宏達電RE登台 優惠專案延長

                    12/12 16:34

                    陳為廷選立委 林飛帆全力助選

                    12/12 15:39

                    朱立倫選國民黨主席 談創黨精神

                    12/12 15:31

                    成大三維超音波 助胎兒早期篩檢

                    12/12 15:29

                    媒體:陸10年可能成最大肺癌國

                    12/12 15:25

                    免費換電池 減輕帕金森氏患負擔

                    12/12 15:23

                    印度教基本教義團體推異教改宗

                    12/12 17:35

                    針灸療法奏效 小貓頭鷹展翅飛

                    12/12 15:54

                    北市議員簡余晏 出任觀傳局長

                    12/12 15:16

                    分工專偷機車財物 3男遭逮

                    12/12 15:14

                    赤腳踩石子路 糖尿病友險截肢

                    12/12 15:07

                    妻拒小三憤離家 悔夫燒炭獲救

                    12/12 16:01

                    徐生明少棒賽 美濃第4名

                    12/12 14:56

                    三大法人賣超台股 60億元

                    12/12 14:56

                    農村拾器有成 雲林回收廢容器

                    12/12 14:54

                    營收落 陸肯德基整頓服務模式

                    12/12 14:54

                    陳德銘13日赴屏東 遊墾丁

                    12/12 17:01

                    國教怪象 服務學習湊時數沒學習

                    12/12 14:37

                    德製馬車上場 助跛腳馬搬新家

                    12/12 14:31

                    林佳龍:市長任內建會展中心

                    12/12 14:26

                    十三行3D高空地景 打卡最夯

                    12/12 16:23

                    周永康等被捕占中人士 獲釋

                    12/12 14:23

                    勞動局長遴選爭議 柯文哲:惋惜

                    12/12 14:20

                    連鎖通路轉戰新型店 衝坪效

                    12/12 14:19

                    解決塞車 南澳擬設分流便道

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-8 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 14:18

                    腦麻生努力向學 獲選模範生

                    12/12 14:16

                    朱立倫選主席 林佳龍:樂見人才

                    12/12 14:11

                    柯文哲借將 蘇麗瓊任秘書長

                    12/12 14:07

                    黑函案 國民黨屏東縣主委起訴

                    12/12 14:06

                    資金轉進中小型股 指數收小紅

                    12/12 14:05

                    被控侵權 小米印度暫停銷售

                    12/12 14:04

                    登山腹痛休克亡 離開隊友判無罪

                    12/12 14:02

                    林佳龍團隊 原民會主委發布

                    12/12 14:00

                    男女吵架報案 警查獲通緝犯

                    12/12 14:00

                    警政署:警察特考雙軌 合憲法

                    12/12 13:58

                    12月電子期漲 金融期跌

                    12/12 13:57

                    12月台指期跌 3點

                    12/12 13:54

                    搞怪巫毒甜甜圈 將開台灣分店

                    12/12 13:54

                    台北101案 毛治國:審慎處理

                    12/12 13:48

                    狹幅整理 台股漲 14點

                    12/12 15:29

                    搶救垂危病患 急診非快速門診

                    12/12 13:40

                    金球獎入圍遺珠 星際和裘莉

                    12/12 13:37

                    促進縣民健康 南投推社區營造

                    12/12 13:37

                    台股收盤漲 14.26點

                    12/12 13:36

                    酒後猥褻8旬鄰婦 判3年2月

                    12/12 13:34

                    珣珣公益活動後住院 高燒已退

                    12/12 13:26

                    參選黨主席 朱立倫下午說明

                    12/12 13:23

                    日本年度漢字:稅

                    12/12 13:12

                    勞動部:陸籍技師死亡認定職災

                    12/12 13:08

                    鄭文燦想借將 陳菊:不藏私

                    12/12 13:06

                    陸取消低端水泥生產 業者叫好

                    12/12 13:06

                    印尼報諷IS 警列總編褻瀆犯

                    12/12 13:01

                    林佳龍團隊 原民會主委換人

                    12/12 12:59

                    毛:接閣揆延長賽 無其他企圖

                    12/12 12:59

                    朱立倫參選黨主席 王金平尊重

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + 新聞總覽-9 | 中央社即時新聞 CNA NEWS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + +
                    + + +
                    +
                      + +
                    +
                    + + + + + +
                    + + + +
                    + + + +
                    +
                    +
                    +
                    + + + + + + + + + + + + + +
                    + + +
                    +
                    + + 有話大聲說!讀者意見調查 + + 不再顯示 [X] +
                    +
                    + + + + +
                    + + + + + +
                    +
                    +
                    + + +
                    +
                    +
                    + + + +
                    + + + +
                    + + + + +
                    + 首頁 + > + 新聞總覽 + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + 最新更新時間 +

                    12/12 12:58

                    市況樂觀 半導體設備族群揚

                    12/12 16:04

                    美濃4強賽落敗 小將激動落淚

                    12/12 12:55

                    量縮盤整 滬股午收平盤

                    12/12 13:26

                    總統:行善引效法 助善良風氣

                    12/12 12:45

                    環保殯葬 電子輓聯平台減碳排

                    12/12 12:43

                    中越戰艦 近日在赤瓜礁對峙

                    12/12 12:42

                    日本東大成立台灣漢學中心

                    12/12 12:40

                    冷氣團襲日 關東甲信料降大雪

                    12/12 12:39

                    朱立倫拋憲改 國民黨立委肯定

                    12/12 12:39

                    當運毒車手 白牌車司機遭逮

                    12/12 12:31

                    日高濱核電廠 可望通過安檢

                    12/12 12:29

                    聖誕紅應景 澆水避免碰到葉面

                    12/12 12:27

                    桌總泰國年終賽 陳思羽將爭冠

                    12/12 12:26

                    教授研究造假 交大:已開教評會

                    12/12 16:42

                    毛揆報告 供青年參與政策管道

                    12/12 12:24

                    黃健庭連任 選票補貼再捐公益

                    12/12 15:52

                    柯文哲首波小內閣 敲定13人

                    12/12 14:30

                    【更新】柯文哲讚李登輝 博學話題多

                    12/12 12:21

                    台聯杯葛毛治國報告 狀況排除

                    12/12 12:21

                    南部啟動人工增雨 效果有限

                    12/12 12:19

                    救急 美參眾院通過2天支出案

                    12/12 12:13

                    陳德銘率團訪台東 縣長設晚宴

                    12/12 12:11

                    物聯網前景看俏 半導體受惠

                    12/12 12:11

                    國民黨:樂見黨員表態參選主席

                    12/12 12:10

                    朱立倫選主席 洪秀柱藍委肯定

                    12/12 12:09

                    科技校院繁星 招生簡章公告

                    12/12 12:09

                    雙12登場 兩岸網購業搶商機

                    12/12 12:05

                    新台幣中午貶 4.8分

                    12/12 12:02

                    市調:觸控面板市場年增近2成

                    12/12 12:02

                    成長快 台灣虎航招150空服員

                    +
                    + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + +
                    + + + + + + + +
                    + + + + +
                    + +
                    + + +
                    + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/CNA/data/listing.json b/tests/models/Crawler/CNA/data/listing.json new file mode 100644 index 0000000..ca349c3 --- /dev/null +++ b/tests/models/Crawler/CNA/data/listing.json @@ -0,0 +1,314 @@ +[ + "http://www.cna.com.tw/news/acn/201412120137-1.aspx", + "http://www.cna.com.tw/news/acn/201412120153-1.aspx", + "http://www.cna.com.tw/news/acn/201412120156-1.aspx", + "http://www.cna.com.tw/news/acn/201412120183-1.aspx", + "http://www.cna.com.tw/news/acn/201412120192-1.aspx", + "http://www.cna.com.tw/news/acn/201412120198-1.aspx", + "http://www.cna.com.tw/news/acn/201412120209-1.aspx", + "http://www.cna.com.tw/news/acn/201412120214-1.aspx", + "http://www.cna.com.tw/news/acn/201412120220-1.aspx", + "http://www.cna.com.tw/news/acn/201412120244-1.aspx", + "http://www.cna.com.tw/news/acn/201412120248-1.aspx", + "http://www.cna.com.tw/news/acn/201412120255-1.aspx", + "http://www.cna.com.tw/news/acn/201412120279-1.aspx", + "http://www.cna.com.tw/news/acn/201412120285-1.aspx", + "http://www.cna.com.tw/news/acn/201412120287-1.aspx", + "http://www.cna.com.tw/news/acn/201412120291-1.aspx", + "http://www.cna.com.tw/news/acn/201412120302-1.aspx", + "http://www.cna.com.tw/news/acn/201412120314-1.aspx", + "http://www.cna.com.tw/news/acn/201412120321-1.aspx", + "http://www.cna.com.tw/news/acn/201412120365-1.aspx", + "http://www.cna.com.tw/news/acn/201412120366-1.aspx", + "http://www.cna.com.tw/news/acn/201412120371-1.aspx", + "http://www.cna.com.tw/news/acn/201412120372-1.aspx", + "http://www.cna.com.tw/news/acn/201412120384-1.aspx", + "http://www.cna.com.tw/news/acn/201412120388-1.aspx", + "http://www.cna.com.tw/news/acn/201412120391-1.aspx", + "http://www.cna.com.tw/news/acn/201412120398-1.aspx", + "http://www.cna.com.tw/news/acn/201412120400-1.aspx", + "http://www.cna.com.tw/news/acn/201412120404-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120133-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120145-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120152-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120196-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120210-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120228-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120242-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120245-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120247-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120280-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120281-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120289-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120303-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120315-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120344-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120356-1.aspx", + "http://www.cna.com.tw/news/aedu/201412120383-1.aspx", + "http://www.cna.com.tw/news/afe/201412110414-1.aspx", + "http://www.cna.com.tw/news/afe/201412120131-1.aspx", + "http://www.cna.com.tw/news/afe/201412120132-1.aspx", + "http://www.cna.com.tw/news/afe/201412120147-1.aspx", + "http://www.cna.com.tw/news/afe/201412120158-1.aspx", + "http://www.cna.com.tw/news/afe/201412120163-1.aspx", + "http://www.cna.com.tw/news/afe/201412120170-1.aspx", + "http://www.cna.com.tw/news/afe/201412120174-1.aspx", + "http://www.cna.com.tw/news/afe/201412120176-1.aspx", + "http://www.cna.com.tw/news/afe/201412120177-1.aspx", + "http://www.cna.com.tw/news/afe/201412120178-1.aspx", + "http://www.cna.com.tw/news/afe/201412120184-1.aspx", + "http://www.cna.com.tw/news/afe/201412120190-1.aspx", + "http://www.cna.com.tw/news/afe/201412120200-1.aspx", + "http://www.cna.com.tw/news/afe/201412120213-1.aspx", + "http://www.cna.com.tw/news/afe/201412120215-1.aspx", + "http://www.cna.com.tw/news/afe/201412120227-1.aspx", + "http://www.cna.com.tw/news/afe/201412120230-1.aspx", + "http://www.cna.com.tw/news/afe/201412120241-1.aspx", + "http://www.cna.com.tw/news/afe/201412120249-1.aspx", + "http://www.cna.com.tw/news/afe/201412120254-1.aspx", + "http://www.cna.com.tw/news/afe/201412120257-1.aspx", + "http://www.cna.com.tw/news/afe/201412120258-1.aspx", + "http://www.cna.com.tw/news/afe/201412120277-1.aspx", + "http://www.cna.com.tw/news/afe/201412120286-1.aspx", + "http://www.cna.com.tw/news/afe/201412120288-1.aspx", + "http://www.cna.com.tw/news/afe/201412120296-1.aspx", + "http://www.cna.com.tw/news/afe/201412120298-1.aspx", + "http://www.cna.com.tw/news/afe/201412120304-1.aspx", + "http://www.cna.com.tw/news/afe/201412120307-1.aspx", + "http://www.cna.com.tw/news/afe/201412120316-1.aspx", + "http://www.cna.com.tw/news/afe/201412120317-1.aspx", + "http://www.cna.com.tw/news/afe/201412120318-1.aspx", + "http://www.cna.com.tw/news/afe/201412120320-1.aspx", + "http://www.cna.com.tw/news/afe/201412120339-1.aspx", + "http://www.cna.com.tw/news/afe/201412120346-1.aspx", + "http://www.cna.com.tw/news/afe/201412120347-1.aspx", + "http://www.cna.com.tw/news/afe/201412120355-1.aspx", + "http://www.cna.com.tw/news/afe/201412120358-1.aspx", + "http://www.cna.com.tw/news/afe/201412120359-1.aspx", + "http://www.cna.com.tw/news/afe/201412120361-1.aspx", + "http://www.cna.com.tw/news/afe/201412120367-1.aspx", + "http://www.cna.com.tw/news/afe/201412120369-1.aspx", + "http://www.cna.com.tw/news/afe/201412120370-1.aspx", + "http://www.cna.com.tw/news/afe/201412120374-1.aspx", + "http://www.cna.com.tw/news/afe/201412120380-1.aspx", + "http://www.cna.com.tw/news/afe/201412120381-1.aspx", + "http://www.cna.com.tw/news/afe/201412120386-1.aspx", + "http://www.cna.com.tw/news/afe/201412120390-1.aspx", + "http://www.cna.com.tw/news/afe/201412120394-1.aspx", + "http://www.cna.com.tw/news/afe/201412120395-1.aspx", + "http://www.cna.com.tw/news/afe/201412120397-1.aspx", + "http://www.cna.com.tw/news/afe/201412120402-1.aspx", + "http://www.cna.com.tw/news/afe/201412120403-1.aspx", + "http://www.cna.com.tw/news/afe/201412120405-1.aspx", + "http://www.cna.com.tw/news/afe/201412130007-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120033-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120129-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120171-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120173-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120189-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120203-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120208-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120231-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120259-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120282-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120301-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120305-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120309-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120343-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120351-1.aspx", + "http://www.cna.com.tw/news/ahel/201412120363-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120134-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120135-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120140-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120141-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120142-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120144-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120150-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120154-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120155-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120159-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120160-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120161-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120164-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120165-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120167-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120175-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120186-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120187-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120191-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120194-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120197-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120205-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120211-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120217-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120221-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120222-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120226-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120229-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120234-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120235-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120238-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120240-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120246-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120283-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120292-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120293-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120308-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120310-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120311-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120313-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120319-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120322-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120323-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120327-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120333-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120334-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120335-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120338-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120345-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120350-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120352-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120357-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120375-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120378-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120392-1.aspx", + "http://www.cna.com.tw/news/aipl/201412120401-1.aspx", + "http://www.cna.com.tw/news/ait/201412110030-1.aspx", + "http://www.cna.com.tw/news/ait/201412110092-1.aspx", + "http://www.cna.com.tw/news/ait/201412110119-1.aspx", + "http://www.cna.com.tw/news/ait/201412110196-1.aspx", + "http://www.cna.com.tw/news/ait/201412110268-1.aspx", + "http://www.cna.com.tw/news/ait/201412110400-1.aspx", + "http://www.cna.com.tw/news/ait/201412120025-1.aspx", + "http://www.cna.com.tw/news/ait/201412120028-1.aspx", + "http://www.cna.com.tw/news/ait/201412120130-1.aspx", + "http://www.cna.com.tw/news/ait/201412120136-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120143-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120181-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120185-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120236-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120275-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120276-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120324-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120325-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120340-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120342-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120349-1.aspx", + "http://www.cna.com.tw/news/aloc/201412120389-1.aspx", + "http://www.cna.com.tw/news/amov/201412110042-1.aspx", + "http://www.cna.com.tw/news/amov/201412120094-1.aspx", + "http://www.cna.com.tw/news/amov/201412120106-1.aspx", + "http://www.cna.com.tw/news/amov/201412120120-1.aspx", + "http://www.cna.com.tw/news/amov/201412120172-1.aspx", + "http://www.cna.com.tw/news/amov/201412120233-1.aspx", + "http://www.cna.com.tw/news/amov/201412120326-1.aspx", + "http://www.cna.com.tw/news/amov/201412120328-1.aspx", + "http://www.cna.com.tw/news/amov/201412120348-1.aspx", + "http://www.cna.com.tw/news/amov/201412120377-1.aspx", + "http://www.cna.com.tw/news/amov/201412125010-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120138-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120148-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120151-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120162-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120166-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120206-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120207-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120219-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120225-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120252-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120253-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120273-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120290-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120294-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120295-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120337-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120353-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120354-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120364-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120376-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120379-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120396-1.aspx", + "http://www.cna.com.tw/news/aopl/201412120399-1.aspx", + "http://www.cna.com.tw/news/aopl/201412130002-1.aspx", + "http://www.cna.com.tw/news/aopl/201412130003-1.aspx", + "http://www.cna.com.tw/news/aopl/201412130004-1.aspx", + "http://www.cna.com.tw/news/aopl/201412130006-1.aspx", + "http://www.cna.com.tw/news/asoc/201412110257-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120139-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120149-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120168-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120169-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120179-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120180-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120182-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120188-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120193-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120195-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120199-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120202-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120204-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120212-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120216-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120218-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120232-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120237-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120239-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120243-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120251-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120256-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120274-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120278-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120284-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120297-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120306-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120312-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120329-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120331-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120332-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120336-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120341-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120362-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120373-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120382-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120385-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120387-1.aspx", + "http://www.cna.com.tw/news/asoc/201412120393-1.aspx", + "http://www.cna.com.tw/news/asoc/201412125011-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120146-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120157-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120201-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120223-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120299-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120300-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120330-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120360-1.aspx", + "http://www.cna.com.tw/news/aspt/201412120368-1.aspx", + "http://www.cna.com.tw/news/aspt/201412130005-1.aspx", + "http://www.cna.com.tw/news/firstnews/201411145010-1.aspx", + "http://www.cna.com.tw/news/firstnews/201411155005-1.aspx", + "http://www.cna.com.tw/news/firstnews/201411185014-1.aspx", + "http://www.cna.com.tw/news/firstnews/201411215010-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412065003-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412065004-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412105013-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412105015-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412110116-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412115001-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412120300-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412120383-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412120385-1.aspx", + "http://www.cna.com.tw/news/firstnews/201412125010-1.aspx", + "http://www.cna.com.tw/news/todayinhistory/1209-1.aspx", + "http://www.cna.com.tw/news/todayinhistory/1210-1.aspx", + "http://www.cna.com.tw/news/todayinhistory/1211-1.aspx", + "http://www.cna.com.tw/news/todayinhistory/1212-1.aspx", + "http://www.cna.com.tw/news/todayinhistory/1213-1.aspx", + "http://www.cna.com.tw/topic/popular/4806-1/201412110405-1.aspx", + "http://www.cna.com.tw/topic/popular/4806-1/201412110446-1.aspx", + "http://www.cna.com.tw/topic/popular/4806-1/201412120013-1.aspx", + "http://www.cna.com.tw/topic/popular/4806-1/201412120059-1.aspx", + "http://www.cna.com.tw/topic/popular/4809-1/201412120142-1.aspx", + "http://www.cna.com.tw/topic/popular/4809-1/201412120191-1.aspx", + "http://www.cna.com.tw/topic/popular/4809-1/201412120205-1.aspx", + "http://www.cna.com.tw/topic/popular/4809-1/201412120217-1.aspx" +] \ No newline at end of file diff --git a/tests/models/Crawler/CTS/Crawl.test b/tests/models/Crawler/CTS/Crawl.test new file mode 100644 index 0000000..ad33887 --- /dev/null +++ b/tests/models/Crawler/CTS/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_CTS::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_CTS::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/CTS/Parse.test b/tests/models/Crawler/CTS/Parse.test new file mode 100644 index 0000000..6037245 --- /dev/null +++ b/tests/models/Crawler/CTS/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_CTS::parse (201411111536296.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/201411111536296.html'); + $result = Crawler_CTS::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/201411111536296.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/CTS/data/201411111536296.html b/tests/models/Crawler/CTS/data/201411111536296.html new file mode 100644 index 0000000..af815e1 --- /dev/null +++ b/tests/models/Crawler/CTS/data/201411111536296.html @@ -0,0 +1,662 @@ + + + + + + + + + + + + 超時工作不改 "法朋"太血汗! + + + + + + + + + + + + +
                    TOP
                    +
                    +
                    + +
                    +
                    + + +
                    + + + + +
                    +
                    + +
                    +
                         華視首頁 | 會員中心 | 加入最愛 +
                    +
                    + +
                    +
                    即時新聞:
                    +
                    + + + +
                    +
                    + +
                    + +
                    +
                    + +
                    + +
                    +
                    + +
                    +
                    + +
                    + + + + +
                    + 超時工作不改 "法朋"太血汗! +
                    + +
                    +
                    + + + + + +
                    +
                    + + +
                    + 2014/11/11 12:07 綜合報導    地區:台北市報導
                    +
                    點閱 :
                    +
                    +
                    +
                    + 字級 + + + +

                    + + 友善列印 +
                    + + + + + +
                    + +
                    +

                      喜歡吃甜點的人應該都知道台北東區知名排隊甜點店「法朋」,不過他們卻遭到離職員工爆料,長期超時工作。從上午六、七點工作到晚上十一、二點都是常有的事情,甚至有女員工因為太累,半夜騎車回家,還差點發生車禍,員工淪為血汗勞工。其實早在一年前,勞動局已經介入調查,卻不見店家改進,如今又再度爆發同樣狀況。

                      美味的甜點,光是用看的就要流口水,就連美食部落客都讚不絕口,尤其接近萬聖節,來買蛋糕的人潮更是絡繹不絕,但這些糕點,恐怕都是用員工的血汗換來的。畫面中可以看到,早上六點多,員工陸陸續續來上班,漫長的一天就要開始,我們把時間快轉,等到他們再從公司裡走出來,背著購物袋的女生,還有穿著卡其褲的男生,這一群人熬了一整天,終於下班,但現在已經12點多了。實在是因為工作太辛苦,林先生的親戚受不了已經離職,而這樣的超時工作,的確已經違法。

                      其實去年勞動局就已經來關注過一次,卻不見他們有改善。我們直接來到店家詢問,店家也坦承還是有做不好的地方,承諾會改進讓工作環境更合理,才不會讓員工用辛苦血汗,換來顧客這一口的甜美。

                    +

                    + 【更多新聞詳情請上 - 華視新聞網 】 +
                    + + + +

                    新聞來源:

                    + +
                    + +
                    + + +
                    + + + + + + + +
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    + + + + +
                    +
                    + +
                    + +
                    + + + +
                    + + +
                    + + +
                    +
                    + ◆ 追蹤更多華視影音及圖文新聞:
                    + 1.用Plurk追蹤華視影音及圖文新聞:追蹤
                    + 2.用Twitter追蹤華視影音及圖文新聞:追蹤 +
                    + +
                    +
                    + +
                    + + + + +
                    + +
                    +
                    + 綜合焦點新聞 +      +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    + 新聞性節目 +      + +
                    +
                    + +
                    +
                    + + + + + +
                    +
                    + + + + + +
                    +
                    + + +
                    +
                    + 好吃夯仔內 +      +
                    +
                    + +
                    +
                    +
                    + + +
                    +
                    + 主播檔案 +      +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    + 我有話要說 +      +
                    +
                    + +
                    +
                    + + + + + + +
                    +
                    + + +
                    + +
                    + + + +
                    + + + + + + +
                    + + + + + + +
                    + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/CTS/data/201411111536296.json b/tests/models/Crawler/CTS/data/201411111536296.json new file mode 100644 index 0000000..f2b3f12 --- /dev/null +++ b/tests/models/Crawler/CTS/data/201411111536296.json @@ -0,0 +1,4 @@ +{ + "title": "超時工作不改 ", + "body": "  喜歡吃甜點的人應該都知道台北東區知名排隊甜點店「法朋」,不過他們卻遭到離職員工爆料,長期超時工作。從上午六、七點工作到晚上十一、二點都是常有的事情,甚至有女員工因為太累,半夜騎車回家,還差點發生車禍,員工淪為血汗勞工。其實早在一年前,勞動局已經介入調查,卻不見店家改進,如今又再度爆發同樣狀況。\n\n  美味的甜點,光是用看的就要流口水,就連美食部落客都讚不絕口,尤其接近萬聖節,來買蛋糕的人潮更是絡繹不絕,但這些糕點,恐怕都是用員工的血汗換來的。畫面中可以看到,早上六點多,員工陸陸續續來上班,漫長的一天就要開始,我們把時間快轉,等到他們再從公司裡走出來,背著購物袋的女生,還有穿著卡其褲的男生,這一群人熬了一整天,終於下班,但現在已經12點多了。實在是因為工作太辛苦,林先生的親戚受不了已經離職,而這樣的超時工作,的確已經違法。\n\n  其實去年勞動局就已經來關注過一次,卻不見他們有改善。我們直接來到店家詢問,店家也坦承還是有做不好的地方,承諾會改進讓工作環境更合理,才不會讓員工用辛苦血汗,換來顧客這一口的甜美。\n\r\n \n\n\r\n 【更多新聞詳情請上 - 華視新聞網 】\n" +} \ No newline at end of file diff --git a/tests/models/Crawler/CTS/data/README.md b/tests/models/Crawler/CTS/data/README.md new file mode 100644 index 0000000..7fd3962 --- /dev/null +++ b/tests/models/Crawler/CTS/data/README.md @@ -0,0 +1,14 @@ +CTS data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `201411111536296.html` + From: http://news.cts.com.tw/cts/general/201411/201411111536296.html \ No newline at end of file diff --git a/tests/models/Crawler/CTS/data/listing.html b/tests/models/Crawler/CTS/data/listing.html new file mode 100644 index 0000000..74195ae --- /dev/null +++ b/tests/models/Crawler/CTS/data/listing.html @@ -0,0 +1,996 @@ + + + + + + + + + + + + 華視新聞網 + + + + + + + + + + + +
                    TOP
                    +
                    +
                    + +
                    +
                    + + +
                    + + + + +
                    +
                    + +
                    +
                         華視首頁 | 會員中心 | 加入最愛 +
                    +
                    + +
                    +
                    即時新聞:
                    +
                    + + + +
                    +
                    + +
                    + +
                    +
                    + +
                    + +
                    +
                    + + + +
                    + + 新聞類別選單 + + +
                    +
                    + +
                    + + + + + + + + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    +
                    + + + +
                    + + +
                    + + + + + +
                    + + + + + + + +
                    +
                    + + + + +
                    +
                    + + + + +
                    +
                    +
                    + + + +
                    + 依時間排序今日熱門 +
                    第 6 頁/共 20 頁
                    +
                    + + + + +
                    +
                    +
                    + +
                    +
                    + +
                    2014/12/13 10:31 1220
                    +
                    +李敏鎬最近演出電影《江南1970》,卻被粉絲發現他身形日漸發脹,臉部浮腫出現雙下巴,甚至快變得叫人...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    2014/12/13 10:20 1428
                    +
                    鬧翻後掏空?東京著衣董事長鄭景太去年與前妻周品均離婚後,涉嫌虛設7間公司進行假交易,掏空東京著衣1....(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 10:12 1170
                    +
                    菲律賓最高學府菲律賓大學,在迪里曼分校舉行年度盛大活動「奉獻之跑」(Oblation Run),也就...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    2014/12/13 10:05 1217
                    +
                      今日強烈大陸冷氣團影響,中部以北及東北,部氣溫較低,其他地區早晚氣溫亦低;臺灣東半部地區有短暫,...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 09:55 1151
                    +
                    大換血!義大利名牌Gucci品牌執行長迪馬爾科(Patrizio Di Marco)與創意總監弗里達...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 09:55 1154
                    +
                    大換血!義大利名牌Gucci品牌執行長迪馬爾科(Patrizio Di Marco)與創意總監弗里達...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 09:41 1195
                    +
                    到底有沒有飛碟的存在呢?YouTube最近流傳一段影片,豎立在美國紐約的自由女神旁,竟然有疑似UFO...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 09:36 1192
                    +
                    越捷航空VietJet昨(12)日晚間在桃園機場出境大廳盛大舉辦台北—胡志明市首航典禮,現場不僅有F...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    2014/12/13 09:17 1252
                    +
                    +台北市長當選人柯文哲日前說,第三位副市長是「報紙頭版會報的女企業家」,今(13)日有消息傳出,是廣...(詳全文)
                    +
                    +
                    +
                    +
                    + +
                    2014/12/13 09:11 1151
                    +
                    包括美國、歐盟、日本、韓國、台灣與中國大陸在內的27個世界貿易組織(WTO)會員12月4日就資訊科技...(詳全文)
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    +
                    +
                    + + + + +
                    +
                    + + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    + + +
                    +
                    + 熱門新聞專題 +      +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    + 新聞性節目 +      + +
                    +
                    + +
                    +
                    + + + + + +
                    +
                    + + + + + +
                    +
                    + + +
                    +
                    + 好吃夯仔內 +      +
                    +
                    + +
                    +
                    +
                    + + +
                    +
                    + 主播檔案 +      +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    + 我有話要說 +      +
                    +
                    + +
                    +
                    + + + +
                    +
                    + + +
                    + +
                    + + + +
                    + + + + + + +
                    + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/CTS/data/listing.json b/tests/models/Crawler/CTS/data/listing.json new file mode 100644 index 0000000..5b1bc0a --- /dev/null +++ b/tests/models/Crawler/CTS/data/listing.json @@ -0,0 +1,60 @@ +[ + "http://news.cts.com.tw/cts/entertain/201412/201412111556032.html", + "http://news.cts.com.tw/cts/entertain/201412/201412121556356.html", + "http://news.cts.com.tw/cts/entertain/201412/201412121556451.html", + "http://news.cts.com.tw/cts/entertain/201412/201412121556788.html", + "http://news.cts.com.tw/cts/entertain/201412/201412131556908.html", + "http://news.cts.com.tw/cts/entertain/201412/201412131556909.html", + "http://news.cts.com.tw/cts/general/201411/201411111536296.html", + "http://news.cts.com.tw/cts/general/201412/201412121556332.html", + "http://news.cts.com.tw/cts/general/201412/201412131556856.html", + "http://news.cts.com.tw/cts/general/201412/201412131556859.html", + "http://news.cts.com.tw/cts/general/201412/201412131556891.html", + "http://news.cts.com.tw/cts/general/201412/201412131556892.html", + "http://news.cts.com.tw/cts/general/201412/201412131556895.html", + "http://news.cts.com.tw/cts/general/201412/201412131556896.html", + "http://news.cts.com.tw/cts/general/201412/201412131556897.html", + "http://news.cts.com.tw/cts/general/201412/201412131556900.html", + "http://news.cts.com.tw/cts/general/201412/201412131556901.html", + "http://news.cts.com.tw/cts/general/201412/201412131556902.html", + "http://news.cts.com.tw/cts/general/201412/201412131556904.html", + "http://news.cts.com.tw/cts/general/201412/201412131556905.html", + "http://news.cts.com.tw/cts/general/201412/201412131556906.html", + "http://news.cts.com.tw/cts/general/201412/201412131556913.html", + "http://news.cts.com.tw/cts/general/201412/201412131556915.html", + "http://news.cts.com.tw/cts/general/201412/201412131556931.html", + "http://news.cts.com.tw/cts/international/201412/201412111555592.html", + "http://news.cts.com.tw/cts/international/201412/201412121556585.html", + "http://news.cts.com.tw/cts/international/201412/201412131556858.html", + "http://news.cts.com.tw/cts/international/201412/201412131556916.html", + "http://news.cts.com.tw/cts/international/201412/201412131556917.html", + "http://news.cts.com.tw/cts/international/201412/201412131556918.html", + "http://news.cts.com.tw/cts/international/201412/201412131556919.html", + "http://news.cts.com.tw/cts/life/201412/201412131556868.html", + "http://news.cts.com.tw/cts/life/201412/201412131556893.html", + "http://news.cts.com.tw/cts/life/201412/201412131556894.html", + "http://news.cts.com.tw/cts/life/201412/201412131556903.html", + "http://news.cts.com.tw/cts/politics/201412/201412131556855.html", + "http://news.cts.com.tw/cts/politics/201412/201412131556914.html", + "http://news.cts.com.tw/cts/society/201412/201412121556385.html", + "http://news.cts.com.tw/cts/society/201412/201412131556872.html", + "http://news.cts.com.tw/cts/society/201412/201412131556885.html", + "http://news.cts.com.tw/cts/society/201412/201412131556890.html", + "http://news.cts.com.tw/cts/society/201412/201412131556898.html", + "http://news.cts.com.tw/cts/society/201412/201412131556899.html", + "http://news.cts.com.tw/cts/society/201412/201412131556907.html", + "http://news.cts.com.tw/cts/sports/201412/201412121556490.html", + "http://news.cts.com.tw/nownews/entertain/201412/201412111556028.html", + "http://news.cts.com.tw/nownews/entertain/201412/201412111556075.html", + "http://news.cts.com.tw/nownews/entertain/201412/201412131556878.html", + "http://news.cts.com.tw/nownews/life/201412/201412121556501.html", + "http://news.cts.com.tw/nownews/life/201412/201412131556864.html", + "http://news.cts.com.tw/nownews/life/201412/201412131556869.html", + "http://news.cts.com.tw/nownews/life/201412/201412131556870.html", + "http://news.cts.com.tw/nownews/life/201412/201412131556871.html", + "http://news.cts.com.tw/nownews/life/201412/201412131556884.html", + "http://news.cts.com.tw/nownews/money/201412/201412131556861.html", + "http://news.cts.com.tw/nownews/politics/201412/201412131556865.html", + "http://news.cts.com.tw/nownews/society/201412/201412121556757.html", + "http://news.cts.com.tw/nownews/society/201412/201412131556842.html" +] \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/Crawl.test b/tests/models/Crawler/Chinatimes/Crawl.test new file mode 100644 index 0000000..1d2046e --- /dev/null +++ b/tests/models/Crawler/Chinatimes/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Chinatimes::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Chinatimes::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/Parse.test b/tests/models/Crawler/Chinatimes/Parse.test new file mode 100644 index 0000000..84ae707 --- /dev/null +++ b/tests/models/Crawler/Chinatimes/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_Chinatimes::parse (260115.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/260115.html'); + $result = Crawler_Chinatimes::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/260115.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/data/260115.html b/tests/models/Crawler/Chinatimes/data/260115.html new file mode 100644 index 0000000..235c78b --- /dev/null +++ b/tests/models/Crawler/Chinatimes/data/260115.html @@ -0,0 +1,1248 @@ + + + + + + + + + + 草間彌生 高雄築夢 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    +
                    + +
                    + + + + +
                    +
                    + + + +
                    + +
                    + +
                    +
                    +
                    +

                    + 草間彌生 高雄築夢

                    +
                    + +
                    +
                    + + + 9168 點閱 +
                    +
                    +
                    + +
                    +
                    + + + +
                    +
                    +
                    + + 2/10 +
                    + +
                    +
                    + 我要評比
                    +
                      +
                    • +
                    • +
                    • +
                    • +
                    • +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    + + +
                    +
                    + +
                    +
                    +
                    +
                    + +
                    +
                    +
                     尋找鬱金香
+ 草間彌生(右)的裝置作品《為摯愛的鬱金香永恆祈禱》,是她為亞洲巡迴展特別製作的大型彩色裝置作品。不同色彩、大小的圓點,從平面的牆面延伸到立體的鬱金香裝置,充滿夢幻感。(時藝多媒體提供,Copyright of Yayoi KusamaCourtesy of Ota Fine Arts, Tokyo / Singapore, Victoria Miro, London, David Zwirner, New York, Yayoi Kusama Studio Inc.)
                    +
                     尋找鬱金香 + 草間彌生(右)的裝置作品《為摯愛的鬱金香永恆祈禱》,是她為亞洲巡迴展特別製作的大型彩色裝置作品。不同色彩、大小的圓點,從平面的牆面延伸到立體的鬱金香裝置,充滿夢幻感。(時藝多媒體提供,Copyright of Yayoi KusamaCourtesy of Ota Fine Arts, Tokyo / Singapore, Victoria Miro, London, David Zwirner, New York, Yayoi Kusama Studio Inc.)
                    +
                    + +
                    +
                    +
                    草間彌生(時藝多媒體提供)
                    +
                    草間彌生(時藝多媒體提供)
                    +
                    + +

                    「圓點女王」草間彌生曾自述,自己僅是一位「精神病藝術家」,她說:「若不是為了藝術,我應該很早就自殺了」,顯見藝術是她生命的救贖,她將不斷出現的幻覺「圓點」化為自我治療的方法:透過畫筆描繪更多更多的圓點,「讓自我消融在不斷衍生的幻覺之中」。

                    「夢我所夢」巡迴展已在韓國大邱、上海、首爾等地展出,台灣是最後一站,策畫人、大邱市立美術館館長金善姬表示,這次將展出草間彌生自1960年代以降的繪畫、裝置與圓點等代表作,如讓空間充滿無限圓點的裝置《圓點執念》,大量利用鏡面反射出更多空間的《無限鏡屋》,予人歡喜感的大植物《南瓜》及草間頭戴紅假髮、身穿紅底白黑圓點衣服,配合自編手勢,深情吟唱自創詩篇的錄像裝置《曼哈頓自殺慣犯之歌》等。

                    《為摯愛的鬱金香永恆祈禱》則是為亞洲巡迴展特製的大型彩色裝置,數以千計的彩色圓點從牆面延伸到立體鬱金香裝置上。金善姬說,草間85歲仍熱中創作,「這幾年她多坐在輪椅上畫圖,她在畫圖時沒有上下左右的差別,直到最後簽名才會分出方向。」

                    特別的是,這次「夢我所夢」因台北展場協調不成,主展場在高雄和台中,台北民眾得南下看展。對此,主辦單位邀請三創數位公司協辦,在新落成的「三創生活園區」規劃「認識草間彌生」教育推廣及文創基地,推出草間彌生概念的咖啡美食體驗,並從日引進草間彌生文創衍生品,並結合台灣設計開發的草間風格文創市集,這是「三創生活園區」董事長郭守正聯手亞洲科技與藝術創意團隊夢想啟程的開端。

                    這次獲得台新銀行大力贊助,2015年1月24日、「夢我所夢」正式開展前,台新金控總部大樓1樓率先展出草間彌生的雕塑作品《生命的足跡》,為開展暖身。除此,凡刷台新信用卡購票可獨家享有9折、展覽紀念品95折的優惠。

                    「夢我所夢」門票2014年12月6日於全家、博客來、GROUPON、GOMAJI開賣早鳥票,優惠180元(原價280元)並隨票加贈作品《為摯愛的鬱金香永恆祈禱》限量3D明信片乙張,早鳥票開賣至12月31日止。★再給自己一次機會

                    自殺諮詢專線:0800-788995(24小時)

                    生命線:1995

                    張老師專線:1980

                    +
                    + +
                    + 關鍵字:高雄草間彌生
                    + +
                    +
                    + 分享:
                    +
                      +
                    • +
                    • + +
                    • +
                    • +
                    • +
                    • +
                    • +
                    +
                    +
                    +
                      +
                    • +
                      + 0
                      + 留言數
                    • +
                    • +
                      + 我要評比
                      +
                        +
                      • +
                      • +
                      • +
                      • +
                      • +
                      +
                    • +
                    • +
                      +
                      +
                      + +
                      +
                      + + +
                      +
                    • +
                    +
                    +
                    +
                    + + + + + +
                    + +
                    + +
                    +
                    + +
                    +
                    + + + + +
                    +
                    + + + + +
                    +
                    + +
                    +
                    + 發表意見(0)
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    關閉
                    +
                    +
                    + +
                    + + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + +
                    + +
                    + + +
                    +
                    + + +
                    +
                    +
                    + + + + + + +
                    +
                    + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/data/260115.json b/tests/models/Crawler/Chinatimes/data/260115.json new file mode 100644 index 0000000..db1b7ee --- /dev/null +++ b/tests/models/Crawler/Chinatimes/data/260115.json @@ -0,0 +1,4 @@ +{ + "title": "草間彌生 高雄築夢", + "body": "2014年11月21日 04:10 中國時報 吳垠慧/台北報導 \n\r\n \n\r\n \r\n  尋找鬱金香\r\n 草間彌生(右)的裝置作品《為摯愛的鬱金香永恆祈禱》,是她為亞洲巡迴展特別製作的大型彩色裝置作品。不同色彩、大小的圓點,從平面的牆面延伸到立體的鬱金香裝置,充滿夢幻感。(時藝多媒體提供,Copyright of Yayoi KusamaCourtesy of Ota Fine Arts, Tokyo / Singapore, Victoria Miro, London, David Zwirner, New York, Yayoi Kusama Studio Inc.)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \n\r\n \r\n 草間彌生(時藝多媒體提供)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \n「圓點女王」草間彌生曾自述,自己僅是一位「精神病藝術家」,她說:「若不是為了藝術,我應該很早就自殺了」,顯見藝術是她生命的救贖,她將不斷出現的幻覺「圓點」化為自我治療的方法:透過畫筆描繪更多更多的圓點,「讓自我消融在不斷衍生的幻覺之中」。\n「夢我所夢」巡迴展已在韓國大邱、上海、首爾等地展出,台灣是最後一站,策畫人、大邱市立美術館館長金善姬表示,這次將展出草間彌生自1960年代以降的繪畫、裝置與圓點等代表作,如讓空間充滿無限圓點的裝置《圓點執念》,大量利用鏡面反射出更多空間的《無限鏡屋》,予人歡喜感的大植物《南瓜》及草間頭戴紅假髮、身穿紅底白黑圓點衣服,配合自編手勢,深情吟唱自創詩篇的錄像裝置《曼哈頓自殺慣犯之歌》等。\n OneAD InRead 廣告插入點 \nif (typeof(ONEAD) !== \"undefined\"){ONEAD.cmd = ONEAD.cmd || [];ONEAD.cmd.push(function(){ONEAD_slot('div-inread-ad', 'inread');});} \n《為摯愛的鬱金香永恆祈禱》則是為亞洲巡迴展特製的大型彩色裝置,數以千計的彩色圓點從牆面延伸到立體鬱金香裝置上。金善姬說,草間85歲仍熱中創作,「這幾年她多坐在輪椅上畫圖,她在畫圖時沒有上下左右的差別,直到最後簽名才會分出方向。」\n特別的是,這次「夢我所夢」因台北展場協調不成,主展場在高雄和台中,台北民眾得南下看展。對此,主辦單位邀請三創數位公司協辦,在新落成的「三創生活園區」規劃「認識草間彌生」教育推廣及文創基地,推出草間彌生概念的咖啡美食體驗,並從日引進草間彌生文創衍生品,並結合台灣設計開發的草間風格文創市集,這是「三創生活園區」董事長郭守正聯手亞洲科技與藝術創意團隊夢想啟程的開端。\n這次獲得台新銀行大力贊助,2015年1月24日、「夢我所夢」正式開展前,台新金控總部大樓1樓率先展出草間彌生的雕塑作品《生命的足跡》,為開展暖身。除此,凡刷台新信用卡購票可獨家享有9折、展覽紀念品95折的優惠。\n「夢我所夢」門票2014年12月6日於全家、博客來、GROUPON、GOMAJI開賣早鳥票,優惠180元(原價280元)並隨票加贈作品《為摯愛的鬱金香永恆祈禱》限量3D明信片乙張,早鳥票開賣至12月31日止。★再給自己一次機會\n\n自殺諮詢專線:0800-788995(24小時)\n\n生命線:1995\n\n張老師專線:1980" +} \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/data/README.md b/tests/models/Crawler/Chinatimes/data/README.md new file mode 100644 index 0000000..0603ff8 --- /dev/null +++ b/tests/models/Crawler/Chinatimes/data/README.md @@ -0,0 +1,14 @@ +Chinatimes data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `260115.html` + From: http://www.chinatimes.com/newspapers/20141121002048-260115 diff --git a/tests/models/Crawler/Chinatimes/data/listing.html b/tests/models/Crawler/Chinatimes/data/listing.html new file mode 100644 index 0000000..308ecd1 --- /dev/null +++ b/tests/models/Crawler/Chinatimes/data/listing.html @@ -0,0 +1,19839 @@ + + + + + + + + + + + + +中時電子報 CTnews - Chinatimes.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    +
                    +

                    + 中時電子報

                    +

                    + 優質豐富的新聞媒體

                    +
                    + + +
                    + + + + +
                    + +
                    +
                    +

                    頭條要聞

                    +
                    +
                    + +
                    +
                    + + + + + +
                    +
                    +
                    +

                    + 焦點速報

                    +
                    + +
                    +
                    +
                      +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    +
                    + +
                    + +
                    +
                    + +
                    +
                    +
                    +
                    + + + +
                    + +
                    +
                    +
                    +
                    +
                    + + +
                    + +
                    + +
                    +
                    + +
                    +
                    +

                    編輯精選

                    +
                    +
                    +
                    +
                      + + + +
                    • +

                      林洲民遇李安 不打招呼

                      +
                      林洲民遇李安 不打招呼
                      +

                      準台北市長柯文哲的都發局長為知名建築...

                      + + +
                    • + + + + +
                    • +

                      吳寶春發表聖誕麵包

                      +
                      吳寶春發表聖誕麵包
                      +

                      一直把「到麵包原產地國學習」列入夢想...

                      + + +
                    • + + + + +
                    • +

                      亞洲首富換馬雲

                      +
                      亞洲首富換馬雲
                      +

                      最新彭博億萬富豪指數(Bloomberg Bill...

                      + + +
                    • + + + + + +
                    +
                    + + + + + + +
                    +
                      + + + +
                    • +

                      陸男臉被高壓電吸走

                      +
                      陸男臉被高壓電吸走
                      +

                      小心!沒事不要誤觸高壓電,小心五官都...

                      + + +
                    • + + +
                    • +

                      柯P女兒扮貓熱舞

                      +
                      柯P女兒扮貓熱舞
                      +

                      北一女111週年校慶上,高一「綠躍青春-...

                      + + +
                    • + + + +
                    +
                    + +
                    + + + + +
                    + + +
                    + + + + + +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + +
                    + + + + + +
                    目前 +網站上有 + +4326 + +位使用者Power By GA
                    + + +
                    + + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + +
                    +

                    + 星聞八卦

                    + +
                    +
                    +
                    +
                    +
                      + +
                    • +

                      + + 夫唱婦隨 韓瑜加入《世間情》

                      +
                      + + 夫唱婦隨 韓瑜加入《世間情》
                      +

                      + 韓瑜加入三立八點檔《世間情》演出,飾演保護、疼愛學生的高中老師,老公孫協志在...

                      + +
                    • + +
                    • +

                      + + 蔡郁璇PO憔悴照 讚單身真好

                      +
                      + + 蔡郁璇PO憔悴照 讚單身真好
                      +

                      + 前主播蔡郁璇因前夫高國華爆出喇舌婚外情,8年婚最終只能以離婚收場,日前更因為...

                      + +
                    • + +
                    +
                    + +
                    +
                    + 追星一族
                    + +
                    + +
                    + +
                    + +
                    + +
                    +

                    體壇風雲

                    +
                    +
                    +
                    + + + + + +
                    +
                      + + +
                    • + +

                      哈登發威 火箭延長賽勝國王

                      + +
                      +
                      哈登發威 火箭延長賽勝國王
                      +

                      火箭想要贏球,找哈登就對了!哈登今天率領火箭在客場出戰國王,先在正規賽快結束前,投進追平的大號三分球,又在延長賽獨拿12分,幫助火箭以...

                      + +
                      + +
                    • + + +
                    • + +

                      義大「犀晴女孩」 汰換募新血

                      + +
                      +
                      義大「犀晴女孩」 汰換募新血
                      +

                      2015年義大犀牛啦啦隊為了在新球季帶給球迷朋友們耳目一新的感受,球團決定全面汰換原本「犀睛女孩」的舊班底,重新對外展開甄選活動,新一代...

                      + +
                      + +
                    • + + + + +
                    +
                    +
                    + +
                    +
                    + +
                    + +
                    + +
                    +

                    吃喝玩樂

                    +
                    +
                    +
                    +
                    +
                      + +
                    • +
                      UNIQLO台中路面店開幕
                      +

                      UNIQLO台中路面店開幕

                      +

                      UNIQLO(優衣庫)中南部首家路面店-台中崇德路面店,今(12)上午盛大開幕!以202坪獨棟寬敞購物空間,以及多...

                      + +
                    • + +
                    +
                    +
                    +
                    美食旅遊搶先報
                    + +
                    +
                    +
                    好康情報
                    + +
                    +
                    + +
                    + + +
                    + +
                    +

                    絕對在地

                    +
                    +
                    +
                    + +
                    +
                      + + + + + +
                    • +

                      彰縣首次發放實物券

                      +
                      彰縣首次發放實物券
                      +

                      彰化縣政府因應社會變遷,對弱勢民眾除了以現金給付的社會救助方式,首次增加發放...

                      + +
                    • + + + + + + +
                    • +

                      虎尾大掃除 不再當全國最髒

                      +
                      虎尾大掃除 不再當全國最髒
                      +

                      虎尾被貼上全國最髒標籤,激發公部門與民間合作雪恥行動力,上午鎮長林文彬親自坐...

                      + +
                    • + + + + + + + +
                    +
                    +
                    + + + + + + +
                    高市里政資訊網 推行動版
                    +
                    +

                    高市里政資訊網 推行動版

                    + + + + + + + + + +
                    +
                    +
                    特色產業
                    + +
                    +
                    +
                    地方掃描
                    +
                    + + + + + +
                    搶救母馬 載牠搬新家
                    +
                    +

                    搶救母馬 載牠搬新家

                    + + + + + + +
                    + +
                    +
                    + +
                    + +
                    + +
                    + +

                    時尚科技

                    +
                    +
                    +
                    +
                    +
                      + + + + +
                    • +

                      Flickr公布5大攝影行為觀察

                      +
                      Flickr公布5大攝影行為觀察
                      +

                      全球最大的相片社群平台Flickr,成立至今10年已累積百億張影像。Flickr團隊與Yaho...

                      + + +
                    • + + + + +
                    • +

                      中區資訊月 台灣之星送好康

                      +
                      中區資訊月 台灣之星送好康
                      +

                      中區資訊月於今(12) 日登場,台灣之星祭出多項只給中區民眾的獨家好康。首先加碼...

                      + + +
                    • + + + + + +
                    +
                    +
                    + + + + +
                    2014羅技聖誕節送禮攻略
                    +
                    +

                    2014羅技聖誕節送禮攻略

                    + + + + + + + +
                    +
                    +
                    潮流新品
                    + +
                    +
                    +
                    數位生活
                    + + + + + + + + + + + +
                    +
                    + +
                    + +
                    + +
                    +

                    文學藝術

                    +
                    +
                    +
                    +
                    +
                      + +
                    • +
                      洪易地景裝置 佛陀紀念館首展
                      +

                      洪易地景裝置 佛陀紀念館首展

                      +

                      藝術家洪易「喜氣羊羊」地景裝置展12日起在佛光山佛陀紀念館展出,Q版大型雕塑梅花鹿、兔子、綿羊、花貓及龍,...

                      + + +
                    • + +
                    +
                    +
                    +
                    展覽相關新聞
                    + +
                    +
                    +
                    本周展覽
                    + +
                    +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + +
                    +

                    時論廣場

                    +
                    +
                    +
                    +
                    +
                    社論
                    + + +
                    +
                    + + +
                    +

                    習近平可以給馬英九的啟示

                    +
                    +
                    + + 兩岸政局走向最近出現強烈反差。台灣一場地方選舉把馬英九打入萬...
                    + + + + +
                    +
                    + +
                    +
                    +
                      + + + + + +
                    • +

                      請馬總統遠離顛倒夢想

                      +
                      請馬總統遠離顛倒夢想
                      +

                      針對此次國民黨九合一選戰的慘敗,藍營僅僅保住6縣市,且創下史...

                      + + +
                    • + + + + + + + +
                    • +

                      民進黨要學會跟大陸相處

                      +
                      民進黨要學會跟大陸相處
                      +

                      九合一選舉民進黨雖然取得空前的勝利,但是外界所給的壓力卻也隨...

                      + + +
                    • + + + + + + + +
                    • +

                      短評-溫世仁的遺憾

                      +
                      短評-溫世仁的遺憾
                      +

                      已故英業達副董事長溫世仁生前在甘肅黃羊川發起「千鄉萬才」計畫...

                      + + +
                    • + + + + + + + + + +
                    +
                    +
                    + + + + + +
                    +
                    今日大事
                    +
                    + +
                    + + +
                    + + +
                    + + + +
                    + +
                    + + + +
                    + +
                    + + + + + + + + + + + +
                    + +
                    + + + + + + + +
                    + +
                    + +
                    +
                    + + +
                    + +
                    + +
                    + +
                    + +
                    +
                    +

                    無冕先鋒

                    +
                    +
                    +
                    +
                      + + +
                    • +
                      今日點閱王
                      +

                      周郁蘋

                      +
                      396430
                      +
                      中時電子報娛樂中心
                      +
                      +
                      +
                    • + +
                    • +
                      今日星評王
                      +

                      葉書宏

                      + +
                      +
                      16/10
                      +
                      +
                      + + +
                      中國時報地方新聞中心
                      +
                      +
                      +
                    • + +
                    • +
                      今日我最讚
                      +

                      周郁蘋

                      +
                      56474
                      +
                      中時電子報娛樂中心
                      +
                      +
                      +
                    • + + +
                    +
                    +
                    +
                    現在最具影響力之記者
                    +
                      + + + + + +
                    • +
                      1
                      +

                      盧金足

                      + 點閱:74
                    • + + + + + + +
                    • +
                      2
                      +

                      潘勛

                      + 點閱:54
                    • + + + + + + +
                    • +
                      3
                      +

                      田欣雲

                      + 點閱:35
                    • + + + + + + +
                    • +
                      4
                      +

                      黃嘉平

                      + 點閱:20
                    • + + + + + + +
                    • +
                      5
                      +

                      葉書宏

                      + 點閱:16
                    • + + + + + + +
                    • +
                      6
                      +

                      謝文瑄

                      + 點閱:2
                    • + + + + + + +
                    • + 每小時統計一次,更新時間02:03 +
                    • + + +
                    +
                    +
                    + +
                    + +
                    +
                    +
                    + + + + + + + + + +
                    +
                    + Top
                    +
                    + +
                    + +
                    + + +
                    +
                    + + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + 日報 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    + 讀報重點

                    +
                    +
                    + +
                    +
                    +
                    +

                    + 讀報重點-中國時報

                    +
                      + +
                    • + +
                      + + +
                      + +

                      + + 參選黨魁 朱扛責無可迴避

                      +

                      + 國民黨主席補選今、明兩天開放領表,目前黨內實力派A咖參選態勢已露曙光。台北市長郝龍斌昨開第…

                      +
                    • + +
                    • + +

                      + + 新北首度綠大於藍 可望奪議長

                      +

                      + 新北市議會本屆首度「綠多於藍」,首位非國民黨籍的議長、副議長可望出線!民進黨11日下午進行議長、副議長假投票,最後由陳永福搭配陳文治…

                      +
                    • + +
                    • + +
                      + + +
                      + +

                      + + 拱朱「救國民黨」 34立委連…

                      +

                      + 國民黨立委廖正井昨出示34位黨籍立委連署書,力挺新北市長朱立倫參選黨主席,廖正井說,連署立委…

                      +
                    • + +
                    +
                    + +
                    +
                    +
                    +

                    + 讀報重點-工商時報

                    +
                      + +
                    • + +
                      + + +
                      + +

                      + + 彭淮南:油價跌 有助GDP

                      +

                      + 中央銀行總裁彭淮南昨(11)日至立法院財政委員會報告時指出,油價下跌有助提升GDP(國內生產毛…

                      +
                    • + +
                    • + +
                      + + +
                      + +

                      + + 社論-美、歐、日央行對油價…

                      +

                      + 西德州中級(WTI)及布蘭特(Brent)原油價格6月20日觸及高點後,出現急墜現象,至12月5日累計跌…

                      +
                    • + +
                    • + +

                      + + 台灣GDP增逾4% 已成奢望

                      +

                      + 國內固定資本形成的成長率逐年下滑,公、私部門投資明顯遲滯,台灣綜合研究院長吳再益昨(11)日表示,國內各部門投資都衰退,台灣內需市場…

                      +
                    • + +
                    +
                    +
                    +
                    + + +
                    + +
                    +
                    + + +
                    +
                    +
                    +
                    +

                    + 讀報重點-旺報

                    +
                      + +
                    • + +

                      + + 陸工資增幅創4年新低

                      +

                      + 大陸23個省公布2014年企業工資指導線,調幅平均在12%,相較去年的14%,工資增幅明顯下降,創下近4年來的最低水平。大陸經濟增長放緩,再添…

                      +
                    • + +
                    • + +
                      + + +
                      + +

                      + + 陸工資指導線增幅 創4年新低

                      +

                      + 中國大陸23個省最新發布的今年「企業工資指導線」,其基準線平均在12%,相較去年達14%,工資增長…

                      +
                    • + +
                    • + +

                      + + 國際油價重挫 陸喜中藏隱憂

                      +

                      + 國際原油持續重跌,美國西德州(WTI)原油每桶近日一度跌破60美元,較今年7月的高點,半年不到,跌了四成,信用評等公司穆迪指出,油價跌對…

                      +
                    • + +
                    +
                    +
                    +
                    + + +
                    + +
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +

                    + 要聞速覽

                    +
                    +
                    + +
                    +
                    +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 中國時報 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    + 中國時報新聞總覽

                    +
                    + + +
                    +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 工商時報 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    + 工商時報新聞總覽

                    +
                    + + +
                    +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 旺報 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    + 旺報新聞總覽

                    +
                    + + +
                    +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 時論廣場 - 中國時報 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    + 中國時報新聞總覽

                    +
                    + + +
                    +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 時周精選 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + +
                    +
                    +

                    + 時周精選

                    +
                    +
                    + +
                    + + +
                    + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + 《中時電子報》頭條 + 新聞速覽-頭條速覽將中時報系三報及即時發布的焦點新聞彙整,帶您一次掌握時事的更新,也深入了解新聞重點。 + http://www.chinatimes.com/focus/260501 + + 《中時電子報》頭條 + http://www.chinatimes.com/images/google-news-logo.png + http://www.chinatimes.com/focus/260501 + 144 + 46 + + zh-tw + 中時電子報 + service@infotimes.com.tw + Fri, 12 Dec 2014 21:28:14 +0800 + Fri, 12 Dec 2014 21:37:26 +0800 + CT Editor http://www.facebook.com/CTfans + 60 + + + 【天氣小幫手】國曆十二月十二日 + + http://www.chinatimes.com/realtimenews/20141212001223-260401 + + http://www.chinatimes.com/realtimenews/20141212001223-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001223-260401 + Fri, 12 Dec 2014 06:39:31 +0800 + 綜合整理 + + + 《農民曆小幫手》國曆十二月十二日 + + http://www.chinatimes.com/realtimenews/20141212001225-260401 + + http://www.chinatimes.com/realtimenews/20141212001225-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001225-260401 + Fri, 12 Dec 2014 06:40:40 +0800 + 綜合整理 + + + 12月12日各報頭版要聞 + + http://www.chinatimes.com/realtimenews/20141212001280-260401 + + http://www.chinatimes.com/realtimenews/20141212001280-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001280-260401 + Fri, 12 Dec 2014 07:17:16 +0800 + 謝宗龍 + + + 柯文哲小內閣今出爐 高雄借將多 + + http://www.chinatimes.com/realtimenews/20141212001384-260401 + http://www.chinatimes.com/realtimenews/20141212001384-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001384-260401 + Fri, 12 Dec 2014 07:38:25 +0800 + 綜合報導 + + + 2014.12.11中時部落格熱門文章Top5排行榜 + + http://www.chinatimes.com/realtimenews/20141212001388-260401 + + http://www.chinatimes.com/realtimenews/20141212001388-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001388-260401 + Fri, 12 Dec 2014 07:38:36 +0800 + 社群中心 + + + 勞動局長遴選引爭議 柯P人事難題多 + + http://www.chinatimes.com/realtimenews/20141212001535-260401 + http://www.chinatimes.com/realtimenews/20141212001535-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001535-260401 + Fri, 12 Dec 2014 07:48:04 +0800 + 李詩健、黎冠志 + + + 1周1會給1萬?!許聖梅爆阿基師外遇3年 + + http://www.chinatimes.com/realtimenews/20141212001620-260401 + http://www.chinatimes.com/realtimenews/20141212001620-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001620-260401 + Fri, 12 Dec 2014 07:52:36 +0800 + 綜合報導 + + + 柴油桶沿路漏油!機車打滑連環摔 + + http://www.chinatimes.com/realtimenews/20141212001766-260401 + http://www.chinatimes.com/realtimenews/20141212001766-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001766-260401 + Fri, 12 Dec 2014 08:05:27 +0800 + 周天傑、馬郁雯 + + + 占中清場兩百人被捕 今再清銅鑼灣 + + http://www.chinatimes.com/realtimenews/20141212001807-260401 + http://www.chinatimes.com/realtimenews/20141212001807-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001807-260401 + Fri, 12 Dec 2014 08:09:27 +0800 + 綜合報導 + + + 惡劣賓士車!國道逼車、擋車樣樣來 + + http://www.chinatimes.com/realtimenews/20141212001822-260401 + http://www.chinatimes.com/realtimenews/20141212001822-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001822-260401 + Fri, 12 Dec 2014 08:13:18 +0800 + 金維中、黃種瀛、曾新中 + + + 採離尖峰票價!自強號調降、普悠瑪調漲 + + http://www.chinatimes.com/realtimenews/20141212001858-260401 + http://www.chinatimes.com/realtimenews/20141212001858-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001858-260401 + Fri, 12 Dec 2014 08:20:13 +0800 + 綜合報導 + + + 家中意外要命 每3天害1兒童死亡 + + http://www.chinatimes.com/realtimenews/20141212001862-260401 + http://www.chinatimes.com/realtimenews/20141212001862-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001862-260401 + Fri, 12 Dec 2014 08:21:31 +0800 + 綜合報導 + + + 白色食物加速老化?關鍵在「是否天然」 + + http://www.chinatimes.com/realtimenews/20141212001906-260401 + http://www.chinatimes.com/realtimenews/20141212001906-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001906-260401 + Fri, 12 Dec 2014 08:29:07 +0800 + 綜合報導 + + + 小確幸! 國道客運下月起 最多降30元 + + http://www.chinatimes.com/realtimenews/20141212001925-260401 + http://www.chinatimes.com/realtimenews/20141212001925-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001925-260401 + Fri, 12 Dec 2014 08:37:58 +0800 + 史偉璞、陸穎逸 + + + 搶救腦癌女! 眾人熱線頻call找貴人 + + http://www.chinatimes.com/realtimenews/20141212001937-260401 + http://www.chinatimes.com/realtimenews/20141212001937-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001937-260401 + Fri, 12 Dec 2014 08:43:53 +0800 + 綜合報導 + + + 颱風毀校園 草嶺國小重生宛如天空之城 + + http://www.chinatimes.com/realtimenews/20141212001941-260401 + http://www.chinatimes.com/realtimenews/20141212001941-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001941-260401 + Fri, 12 Dec 2014 08:44:32 +0800 + 廖文賓、黃種瀛、曾新中 + + + 尋狗啟示登看板 主人為愛狗砸大錢 + + http://www.chinatimes.com/realtimenews/20141212001970-260401 + http://www.chinatimes.com/realtimenews/20141212001970-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001970-260401 + Fri, 12 Dec 2014 08:52:22 +0800 + 綜合報導 + + + 單車專用!永安笨鯊橋完工 休憩亮點 + + http://www.chinatimes.com/realtimenews/20141212001992-260401 + http://www.chinatimes.com/realtimenews/20141212001992-260401#disqus + http://www.chinatimes.com/realtimenews/20141212001992-260401 + Fri, 12 Dec 2014 08:59:54 +0800 + 黃 晴、王國霖 + + + 警匪追逐! 嫌持槍闖捷運 警及時壓制 + + http://www.chinatimes.com/realtimenews/20141212002011-260401 + http://www.chinatimes.com/realtimenews/20141212002011-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002011-260401 + Fri, 12 Dec 2014 09:07:14 +0800 + 李英瑋、溫偲含 + + + 珣珣抱病替公益站台 發高燒進加護 + + http://www.chinatimes.com/realtimenews/20141212002030-260401 + http://www.chinatimes.com/realtimenews/20141212002030-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002030-260401 + Fri, 12 Dec 2014 09:10:03 +0800 + 侯國文、黃琲茹 + + + 失控自撞分隔島 疑駕駛酒駕釀禍 + + http://www.chinatimes.com/realtimenews/20141212002071-260401 + http://www.chinatimes.com/realtimenews/20141212002071-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002071-260401 + Fri, 12 Dec 2014 09:18:29 +0800 + 侯宇翔、楊忠聖、黃俊智 + + + 加盟店長鬧輕生 控四海遊龍老闆逼遷 + + http://www.chinatimes.com/realtimenews/20141212002118-260401 + http://www.chinatimes.com/realtimenews/20141212002118-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002118-260401 + Fri, 12 Dec 2014 09:37:40 +0800 + 邵子揚、胡克強、孫培峻、羅立芸 + + + 阿基師多說多錯 「經典名句」流傳更傷 + + http://www.chinatimes.com/realtimenews/20141212002140-260401 + http://www.chinatimes.com/realtimenews/20141212002140-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002140-260401 + Fri, 12 Dec 2014 09:50:15 +0800 + 王彥鈞、陳韻雯 + + + 直擊夜市燒烤 「乾燒」蛤仔變「蛤仔湯」 + + http://www.chinatimes.com/realtimenews/20141212002182-260401 + http://www.chinatimes.com/realtimenews/20141212002182-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002182-260401 + Fri, 12 Dec 2014 10:00:47 +0800 + 綜合報導 + + + 朱立倫臉書宣布 將參選國民黨黨魁 + + http://www.chinatimes.com/realtimenews/20141212002208-260401 + http://www.chinatimes.com/realtimenews/20141212002208-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002208-260401 + Fri, 12 Dec 2014 10:07:16 +0800 + 綜合報導 + + + 變換車道不慎 休旅車遭追撞再翻車 + + http://www.chinatimes.com/realtimenews/20141212002460-260401 + http://www.chinatimes.com/realtimenews/20141212002460-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002460-260401 + Fri, 12 Dec 2014 10:52:41 +0800 + 蔡育楷 + + + YouTube夯片 囊括2014年熱門話題 + + http://www.chinatimes.com/realtimenews/20141212002490-260401 + http://www.chinatimes.com/realtimenews/20141212002490-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002490-260401 + Fri, 12 Dec 2014 11:02:19 +0800 + 姚惠雯 + + + 名廚奧利佛:刈包南韓的 台網民怒 + + http://www.chinatimes.com/realtimenews/20141212002537-260401 + http://www.chinatimes.com/realtimenews/20141212002537-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002537-260401 + Fri, 12 Dec 2014 11:11:45 +0800 + 許臺軒 + + + 「車怎麼騎的」歹徒假自摔 搶婦金項鍊 + + http://www.chinatimes.com/realtimenews/20141212002625-260401 + http://www.chinatimes.com/realtimenews/20141212002625-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002625-260401 + Fri, 12 Dec 2014 11:25:40 +0800 + 賴冠彰、黃琲茹 + + + 貨車疑失控撞交警翻車 2人受傷送醫 + + http://www.chinatimes.com/realtimenews/20141212002779-260401 + http://www.chinatimes.com/realtimenews/20141212002779-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002779-260401 + Fri, 12 Dec 2014 12:02:37 +0800 + 許志銘、張倍滋 + + + 陸空大降價!機票跌千元、客運省30元 + + http://www.chinatimes.com/realtimenews/20141212002878-260401 + http://www.chinatimes.com/realtimenews/20141212002878-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002878-260401 + Fri, 12 Dec 2014 12:20:27 +0800 + 綜合報導 + + + 巴西連續殺人犯落網 10年謀害41人 + + http://www.chinatimes.com/realtimenews/20141212002965-260401 + http://www.chinatimes.com/realtimenews/20141212002965-260401#disqus + http://www.chinatimes.com/realtimenews/20141212002965-260401 + Fri, 12 Dec 2014 12:36:33 +0800 + 綜合報導 + + + 擄高3女餵毒又性侵 惡男重判12年 + + http://www.chinatimes.com/realtimenews/20141212003053-260401 + http://www.chinatimes.com/realtimenews/20141212003053-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003053-260401 + Fri, 12 Dec 2014 13:14:21 +0800 + 廖文賓、黃種瀛、趙政霖 + + + 有薪產檢假5天通過 明天起就能請 + + http://www.chinatimes.com/realtimenews/20141212003067-260401 + http://www.chinatimes.com/realtimenews/20141212003067-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003067-260401 + Fri, 12 Dec 2014 13:21:08 +0800 + 綜合報導 + + + 應徵還要量三圍? 色老闆趁機襲胸 + + http://www.chinatimes.com/realtimenews/20141212003076-260401 + http://www.chinatimes.com/realtimenews/20141212003076-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003076-260401 + Fri, 12 Dec 2014 13:24:06 +0800 + 曾新中、唐 + + + 7日內2波低溫將襲 週末下探11℃ + + http://www.chinatimes.com/realtimenews/20141212003109-260401 + http://www.chinatimes.com/realtimenews/20141212003109-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003109-260401 + Fri, 12 Dec 2014 13:30:44 +0800 + 蔡育楷 + + + 疑天冷取暖不慎 獨居老翁葬身火窟 + + http://www.chinatimes.com/realtimenews/20141212003110-260401 + http://www.chinatimes.com/realtimenews/20141212003110-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003110-260401 + Fri, 12 Dec 2014 13:31:04 +0800 + 邱正閔、黃種瀛、趙政霖 + + + 出門忘關火 鍋焦竄煙 警消破窗救人 + + http://www.chinatimes.com/realtimenews/20141212003144-260401 + http://www.chinatimes.com/realtimenews/20141212003144-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003144-260401 + Fri, 12 Dec 2014 13:39:42 +0800 + 謝崇道'、鄭怡軒、高燕泰 + + + 自行車手無故遭解約 獎金拿不回? + + http://www.chinatimes.com/realtimenews/20141212003145-260401 + http://www.chinatimes.com/realtimenews/20141212003145-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003145-260401 + Fri, 12 Dec 2014 13:39:47 +0800 + 陳思原、葉怡瑩 + + + 造謠又拒洗門風互嗆 男殺婦判15年 + + http://www.chinatimes.com/realtimenews/20141212003193-260401 + http://www.chinatimes.com/realtimenews/20141212003193-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003193-260401 + Fri, 12 Dec 2014 13:49:43 +0800 + 陳嘉貴、黃種瀛、趙政霖 + + + 加油! 珣珣併發敗血症 住加護病房 + + http://www.chinatimes.com/realtimenews/20141212003194-260401 + http://www.chinatimes.com/realtimenews/20141212003194-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003194-260401 + Fri, 12 Dec 2014 13:49:49 +0800 + 侯國文、高孟柔 + + + 金髮穿「藍白拖」 肯亞警破台詐騙集團 + + http://www.chinatimes.com/realtimenews/20141212003256-260401 + http://www.chinatimes.com/realtimenews/20141212003256-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003256-260401 + Fri, 12 Dec 2014 13:58:06 +0800 + 綜合報導 + + + 起薪56K 新加坡搶台灣華語幼師 + + http://www.chinatimes.com/realtimenews/20141212003259-260401 + http://www.chinatimes.com/realtimenews/20141212003259-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003259-260401 + Fri, 12 Dec 2014 13:58:21 +0800 + 侯國文、高孟柔 + + + 多1.8天! 預計年終平均1.38個月 + + http://www.chinatimes.com/realtimenews/20141212003273-260401 + http://www.chinatimes.com/realtimenews/20141212003273-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003273-260401 + Fri, 12 Dec 2014 14:06:52 +0800 + 盧羿宏、郭安妮 + + + 台版「即刻救援」! 警救出遭囚4外籍女 + + http://www.chinatimes.com/realtimenews/20141212003292-260401 + http://www.chinatimes.com/realtimenews/20141212003292-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003292-260401 + Fri, 12 Dec 2014 14:09:22 +0800 + 曾建勳、羅立芸 + + + 有感降價!機票省千元 國道客運砍7% + + http://www.chinatimes.com/realtimenews/20141212003366-260401 + http://www.chinatimes.com/realtimenews/20141212003366-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003366-260401 + Fri, 12 Dec 2014 14:18:18 +0800 + 陳時煉、周立里 + + + 冷爆!寒流級冷氣團襲 上山見「雪」有望 + + http://www.chinatimes.com/realtimenews/20141212003415-260401 + http://www.chinatimes.com/realtimenews/20141212003415-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003415-260401 + Fri, 12 Dec 2014 14:26:51 +0800 + 李正田、鴻恩 + + + 大阪「道頓崛」巨型招牌 吹進逢甲商圈 + + http://www.chinatimes.com/realtimenews/20141212003434-260401 + http://www.chinatimes.com/realtimenews/20141212003434-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003434-260401 + Fri, 12 Dec 2014 14:30:22 +0800 + 陳思原、徐依鈴 + + + 酒駕遇檢「奇想」騎士情侶「換手」全錄 + + http://www.chinatimes.com/realtimenews/20141212003460-260401 + http://www.chinatimes.com/realtimenews/20141212003460-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003460-260401 + Fri, 12 Dec 2014 14:37:36 +0800 + 綜合報導 + + + 「跟著茶飲店投資」 瞄準人潮生意翻轉 + + http://www.chinatimes.com/realtimenews/20141212003470-260401 + http://www.chinatimes.com/realtimenews/20141212003470-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003470-260401 + Fri, 12 Dec 2014 14:41:42 +0800 + 王宗翰、黃琡雯 + + + 跨國毒梟走私八千萬毒品 警飛車攔截 + + http://www.chinatimes.com/realtimenews/20141212003543-260401 + http://www.chinatimes.com/realtimenews/20141212003543-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003543-260401 + Fri, 12 Dec 2014 14:51:52 +0800 + 劉至展、馬郁雯 + + + 又是臉書明志! 朱立倫選黨魁棄2016 + + http://www.chinatimes.com/realtimenews/20141212003559-260401 + http://www.chinatimes.com/realtimenews/20141212003559-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003559-260401 + Fri, 12 Dec 2014 14:59:23 +0800 + 劉琮琦、劉至展 + + + 羨慕!電子業年終18個月 台平均1.38月 + + http://www.chinatimes.com/realtimenews/20141212003568-260401 + http://www.chinatimes.com/realtimenews/20141212003568-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003568-260401 + Fri, 12 Dec 2014 15:03:44 +0800 + 陳致宇、陳欣怡 + + + 16刀殺女友欲滅屍 惡男抄佛經逃死 + + http://www.chinatimes.com/realtimenews/20141212003630-260401 + http://www.chinatimes.com/realtimenews/20141212003630-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003630-260401 + Fri, 12 Dec 2014 15:16:21 +0800 + 綜合報導 + + + 劉泰英14歲孫中風! 家屬疑餿油導致 + + http://www.chinatimes.com/realtimenews/20141212003685-260401 + http://www.chinatimes.com/realtimenews/20141212003685-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003685-260401 + Fri, 12 Dec 2014 15:22:35 +0800 + 黃明君、顧展瓏 + + + 拚觀光開倒車 日本溫泉「刺青禁入」 + + http://www.chinatimes.com/realtimenews/20141212003693-260401 + http://www.chinatimes.com/realtimenews/20141212003693-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003693-260401 + Fri, 12 Dec 2014 15:23:59 +0800 + 謝明智 + + + 海軍新血沱江艦 機動性高又兼匿蹤 + + http://www.chinatimes.com/realtimenews/20141212003714-260401 + http://www.chinatimes.com/realtimenews/20141212003714-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003714-260401 + Fri, 12 Dec 2014 15:30:27 +0800 + 毛嘉慶、粘嘉倫 + + + 全亞洲最會跑的男人 羅維銘 + + http://www.chinatimes.com/realtimenews/20141212003716-260401 + + http://www.chinatimes.com/realtimenews/20141212003716-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003716-260401 + Fri, 12 Dec 2014 15:33:42 +0800 + 綜合報導 + + + 美艦啟用雷射砲 命中率近100%! + + http://www.chinatimes.com/realtimenews/20141212003728-260401 + http://www.chinatimes.com/realtimenews/20141212003728-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003728-260401 + Fri, 12 Dec 2014 15:36:19 +0800 + 施岱君 + + + 八年級政治新世代 靈活出征闖政壇 + + http://www.chinatimes.com/realtimenews/20141212003745-260401 + http://www.chinatimes.com/realtimenews/20141212003745-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003745-260401 + Fri, 12 Dec 2014 15:38:08 +0800 + 綜合報導 + + + 僅雯看風水買房投資 轉手進帳數百萬 + + http://www.chinatimes.com/realtimenews/20141212003789-260401 + http://www.chinatimes.com/realtimenews/20141212003789-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003789-260401 + Fri, 12 Dec 2014 15:53:23 +0800 + 邱子玲、洪襲禹 + + + 基神「嘴對嘴還好啦」 婆媽:太失望了 + + http://www.chinatimes.com/realtimenews/20141212003845-260401 + http://www.chinatimes.com/realtimenews/20141212003845-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003845-260401 + Fri, 12 Dec 2014 16:08:22 +0800 + 連雅卉、董佑駿 + + + 食安後挽人氣 南門市場「登錄」把關 + + http://www.chinatimes.com/realtimenews/20141212003860-260401 + http://www.chinatimes.com/realtimenews/20141212003860-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003860-260401 + Fri, 12 Dec 2014 16:15:46 +0800 + 綜合報導 + + + 猜猜大明星?12月12日 + + http://www.chinatimes.com/realtimenews/20141212003899-260401 + + http://www.chinatimes.com/realtimenews/20141212003899-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003899-260401 + Fri, 12 Dec 2014 16:27:27 +0800 + 內容應用中心 + + + 網購退貨遭刁難 賣方要求付運費 + + http://www.chinatimes.com/realtimenews/20141212003907-260401 + http://www.chinatimes.com/realtimenews/20141212003907-260401#disqus + http://www.chinatimes.com/realtimenews/20141212003907-260401 + Fri, 12 Dec 2014 16:29:44 +0800 + 翁崇文、陳谷旻 + + + 天雨攀爬圍牆 國三生跌落5米高地面 + + http://www.chinatimes.com/realtimenews/20141212004184-260401 + http://www.chinatimes.com/realtimenews/20141212004184-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004184-260401 + Fri, 12 Dec 2014 17:23:24 +0800 + 黃建璋 + + + 烏龍!粗心媽只顧講手機 丟包女兒 + + http://www.chinatimes.com/realtimenews/20141212004218-260401 + http://www.chinatimes.com/realtimenews/20141212004218-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004218-260401 + Fri, 12 Dec 2014 17:35:53 +0800 + 廖威凌、何橞瑢 + + + 1週1萬包養? 阿基師:亂講 相信我人格 + + http://www.chinatimes.com/realtimenews/20141212004351-260401 + http://www.chinatimes.com/realtimenews/20141212004351-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004351-260401 + Fri, 12 Dec 2014 18:25:41 +0800 + 綜合報導 + + + 2學生車禍亡 家屬尋目擊者助緝凶 + + http://www.chinatimes.com/realtimenews/20141212004362-260401 + http://www.chinatimes.com/realtimenews/20141212004362-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004362-260401 + Fri, 12 Dec 2014 18:33:34 +0800 + 林易伸、吳宜蓁 + + + 直逼零度!冷氣團到 太平山一片白霧 + + http://www.chinatimes.com/realtimenews/20141212004384-260401 + http://www.chinatimes.com/realtimenews/20141212004384-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004384-260401 + Fri, 12 Dec 2014 18:42:31 +0800 + 何橞瑢 + + + 停車糾紛!剪刀刺肚還不夠 5煞打進急診室 + + http://www.chinatimes.com/realtimenews/20141212004404-260401 + http://www.chinatimes.com/realtimenews/20141212004404-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004404-260401 + Fri, 12 Dec 2014 18:51:26 +0800 + 綜合報導 + + + 柯文哲拜會李登輝 稱「聊到飽」為止 + + http://www.chinatimes.com/realtimenews/20141212004417-260401 + http://www.chinatimes.com/realtimenews/20141212004417-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004417-260401 + Fri, 12 Dec 2014 18:54:46 +0800 + 陳韻雯 + + + 火鍋熱量地雷! 蒙古鍋一碗300大卡 + + http://www.chinatimes.com/realtimenews/20141212004555-260401 + http://www.chinatimes.com/realtimenews/20141212004555-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004555-260401 + Fri, 12 Dec 2014 19:23:01 +0800 + 紀博師、高孟柔 + + + 低溫搶吃「低卡鍋」 水果茶、豆漿成湯底 + + http://www.chinatimes.com/realtimenews/20141212004638-260401 + http://www.chinatimes.com/realtimenews/20141212004638-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004638-260401 + Fri, 12 Dec 2014 19:35:10 +0800 + 陳聖易、張莘怡 + + + 劣!5男持棍棒 衝急診室尋仇打人 + + http://www.chinatimes.com/realtimenews/20141212004688-260401 + http://www.chinatimes.com/realtimenews/20141212004688-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004688-260401 + Fri, 12 Dec 2014 20:00:12 +0800 + 韓志興 + + + 柯文哲嫌台北醜 請建築大師掌都發局 + + http://www.chinatimes.com/realtimenews/20141212004736-260401 + http://www.chinatimes.com/realtimenews/20141212004736-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004736-260401 + Fri, 12 Dec 2014 20:10:15 +0800 + 詹品宏、黎冠志 + + + 朱立倫參選黨魁 藍營吞下定心丸 + + http://www.chinatimes.com/realtimenews/20141212004750-260401 + http://www.chinatimes.com/realtimenews/20141212004750-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004750-260401 + Fri, 12 Dec 2014 20:13:38 +0800 + 李維庭、徐弋桓、毛嘉 + + + 【明日天氣預報】2014年12月13日白天氣象觀測 + + http://www.chinatimes.com/realtimenews/20141212004765-260401 + + http://www.chinatimes.com/realtimenews/20141212004765-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004765-260401 + Fri, 12 Dec 2014 20:17:04 +0800 + 綜合整理 + + + 珣珣高燒入院 貼心安慰媽媽:我還好 + + http://www.chinatimes.com/realtimenews/20141212004768-260401 + http://www.chinatimes.com/realtimenews/20141212004768-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004768-260401 + Fri, 12 Dec 2014 20:17:50 +0800 + 賴昇宏、鄭怡軒、吳國禎 + + + 不選2016總統!朱立倫:我雙子座 說到做到 + + http://www.chinatimes.com/realtimenews/20141212004791-260401 + http://www.chinatimes.com/realtimenews/20141212004791-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004791-260401 + Fri, 12 Dec 2014 20:25:53 +0800 + 陳建安、黃圓媛 + + + 救救我孫!滿月嬰吐白沫 翁攔警求救 + + http://www.chinatimes.com/realtimenews/20141212004792-260401 + http://www.chinatimes.com/realtimenews/20141212004792-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004792-260401 + Fri, 12 Dec 2014 20:25:54 +0800 + 葉韋麟、馬郁雯 + + + 救救我孫!滿月嬰吐白沫 翁攔警求救 + + http://www.chinatimes.com/realtimenews/20141212004830-260401 + http://www.chinatimes.com/realtimenews/20141212004830-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004830-260401 + Fri, 12 Dec 2014 20:33:36 +0800 + 綜合報導 + + + 2樓鐵捲門未開 國三生攀女兒牆墜樓 + + http://www.chinatimes.com/realtimenews/20141212004834-260401 + http://www.chinatimes.com/realtimenews/20141212004834-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004834-260401 + Fri, 12 Dec 2014 20:35:35 +0800 + 陳嘉貴、黃種瀛、曾新中 + + + 阿基師染「腥」受考驗 傳退出媒體!? + + http://www.chinatimes.com/realtimenews/20141212004837-260401 + http://www.chinatimes.com/realtimenews/20141212004837-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004837-260401 + Fri, 12 Dec 2014 20:40:28 +0800 + 綜合報導 + + + 淡江大學傳隨機襲擊 校方竟冷處理 + + http://www.chinatimes.com/realtimenews/20141212004838-260401 + http://www.chinatimes.com/realtimenews/20141212004838-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004838-260401 + Fri, 12 Dec 2014 20:40:55 +0800 + 邵子揚、曾建勳、羅立芸 + + + 高市City Bike超貴!半天租金逾億? + + http://www.chinatimes.com/realtimenews/20141212004852-260401 + http://www.chinatimes.com/realtimenews/20141212004852-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004852-260401 + Fri, 12 Dec 2014 20:47:34 +0800 + 鄭怡軒、謝崇道 + + + 小資去寒養生法 一毛錢都不必花! + + http://www.chinatimes.com/realtimenews/20141212004863-260401 + http://www.chinatimes.com/realtimenews/20141212004863-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004863-260401 + Fri, 12 Dec 2014 20:53:03 +0800 + 陳玄白、周亭羽 + + + 太平輪拍攝砸20億 不分2集恐虧錢 + + http://www.chinatimes.com/realtimenews/20141212004878-260401 + http://www.chinatimes.com/realtimenews/20141212004878-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004878-260401 + Fri, 12 Dec 2014 20:57:00 +0800 + 綜合報導 + + + 氣溫冷吱吱!麻辣火鍋暖呼呼受歡迎 + + http://www.chinatimes.com/realtimenews/20141212004879-260401 + http://www.chinatimes.com/realtimenews/20141212004879-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004879-260401 + Fri, 12 Dec 2014 20:57:02 +0800 + 陳時煉、周立里 + + + 拆房子、鑽廁所 「娜娜」遭擄竊案偵破 + + http://www.chinatimes.com/realtimenews/20141212004910-260401 + http://www.chinatimes.com/realtimenews/20141212004910-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004910-260401 + Fri, 12 Dec 2014 21:05:21 +0800 + 廖文賓、黃種瀛、趙政霖 + + + 車「內、外」循環學問 視路況空污切換 + + http://www.chinatimes.com/realtimenews/20141212004911-260401 + http://www.chinatimes.com/realtimenews/20141212004911-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004911-260401 + Fri, 12 Dec 2014 21:05:27 +0800 + 陳思原、張峻棟 + + + 扁保外就醫聲明異議 高院駁回! + + http://www.chinatimes.com/realtimenews/20141212004923-260401 + http://www.chinatimes.com/realtimenews/20141212004923-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004923-260401 + Fri, 12 Dec 2014 21:09:30 +0800 + 方昶懿、陳濡群 + + + 啥!高市公共腳踏車 1天租金700兆 + + http://www.chinatimes.com/realtimenews/20141212004942-260401 + http://www.chinatimes.com/realtimenews/20141212004942-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004942-260401 + Fri, 12 Dec 2014 21:19:26 +0800 + 陳谷旻、張莘怡 + + + 惡劣!狠心狗主人 開車當街棄狗離去 + + http://www.chinatimes.com/realtimenews/20141212004955-260401 + http://www.chinatimes.com/realtimenews/20141212004955-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004955-260401 + Fri, 12 Dec 2014 21:22:40 +0800 + 邱正閔、曾新中 + + + 村民反養雞場 組人牆爆激烈推擠 + + http://www.chinatimes.com/realtimenews/20141212004966-260401 + http://www.chinatimes.com/realtimenews/20141212004966-260401#disqus + http://www.chinatimes.com/realtimenews/20141212004966-260401 + Fri, 12 Dec 2014 21:28:14 +0800 + 賴昇宏、鄭怡軒、吳國禎 + + + 夢醒時刻 海軍司令陳永康訪美 + + http://www.chinatimes.com/realtimenews/20141212000020-260401 + + http://www.chinatimes.com/realtimenews/20141212000020-260401#disqus + http://www.chinatimes.com/realtimenews/20141212000020-260401 + Fri, 12 Dec 2014 01:06:52 +0800 + 劉屏 + + + 參選黨魁 朱扛責無可迴避 + + http://www.chinatimes.com/newspapers/20141212000392-260102 + + http://www.chinatimes.com/newspapers/20141212000392-260102#disqus + http://www.chinatimes.com/newspapers/20141212000392-260102 + Fri, 12 Dec 2014 04:10:05 +0800 + 楊毅、王正寧、李明賢、盧金足/綜合報導 + + + 新北首度綠大於藍 可望奪議長 + + http://www.chinatimes.com/newspapers/20141212000396-260102 + http://www.chinatimes.com/newspapers/20141212000396-260102#disqus + http://www.chinatimes.com/newspapers/20141212000396-260102 + Fri, 12 Dec 2014 04:10:05 +0800 + 池雅蓉、林金池/新北報導 + + + 拱朱「救國民黨」 34立委連署 親王派未參與 + + http://www.chinatimes.com/newspapers/20141212000397-260102 + + http://www.chinatimes.com/newspapers/20141212000397-260102#disqus + http://www.chinatimes.com/newspapers/20141212000397-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 林思慧/台北報導 + + + 議會卡死黨主席 朱恐腹背受敵 + + http://www.chinatimes.com/newspapers/20141212000399-260102 + http://www.chinatimes.com/newspapers/20141212000399-260102#disqus + http://www.chinatimes.com/newspapers/20141212000399-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 林金池/特稿 + + + 強調「世代交替」 洪秀柱:青壯之士快站出來 + + http://www.chinatimes.com/newspapers/20141212000400-260102 + http://www.chinatimes.com/newspapers/20141212000400-260102#disqus + http://www.chinatimes.com/newspapers/20141212000400-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 楊毅/台北報導 + + + 謝長廷:藍失民意 八年才能恢復 + + http://www.chinatimes.com/newspapers/20141212000401-260102 + + http://www.chinatimes.com/newspapers/20141212000401-260102#disqus + http://www.chinatimes.com/newspapers/20141212000401-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 陳文信/綜合報導 + + + 建築獎常客 林洲民出任北市都發局長 + + http://www.chinatimes.com/newspapers/20141212000402-260102 + + http://www.chinatimes.com/newspapers/20141212000402-260102#disqus + http://www.chinatimes.com/newspapers/20141212000402-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 吳垠慧/人物側寫 + + + 傅永茂掌兵役局 姚立明力薦 + + http://www.chinatimes.com/newspapers/20141212000405-260102 + + http://www.chinatimes.com/newspapers/20141212000405-260102#disqus + http://www.chinatimes.com/newspapers/20141212000405-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 呂昭隆/台北報導 + + + 高捷推手 周禮良回熟悉的軌道 + + http://www.chinatimes.com/newspapers/20141212000406-260102 + + http://www.chinatimes.com/newspapers/20141212000406-260102#disqus + http://www.chinatimes.com/newspapers/20141212000406-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 李義/人物側寫 + + + 勞動局長備選 只剩3人 + + http://www.chinatimes.com/newspapers/20141212000407-260102 + + http://www.chinatimes.com/newspapers/20141212000407-260102#disqus + http://www.chinatimes.com/newspapers/20141212000407-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 江慧珺、管婺媛/台北報導 + + + 柯:過程有問題 會負政治成敗 + + http://www.chinatimes.com/newspapers/20141212000410-260102 + http://www.chinatimes.com/newspapers/20141212000410-260102#disqus + http://www.chinatimes.com/newspapers/20141212000410-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 江慧珺/台北報導 + + + 女性副市長 鎖定年薪5000萬企業家 + + http://www.chinatimes.com/newspapers/20141212000411-260102 + + http://www.chinatimes.com/newspapers/20141212000411-260102#disqus + http://www.chinatimes.com/newspapers/20141212000411-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 江慧珺、陳宥臻、陳芃、林宜慧/台北報導 + + + 湯志民:課綱微調非我主動提出 + + http://www.chinatimes.com/newspapers/20141212000413-260102 + http://www.chinatimes.com/newspapers/20141212000413-260102#disqus + http://www.chinatimes.com/newspapers/20141212000413-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 張潼、陳芃、江慧珺/台北報導 + + + 台中文學館 年底將開幕 + + http://www.chinatimes.com/newspapers/20141212000760-260102 + + http://www.chinatimes.com/newspapers/20141212000760-260102#disqus + http://www.chinatimes.com/newspapers/20141212000760-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 文/黃繡鳳 + + + 書花聯展 富椿莊傳遞愛與美 + + http://www.chinatimes.com/newspapers/20141212000762-260102 + + http://www.chinatimes.com/newspapers/20141212000762-260102#disqus + http://www.chinatimes.com/newspapers/20141212000762-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 文/黃繡鳳 + + + 賴秀瑩突破自我 說故事賣房 + + http://www.chinatimes.com/newspapers/20141212000764-260102 + + http://www.chinatimes.com/newspapers/20141212000764-260102#disqus + http://www.chinatimes.com/newspapers/20141212000764-260102 + Fri, 12 Dec 2014 04:10:06 +0800 + 文/黃繡鳳 + + + 用鏡頭捕捉7期三大地標 + + http://www.chinatimes.com/newspapers/20141212000766-260102 + + http://www.chinatimes.com/newspapers/20141212000766-260102#disqus + http://www.chinatimes.com/newspapers/20141212000766-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 文/黃繡鳳 + + + 沅林建設 奪金石獎雙首獎 + + http://www.chinatimes.com/newspapers/20141212000768-260102 + + http://www.chinatimes.com/newspapers/20141212000768-260102#disqus + http://www.chinatimes.com/newspapers/20141212000768-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 文/黃繡鳳 + + + 柯P小內閣出爐 + + http://www.chinatimes.com/newspapers/20141212000792-260102 + + http://www.chinatimes.com/newspapers/20141212000792-260102#disqus + http://www.chinatimes.com/newspapers/20141212000792-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 江慧珺、陳芃、吳垠慧、李義/綜合報導 + + + 啊!基師代言 桂格貼封條 + + http://www.chinatimes.com/newspapers/20141212000794-260102 + + http://www.chinatimes.com/newspapers/20141212000794-260102#disqus + http://www.chinatimes.com/newspapers/20141212000794-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 李姿瑩、徐亦橋、郭家崴/綜合報導 + + + 拉K拒捕 持槍闖捷運站 + + http://www.chinatimes.com/newspapers/20141212000797-260102 + + http://www.chinatimes.com/newspapers/20141212000797-260102#disqus + http://www.chinatimes.com/newspapers/20141212000797-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 王揚傑/新北報導 + + + 柯建銘爆黃世銘向法官關說 + + http://www.chinatimes.com/newspapers/20141212000799-260102 + + http://www.chinatimes.com/newspapers/20141212000799-260102#disqus + http://www.chinatimes.com/newspapers/20141212000799-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 林偉信/台北報導 + + + 潛艦夢醒時刻 海軍司令訪美 + + http://www.chinatimes.com/newspapers/20141212000802-260102 + + http://www.chinatimes.com/newspapers/20141212000802-260102#disqus + http://www.chinatimes.com/newspapers/20141212000802-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 劉屏/華盛頓11日電 + + + 推內閣制 藍委喊修憲 不然2016別選了 + + http://www.chinatimes.com/newspapers/20141212000806-260102 + http://www.chinatimes.com/newspapers/20141212000806-260102#disqus + http://www.chinatimes.com/newspapers/20141212000806-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 管婺媛、林思慧、陳文信/台北報導 + + + 許信良:問題在政黨文化 + + http://www.chinatimes.com/newspapers/20141212000808-260102 + http://www.chinatimes.com/newspapers/20141212000808-260102#disqus + http://www.chinatimes.com/newspapers/20141212000808-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 陳文信/台北報導 + + + 退輔會:榮工民營化 依法招標 + + http://www.chinatimes.com/newspapers/20141212000809-260102 + http://www.chinatimes.com/newspapers/20141212000809-260102#disqus + http://www.chinatimes.com/newspapers/20141212000809-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 呂昭隆/台北報導 + + + 扁保外就醫 高院最快今裁定 + + http://www.chinatimes.com/newspapers/20141212000810-260102 + http://www.chinatimes.com/newspapers/20141212000810-260102#disqus + http://www.chinatimes.com/newspapers/20141212000810-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 林偉信、王己由、陳志賢/台北報導 + + + 大戶條款廢?曾銘宗槓張盛和 + + http://www.chinatimes.com/newspapers/20141212000831-260102 + + http://www.chinatimes.com/newspapers/20141212000831-260102#disqus + http://www.chinatimes.com/newspapers/20141212000831-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 洪正吉/台北報導 + + + 朱成志:懲罰條款 愚不可及 + + http://www.chinatimes.com/newspapers/20141212000834-260102 + http://www.chinatimes.com/newspapers/20141212000834-260102#disqus + http://www.chinatimes.com/newspapers/20141212000834-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 蒼弘慈/台北報導 + + + 學者建議:暫時凍結 不上路 + + http://www.chinatimes.com/newspapers/20141212000835-260102 + http://www.chinatimes.com/newspapers/20141212000835-260102#disqus + http://www.chinatimes.com/newspapers/20141212000835-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 吳泓勳/台北報導 + + + 14歲孫中風劉泰英疑毒油害的 + + http://www.chinatimes.com/newspapers/20141212000836-260102 + + http://www.chinatimes.com/newspapers/20141212000836-260102#disqus + http://www.chinatimes.com/newspapers/20141212000836-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 洪凱音/台北報導 + + + 消基會籲網魚檢驗 撈黑心油潛毒 + + http://www.chinatimes.com/newspapers/20141212000838-260102 + http://www.chinatimes.com/newspapers/20141212000838-260102#disqus + http://www.chinatimes.com/newspapers/20141212000838-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 洪欣慈/台北報導 + + + RCA致癌案見春光 盼公道 + + http://www.chinatimes.com/newspapers/20141212000839-260102 + + http://www.chinatimes.com/newspapers/20141212000839-260102#disqus + http://www.chinatimes.com/newspapers/20141212000839-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 湯雅雯/台北報導 + + + 郭董幼女滿月 與媽同生日 + + http://www.chinatimes.com/newspapers/20141212000841-260102 + + http://www.chinatimes.com/newspapers/20141212000841-260102#disqus + http://www.chinatimes.com/newspapers/20141212000841-260102 + Fri, 12 Dec 2014 04:10:07 +0800 + 康文柔/台北報導 + + + 名嘴轟到破表 型男主廚也飆高 + + http://www.chinatimes.com/newspapers/20141212000843-260102 + + http://www.chinatimes.com/newspapers/20141212000843-260102#disqus + http://www.chinatimes.com/newspapers/20141212000843-260102 + Fri, 12 Dec 2014 04:10:08 +0800 + 李姿瑩、潘鈺禎/台北報導 + + + 他的名句 網友拼出年菜 + + http://www.chinatimes.com/newspapers/20141212000845-260102 + http://www.chinatimes.com/newspapers/20141212000845-260102#disqus + http://www.chinatimes.com/newspapers/20141212000845-260102 + Fri, 12 Dec 2014 04:10:08 +0800 + 陳志東/台北報導 + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + + + + + + + + + + 即時新聞 - 中時電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    +
                    +

                    中時電子報

                    +

                    優質豐富的新聞媒體

                    +
                    + + +
                    + +
                    +
                    + + + + + +
                    +
                    + + + +
                    +
                    +

                    即時總覽

                    +
                    + + +
                    + +
                    +
                    + 現正發燒關鍵字
                    + +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    + + +
                    + + + + +
                    + + +
                    +
                    + Top
                    +
                    + + + + + + + + + + +
                    + +
                    + +
                    + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Chinatimes/data/listing.json b/tests/models/Crawler/Chinatimes/data/listing.json new file mode 100644 index 0000000..b884cee --- /dev/null +++ b/tests/models/Crawler/Chinatimes/data/listing.json @@ -0,0 +1,432 @@ +[ + "http://www.chinatimes.com/newspapers/20141121002048-260115", + "http://www.chinatimes.com/newspapers/20141121002051-260115", + "http://www.chinatimes.com/newspapers/20141206001079-260603", + "http://www.chinatimes.com/newspapers/20141206001083-260603", + "http://www.chinatimes.com/newspapers/20141206001087-260603", + "http://www.chinatimes.com/newspapers/20141207000825-260603", + "http://www.chinatimes.com/newspapers/20141207000829-260603", + "http://www.chinatimes.com/newspapers/20141207000834-260603", + "http://www.chinatimes.com/newspapers/20141208000914-260603", + "http://www.chinatimes.com/newspapers/20141208000918-260603", + "http://www.chinatimes.com/newspapers/20141208000922-260603", + "http://www.chinatimes.com/newspapers/20141209001030-260306", + "http://www.chinatimes.com/newspapers/20141209001064-260603", + "http://www.chinatimes.com/newspapers/20141209001069-260603", + "http://www.chinatimes.com/newspapers/20141209001074-260603", + "http://www.chinatimes.com/newspapers/20141210000848-260115", + "http://www.chinatimes.com/newspapers/20141210000850-260115", + "http://www.chinatimes.com/newspapers/20141210001039-260603", + "http://www.chinatimes.com/newspapers/20141210001043-260603", + "http://www.chinatimes.com/newspapers/20141210001047-260603", + "http://www.chinatimes.com/newspapers/20141211000330-260207", + "http://www.chinatimes.com/newspapers/20141211000804-260113", + "http://www.chinatimes.com/newspapers/20141211000824-260113", + "http://www.chinatimes.com/newspapers/20141211000830-260113", + "http://www.chinatimes.com/newspapers/20141211000842-260113", + "http://www.chinatimes.com/newspapers/20141211001139-260310", + "http://www.chinatimes.com/newspapers/20141211001168-260603", + "http://www.chinatimes.com/newspapers/20141211001173-260603", + "http://www.chinatimes.com/newspapers/20141211001204-260603", + "http://www.chinatimes.com/newspapers/20141212000025-260202", + "http://www.chinatimes.com/newspapers/20141212000027-260202", + "http://www.chinatimes.com/newspapers/20141212000028-260202", + "http://www.chinatimes.com/newspapers/20141212000030-260202", + "http://www.chinatimes.com/newspapers/20141212000031-260202", + "http://www.chinatimes.com/newspapers/20141212000032-260202", + "http://www.chinatimes.com/newspapers/20141212000034-260202", + "http://www.chinatimes.com/newspapers/20141212000036-260202", + "http://www.chinatimes.com/newspapers/20141212000039-260202", + "http://www.chinatimes.com/newspapers/20141212000040-260202", + "http://www.chinatimes.com/newspapers/20141212000041-260202", + "http://www.chinatimes.com/newspapers/20141212000049-260202", + "http://www.chinatimes.com/newspapers/20141212000052-260202", + "http://www.chinatimes.com/newspapers/20141212000054-260202", + "http://www.chinatimes.com/newspapers/20141212000060-260202", + "http://www.chinatimes.com/newspapers/20141212000392-260102", + "http://www.chinatimes.com/newspapers/20141212000396-260102", + "http://www.chinatimes.com/newspapers/20141212000397-260102", + "http://www.chinatimes.com/newspapers/20141212000399-260102", + "http://www.chinatimes.com/newspapers/20141212000400-260102", + "http://www.chinatimes.com/newspapers/20141212000401-260102", + "http://www.chinatimes.com/newspapers/20141212000402-260102", + "http://www.chinatimes.com/newspapers/20141212000405-260102", + "http://www.chinatimes.com/newspapers/20141212000406-260102", + "http://www.chinatimes.com/newspapers/20141212000407-260102", + "http://www.chinatimes.com/newspapers/20141212000410-260102", + "http://www.chinatimes.com/newspapers/20141212000411-260102", + "http://www.chinatimes.com/newspapers/20141212000413-260102", + "http://www.chinatimes.com/newspapers/20141212000472-260107", + "http://www.chinatimes.com/newspapers/20141212000493-260107", + "http://www.chinatimes.com/newspapers/20141212000500-260107", + "http://www.chinatimes.com/newspapers/20141212000506-260107", + "http://www.chinatimes.com/newspapers/20141212000760-260102", + "http://www.chinatimes.com/newspapers/20141212000762-260102", + "http://www.chinatimes.com/newspapers/20141212000764-260102", + "http://www.chinatimes.com/newspapers/20141212000766-260102", + "http://www.chinatimes.com/newspapers/20141212000768-260102", + "http://www.chinatimes.com/newspapers/20141212000775-260111", + "http://www.chinatimes.com/newspapers/20141212000792-260102", + "http://www.chinatimes.com/newspapers/20141212000794-260102", + "http://www.chinatimes.com/newspapers/20141212000797-260102", + "http://www.chinatimes.com/newspapers/20141212000799-260102", + "http://www.chinatimes.com/newspapers/20141212000802-260102", + "http://www.chinatimes.com/newspapers/20141212000806-260102", + "http://www.chinatimes.com/newspapers/20141212000808-260102", + "http://www.chinatimes.com/newspapers/20141212000809-260102", + "http://www.chinatimes.com/newspapers/20141212000810-260102", + "http://www.chinatimes.com/newspapers/20141212000831-260102", + "http://www.chinatimes.com/newspapers/20141212000834-260102", + "http://www.chinatimes.com/newspapers/20141212000835-260102", + "http://www.chinatimes.com/newspapers/20141212000836-260102", + "http://www.chinatimes.com/newspapers/20141212000838-260102", + "http://www.chinatimes.com/newspapers/20141212000839-260102", + "http://www.chinatimes.com/newspapers/20141212000841-260102", + "http://www.chinatimes.com/newspapers/20141212000843-260102", + "http://www.chinatimes.com/newspapers/20141212000845-260102", + "http://www.chinatimes.com/newspapers/20141212000895-260109", + "http://www.chinatimes.com/newspapers/20141212000896-260109", + "http://www.chinatimes.com/newspapers/20141212000897-260109", + "http://www.chinatimes.com/newspapers/20141212000898-260109", + "http://www.chinatimes.com/newspapers/20141212000899-260109", + "http://www.chinatimes.com/newspapers/20141212000900-260109", + "http://www.chinatimes.com/newspapers/20141212000901-260109", + "http://www.chinatimes.com/newspapers/20141212000903-260109", + "http://www.chinatimes.com/newspapers/20141212000904-260109", + "http://www.chinatimes.com/newspapers/20141212000905-260109", + "http://www.chinatimes.com/newspapers/20141212000906-260109", + "http://www.chinatimes.com/newspapers/20141212000910-260301", + "http://www.chinatimes.com/newspapers/20141212000913-260301", + "http://www.chinatimes.com/newspapers/20141212000916-260301", + "http://www.chinatimes.com/newspapers/20141212000917-260301", + "http://www.chinatimes.com/newspapers/20141212000918-260301", + "http://www.chinatimes.com/newspapers/20141212000921-260301", + "http://www.chinatimes.com/newspapers/20141212000923-260301", + "http://www.chinatimes.com/newspapers/20141212000924-260301", + "http://www.chinatimes.com/newspapers/20141212000926-260301", + "http://www.chinatimes.com/newspapers/20141212000929-260301", + "http://www.chinatimes.com/newspapers/20141212000930-260301", + "http://www.chinatimes.com/newspapers/20141212001056-260310", + "http://www.chinatimes.com/newspapers/20141212001059-260310", + "http://www.chinatimes.com/newspapers/20141212001065-260310", + "http://www.chinatimes.com/newspapers/20141212001066-260310", + "http://www.chinatimes.com/newspapers/20141212001082-260603", + "http://www.chinatimes.com/newspapers/20141212001117-260603", + "http://www.chinatimes.com/newspapers/20141212001122-260603", + "http://www.chinatimes.com/newspapers/中國時報-2014-12-06", + "http://www.chinatimes.com/newspapers/中國時報-2014-12-07", + "http://www.chinatimes.com/realtimenews/20141124004059-260405", + "http://www.chinatimes.com/realtimenews/20141130002731-260401", + "http://www.chinatimes.com/realtimenews/20141212000002-260403", + "http://www.chinatimes.com/realtimenews/20141212000006-260409", + "http://www.chinatimes.com/realtimenews/20141212000013-260408", + "http://www.chinatimes.com/realtimenews/20141212000020-260401", + "http://www.chinatimes.com/realtimenews/20141212001068-260408", + "http://www.chinatimes.com/realtimenews/20141212001074-260408", + "http://www.chinatimes.com/realtimenews/20141212001077-260408", + "http://www.chinatimes.com/realtimenews/20141212001102-260408", + "http://www.chinatimes.com/realtimenews/20141212001137-260408", + "http://www.chinatimes.com/realtimenews/20141212001165-260410", + "http://www.chinatimes.com/realtimenews/20141212001223-260401", + "http://www.chinatimes.com/realtimenews/20141212001225-260401", + "http://www.chinatimes.com/realtimenews/20141212001280-260401", + "http://www.chinatimes.com/realtimenews/20141212001384-260401", + "http://www.chinatimes.com/realtimenews/20141212001388-260401", + "http://www.chinatimes.com/realtimenews/20141212001484-260405", + "http://www.chinatimes.com/realtimenews/20141212001535-260401", + "http://www.chinatimes.com/realtimenews/20141212001572-260405", + "http://www.chinatimes.com/realtimenews/20141212001620-260401", + "http://www.chinatimes.com/realtimenews/20141212001722-260403", + "http://www.chinatimes.com/realtimenews/20141212001760-260407", + "http://www.chinatimes.com/realtimenews/20141212001766-260401", + "http://www.chinatimes.com/realtimenews/20141212001785-260410", + "http://www.chinatimes.com/realtimenews/20141212001807-260401", + "http://www.chinatimes.com/realtimenews/20141212001822-260401", + "http://www.chinatimes.com/realtimenews/20141212001858-260401", + "http://www.chinatimes.com/realtimenews/20141212001862-260401", + "http://www.chinatimes.com/realtimenews/20141212001867-260410", + "http://www.chinatimes.com/realtimenews/20141212001906-260401", + "http://www.chinatimes.com/realtimenews/20141212001925-260401", + "http://www.chinatimes.com/realtimenews/20141212001930-260403", + "http://www.chinatimes.com/realtimenews/20141212001931-260404", + "http://www.chinatimes.com/realtimenews/20141212001937-260401", + "http://www.chinatimes.com/realtimenews/20141212001941-260401", + "http://www.chinatimes.com/realtimenews/20141212001969-260404", + "http://www.chinatimes.com/realtimenews/20141212001970-260401", + "http://www.chinatimes.com/realtimenews/20141212001973-260408", + "http://www.chinatimes.com/realtimenews/20141212001985-260410", + "http://www.chinatimes.com/realtimenews/20141212001992-260401", + "http://www.chinatimes.com/realtimenews/20141212002011-260401", + "http://www.chinatimes.com/realtimenews/20141212002027-260408", + "http://www.chinatimes.com/realtimenews/20141212002030-260401", + "http://www.chinatimes.com/realtimenews/20141212002071-260401", + "http://www.chinatimes.com/realtimenews/20141212002082-260407", + "http://www.chinatimes.com/realtimenews/20141212002105-260404", + "http://www.chinatimes.com/realtimenews/20141212002118-260401", + "http://www.chinatimes.com/realtimenews/20141212002140-260401", + "http://www.chinatimes.com/realtimenews/20141212002152-260412", + "http://www.chinatimes.com/realtimenews/20141212002162-260405", + "http://www.chinatimes.com/realtimenews/20141212002179-260409", + "http://www.chinatimes.com/realtimenews/20141212002182-260401", + "http://www.chinatimes.com/realtimenews/20141212002187-260404", + "http://www.chinatimes.com/realtimenews/20141212002208-260401", + "http://www.chinatimes.com/realtimenews/20141212002224-260402", + "http://www.chinatimes.com/realtimenews/20141212002241-260404", + "http://www.chinatimes.com/realtimenews/20141212002325-260412", + "http://www.chinatimes.com/realtimenews/20141212002337-260410", + "http://www.chinatimes.com/realtimenews/20141212002396-260404", + "http://www.chinatimes.com/realtimenews/20141212002407-260407", + "http://www.chinatimes.com/realtimenews/20141212002430-260410", + "http://www.chinatimes.com/realtimenews/20141212002460-260401", + "http://www.chinatimes.com/realtimenews/20141212002461-260403", + "http://www.chinatimes.com/realtimenews/20141212002490-260401", + "http://www.chinatimes.com/realtimenews/20141212002494-260412", + "http://www.chinatimes.com/realtimenews/20141212002537-260401", + "http://www.chinatimes.com/realtimenews/20141212002625-260401", + "http://www.chinatimes.com/realtimenews/20141212002644-260409", + "http://www.chinatimes.com/realtimenews/20141212002661-260407", + "http://www.chinatimes.com/realtimenews/20141212002672-260405", + "http://www.chinatimes.com/realtimenews/20141212002779-260401", + "http://www.chinatimes.com/realtimenews/20141212002790-260405", + "http://www.chinatimes.com/realtimenews/20141212002840-260412", + "http://www.chinatimes.com/realtimenews/20141212002841-260405", + "http://www.chinatimes.com/realtimenews/20141212002878-260401", + "http://www.chinatimes.com/realtimenews/20141212002931-260404", + "http://www.chinatimes.com/realtimenews/20141212002956-260403", + "http://www.chinatimes.com/realtimenews/20141212002965-260401", + "http://www.chinatimes.com/realtimenews/20141212003053-260401", + "http://www.chinatimes.com/realtimenews/20141212003061-260405", + "http://www.chinatimes.com/realtimenews/20141212003067-260401", + "http://www.chinatimes.com/realtimenews/20141212003076-260401", + "http://www.chinatimes.com/realtimenews/20141212003077-260407", + "http://www.chinatimes.com/realtimenews/20141212003109-260401", + "http://www.chinatimes.com/realtimenews/20141212003110-260401", + "http://www.chinatimes.com/realtimenews/20141212003144-260401", + "http://www.chinatimes.com/realtimenews/20141212003145-260401", + "http://www.chinatimes.com/realtimenews/20141212003158-260403", + "http://www.chinatimes.com/realtimenews/20141212003193-260401", + "http://www.chinatimes.com/realtimenews/20141212003194-260401", + "http://www.chinatimes.com/realtimenews/20141212003216-260405", + "http://www.chinatimes.com/realtimenews/20141212003228-260409", + "http://www.chinatimes.com/realtimenews/20141212003256-260401", + "http://www.chinatimes.com/realtimenews/20141212003259-260401", + "http://www.chinatimes.com/realtimenews/20141212003269-260403", + "http://www.chinatimes.com/realtimenews/20141212003273-260401", + "http://www.chinatimes.com/realtimenews/20141212003285-260412", + "http://www.chinatimes.com/realtimenews/20141212003287-260412", + "http://www.chinatimes.com/realtimenews/20141212003292-260401", + "http://www.chinatimes.com/realtimenews/20141212003366-260401", + "http://www.chinatimes.com/realtimenews/20141212003371-260405", + "http://www.chinatimes.com/realtimenews/20141212003415-260401", + "http://www.chinatimes.com/realtimenews/20141212003434-260401", + "http://www.chinatimes.com/realtimenews/20141212003448-260403", + "http://www.chinatimes.com/realtimenews/20141212003460-260401", + "http://www.chinatimes.com/realtimenews/20141212003467-260412", + "http://www.chinatimes.com/realtimenews/20141212003470-260401", + "http://www.chinatimes.com/realtimenews/20141212003471-260403", + "http://www.chinatimes.com/realtimenews/20141212003543-260401", + "http://www.chinatimes.com/realtimenews/20141212003559-260401", + "http://www.chinatimes.com/realtimenews/20141212003565-260412", + "http://www.chinatimes.com/realtimenews/20141212003568-260401", + "http://www.chinatimes.com/realtimenews/20141212003603-260404", + "http://www.chinatimes.com/realtimenews/20141212003630-260401", + "http://www.chinatimes.com/realtimenews/20141212003678-260405", + "http://www.chinatimes.com/realtimenews/20141212003685-260401", + "http://www.chinatimes.com/realtimenews/20141212003693-260401", + "http://www.chinatimes.com/realtimenews/20141212003714-260401", + "http://www.chinatimes.com/realtimenews/20141212003716-260401", + "http://www.chinatimes.com/realtimenews/20141212003728-260401", + "http://www.chinatimes.com/realtimenews/20141212003745-260401", + "http://www.chinatimes.com/realtimenews/20141212003778-260412", + "http://www.chinatimes.com/realtimenews/20141212003789-260401", + "http://www.chinatimes.com/realtimenews/20141212003795-260405", + "http://www.chinatimes.com/realtimenews/20141212003823-260402", + "http://www.chinatimes.com/realtimenews/20141212003828-260402", + "http://www.chinatimes.com/realtimenews/20141212003845-260401", + "http://www.chinatimes.com/realtimenews/20141212003847-260412", + "http://www.chinatimes.com/realtimenews/20141212003848-260410", + "http://www.chinatimes.com/realtimenews/20141212003860-260401", + "http://www.chinatimes.com/realtimenews/20141212003879-260407", + "http://www.chinatimes.com/realtimenews/20141212003886-260405", + "http://www.chinatimes.com/realtimenews/20141212003890-260405", + "http://www.chinatimes.com/realtimenews/20141212003899-260401", + "http://www.chinatimes.com/realtimenews/20141212003902-260402", + "http://www.chinatimes.com/realtimenews/20141212003907-260401", + "http://www.chinatimes.com/realtimenews/20141212003915-260405", + "http://www.chinatimes.com/realtimenews/20141212003930-260405", + "http://www.chinatimes.com/realtimenews/20141212004008-260405", + "http://www.chinatimes.com/realtimenews/20141212004054-260402", + "http://www.chinatimes.com/realtimenews/20141212004064-260405", + "http://www.chinatimes.com/realtimenews/20141212004079-260410", + "http://www.chinatimes.com/realtimenews/20141212004087-260405", + "http://www.chinatimes.com/realtimenews/20141212004098-260407", + "http://www.chinatimes.com/realtimenews/20141212004134-260412", + "http://www.chinatimes.com/realtimenews/20141212004136-260405", + "http://www.chinatimes.com/realtimenews/20141212004144-260405", + "http://www.chinatimes.com/realtimenews/20141212004174-260405", + "http://www.chinatimes.com/realtimenews/20141212004184-260401", + "http://www.chinatimes.com/realtimenews/20141212004197-260403", + "http://www.chinatimes.com/realtimenews/20141212004201-260403", + "http://www.chinatimes.com/realtimenews/20141212004204-260405", + "http://www.chinatimes.com/realtimenews/20141212004212-260405", + "http://www.chinatimes.com/realtimenews/20141212004218-260401", + "http://www.chinatimes.com/realtimenews/20141212004231-260407", + "http://www.chinatimes.com/realtimenews/20141212004282-260412", + "http://www.chinatimes.com/realtimenews/20141212004292-260405", + "http://www.chinatimes.com/realtimenews/20141212004295-260402", + "http://www.chinatimes.com/realtimenews/20141212004299-260405", + "http://www.chinatimes.com/realtimenews/20141212004305-260412", + "http://www.chinatimes.com/realtimenews/20141212004309-260412", + "http://www.chinatimes.com/realtimenews/20141212004351-260401", + "http://www.chinatimes.com/realtimenews/20141212004353-260412", + "http://www.chinatimes.com/realtimenews/20141212004355-260405", + "http://www.chinatimes.com/realtimenews/20141212004362-260401", + "http://www.chinatimes.com/realtimenews/20141212004370-260402", + "http://www.chinatimes.com/realtimenews/20141212004375-260405", + "http://www.chinatimes.com/realtimenews/20141212004378-260405", + "http://www.chinatimes.com/realtimenews/20141212004384-260401", + "http://www.chinatimes.com/realtimenews/20141212004400-260402", + "http://www.chinatimes.com/realtimenews/20141212004401-260407", + "http://www.chinatimes.com/realtimenews/20141212004404-260401", + "http://www.chinatimes.com/realtimenews/20141212004406-260403", + "http://www.chinatimes.com/realtimenews/20141212004417-260401", + "http://www.chinatimes.com/realtimenews/20141212004465-260405", + "http://www.chinatimes.com/realtimenews/20141212004474-260402", + "http://www.chinatimes.com/realtimenews/20141212004495-260405", + "http://www.chinatimes.com/realtimenews/20141212004502-260405", + "http://www.chinatimes.com/realtimenews/20141212004535-260409", + "http://www.chinatimes.com/realtimenews/20141212004536-260402", + "http://www.chinatimes.com/realtimenews/20141212004555-260401", + "http://www.chinatimes.com/realtimenews/20141212004565-260412", + "http://www.chinatimes.com/realtimenews/20141212004574-260407", + "http://www.chinatimes.com/realtimenews/20141212004638-260401", + "http://www.chinatimes.com/realtimenews/20141212004665-260403", + "http://www.chinatimes.com/realtimenews/20141212004669-260402", + "http://www.chinatimes.com/realtimenews/20141212004688-260401", + "http://www.chinatimes.com/realtimenews/20141212004703-260408", + "http://www.chinatimes.com/realtimenews/20141212004723-260409", + "http://www.chinatimes.com/realtimenews/20141212004736-260401", + "http://www.chinatimes.com/realtimenews/20141212004740-260407", + "http://www.chinatimes.com/realtimenews/20141212004750-260401", + "http://www.chinatimes.com/realtimenews/20141212004765-260401", + "http://www.chinatimes.com/realtimenews/20141212004768-260401", + "http://www.chinatimes.com/realtimenews/20141212004770-260408", + "http://www.chinatimes.com/realtimenews/20141212004777-260410", + "http://www.chinatimes.com/realtimenews/20141212004780-260403", + "http://www.chinatimes.com/realtimenews/20141212004785-260402", + "http://www.chinatimes.com/realtimenews/20141212004786-260408", + "http://www.chinatimes.com/realtimenews/20141212004789-260410", + "http://www.chinatimes.com/realtimenews/20141212004791-260401", + "http://www.chinatimes.com/realtimenews/20141212004792-260401", + "http://www.chinatimes.com/realtimenews/20141212004793-260410", + "http://www.chinatimes.com/realtimenews/20141212004794-260409", + "http://www.chinatimes.com/realtimenews/20141212004796-260403", + "http://www.chinatimes.com/realtimenews/20141212004797-260404", + "http://www.chinatimes.com/realtimenews/20141212004798-260402", + "http://www.chinatimes.com/realtimenews/20141212004808-260404", + "http://www.chinatimes.com/realtimenews/20141212004830-260401", + "http://www.chinatimes.com/realtimenews/20141212004833-260402", + "http://www.chinatimes.com/realtimenews/20141212004834-260401", + "http://www.chinatimes.com/realtimenews/20141212004837-260401", + "http://www.chinatimes.com/realtimenews/20141212004838-260401", + "http://www.chinatimes.com/realtimenews/20141212004845-260407", + "http://www.chinatimes.com/realtimenews/20141212004848-260409", + "http://www.chinatimes.com/realtimenews/20141212004852-260401", + "http://www.chinatimes.com/realtimenews/20141212004863-260401", + "http://www.chinatimes.com/realtimenews/20141212004872-260405", + "http://www.chinatimes.com/realtimenews/20141212004878-260401", + "http://www.chinatimes.com/realtimenews/20141212004879-260401", + "http://www.chinatimes.com/realtimenews/20141212004905-260407", + "http://www.chinatimes.com/realtimenews/20141212004910-260401", + "http://www.chinatimes.com/realtimenews/20141212004911-260401", + "http://www.chinatimes.com/realtimenews/20141212004923-260401", + "http://www.chinatimes.com/realtimenews/20141212004925-260410", + "http://www.chinatimes.com/realtimenews/20141212004927-260409", + "http://www.chinatimes.com/realtimenews/20141212004930-260409", + "http://www.chinatimes.com/realtimenews/20141212004935-260404", + "http://www.chinatimes.com/realtimenews/20141212004937-260402", + "http://www.chinatimes.com/realtimenews/20141212004942-260401", + "http://www.chinatimes.com/realtimenews/20141212004949-260405", + "http://www.chinatimes.com/realtimenews/20141212004953-260410", + "http://www.chinatimes.com/realtimenews/20141212004955-260401", + "http://www.chinatimes.com/realtimenews/20141212004961-260408", + "http://www.chinatimes.com/realtimenews/20141212004962-260405", + "http://www.chinatimes.com/realtimenews/20141212004966-260401", + "http://www.chinatimes.com/realtimenews/20141212004967-260408", + "http://www.chinatimes.com/realtimenews/20141212004968-260410", + "http://www.chinatimes.com/realtimenews/20141212004972-260405", + "http://www.chinatimes.com/realtimenews/20141212004975-260402", + "http://www.chinatimes.com/realtimenews/20141212004995-260403", + "http://www.chinatimes.com/realtimenews/20141212005009-260405", + "http://www.chinatimes.com/realtimenews/20141212005026-260408", + "http://www.chinatimes.com/realtimenews/20141212005028-260408", + "http://www.chinatimes.com/realtimenews/20141212005029-260408", + "http://www.chinatimes.com/realtimenews/20141212005030-260407", + "http://www.chinatimes.com/realtimenews/20141212005031-260407", + "http://www.chinatimes.com/realtimenews/20141212005034-260409", + "http://www.chinatimes.com/realtimenews/20141212005035-260409", + "http://www.chinatimes.com/realtimenews/20141212005037-260407", + "http://www.chinatimes.com/realtimenews/20141212005039-260409", + "http://www.chinatimes.com/realtimenews/20141212005042-260408", + "http://www.chinatimes.com/realtimenews/20141212005043-260407", + "http://www.chinatimes.com/realtimenews/20141212005044-260409", + "http://www.chinatimes.com/realtimenews/20141212005045-260403", + "http://www.chinatimes.com/realtimenews/20141212005049-260409", + "http://www.chinatimes.com/realtimenews/20141212005050-260404", + "http://www.chinatimes.com/realtimenews/20141212005052-260408", + "http://www.chinatimes.com/realtimenews/20141212005053-260409", + "http://www.chinatimes.com/realtimenews/20141212005054-260409", + "http://www.chinatimes.com/realtimenews/20141212005055-260403", + "http://www.chinatimes.com/realtimenews/20141212005056-260409", + "http://www.chinatimes.com/realtimenews/20141212005062-260410", + "http://www.chinatimes.com/realtimenews/20141212005063-260410", + "http://www.chinatimes.com/realtimenews/20141212005064-260410", + "http://www.chinatimes.com/realtimenews/20141212005065-260409", + "http://www.chinatimes.com/realtimenews/20141212005068-260405", + "http://www.chinatimes.com/realtimenews/20141212005073-260410", + "http://www.chinatimes.com/realtimenews/20141212005074-260408", + "http://www.chinatimes.com/realtimenews/20141212005075-260409", + "http://www.chinatimes.com/realtimenews/20141212005076-260410", + "http://www.chinatimes.com/realtimenews/20141212005077-260402", + "http://www.chinatimes.com/realtimenews/20141212005079-260404", + "http://www.chinatimes.com/realtimenews/20141212005084-260410", + "http://www.chinatimes.com/realtimenews/20141212005086-260404", + "http://www.chinatimes.com/realtimenews/20141212005090-260404", + "http://www.chinatimes.com/realtimenews/20141212005092-260409", + "http://www.chinatimes.com/realtimenews/20141212005093-260408", + "http://www.chinatimes.com/realtimenews/20141212005094-260408", + "http://www.chinatimes.com/realtimenews/20141212005101-260409", + "http://www.chinatimes.com/realtimenews/20141212005106-260410", + "http://www.chinatimes.com/realtimenews/20141212005109-260402", + "http://www.chinatimes.com/realtimenews/20141212005113-260405", + "http://www.chinatimes.com/realtimenews/20141212005116-260410", + "http://www.chinatimes.com/realtimenews/20141212005117-260410", + "http://www.chinatimes.com/realtimenews/20141212005119-260405", + "http://www.chinatimes.com/realtimenews/20141212005122-260410", + "http://www.chinatimes.com/realtimenews/20141212005124-260408", + "http://www.chinatimes.com/realtimenews/20141212005125-260410", + "http://www.chinatimes.com/realtimenews/20141212005126-260408", + "http://www.chinatimes.com/realtimenews/20141212005139-260409", + "http://www.chinatimes.com/realtimenews/20141212005147-260409", + "http://www.chinatimes.com/realtimenews/20141212005149-260410", + "http://www.chinatimes.com/realtimenews/20141212005161-260409", + "http://www.chinatimes.com/realtimenews/20141212005162-260409", + "http://www.chinatimes.com/realtimenews/20141212005163-260408", + "http://www.chinatimes.com/realtimenews/20141212005164-260409", + "http://www.chinatimes.com/realtimenews/20141212005167-260410", + "http://www.chinatimes.com/realtimenews/20141212005168-260409", + "http://www.chinatimes.com/realtimenews/20141212005169-260409", + "http://www.chinatimes.com/realtimenews/20141212005170-260409", + "http://www.chinatimes.com/realtimenews/20141212005171-260408", + "http://www.chinatimes.com/realtimenews/20141212005172-260408", + "http://www.chinatimes.com/realtimenews/20141213000001-260405", + "http://www.chinatimes.com/realtimenews/20141213000004-260405", + "http://www.chinatimes.com/realtimenews/20141213000006-260402", + "http://www.chinatimes.com/realtimenews/20141213000010-260408", + "http://www.chinatimes.com/realtimenews/20141213000017-260405", + "http://www.chinatimes.com/realtimenews/20141213000019-260405", + "http://www.chinatimes.com/realtimenews/20141213000022-260407", + "http://www.chinatimes.com/realtimenews/20141213000023-260404", + "http://www.chinatimes.com/realtimenews/20141213000032-260405", + "http://www.chinatimes.com/realtimenews/20141213000034-260402" +] \ No newline at end of file diff --git a/tests/models/Crawler/Ettoday/Crawl.test b/tests/models/Crawler/Ettoday/Crawl.test new file mode 100644 index 0000000..c31b950 --- /dev/null +++ b/tests/models/Crawler/Ettoday/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Ettoday::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Ettoday::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Ettoday/Parse.test b/tests/models/Crawler/Ettoday/Parse.test new file mode 100644 index 0000000..d3603c7 --- /dev/null +++ b/tests/models/Crawler/Ettoday/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_Ettoday::parse (436375.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/436375.html'); + $result = Crawler_Ettoday::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/436375.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Ettoday/data/436375.html b/tests/models/Crawler/Ettoday/data/436375.html new file mode 100644 index 0000000..1d1eb27 --- /dev/null +++ b/tests/models/Crawler/Ettoday/data/436375.html @@ -0,0 +1,1842 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +如何推動區域經貿合作 | ETtoday論壇新聞 | ETtoday 新聞雲 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + + + + +
                    + +
                    + + + + +
                    + + + + +
                    + +
                    + + + + + + + +
                    + +
                    + + + +
                    +
                    + +
                    +

                    ETtoday 新聞雲

                    + + + + + + +
                    + +
                    + + + +
                    + +
                    + + + + + + + + + + + + +
                    +
                    » + +
                    +
                    » + +
                    +
                    » + +
                    +
                    + +
                    + +
                    +
                    + + + + + + + + +
                    + + +
                    + +
                    +
                    + + + + + + + + + + + + + +
                    + +
                    + +
                    + +
                    + + + + + + + + + + + + + +
                    +
                    + + + + +
                    +

                    如何推動區域經貿合作

                    +
                    + + + +
                    +
                    + +
                    +
                    +
                    +
                    +
                    + + + + + +
                    + +
                    + + + +
                    + + + +
                    + +
                    +
                    + + +
                    +
                    +
                    + + + +
                    +
                    +
                    + + +
                    + +
                    + +
                    + + + + + + + + + +
                    + + + +

                    +

                    李武忠

                    +

                    台灣九合一選舉揭曉中國國民黨遭到空前挫敗,選前儘管國民黨大打經濟牌工商業大老們也強力對經濟選民喊話,但是似乎沒有發生預期效果,讓部分人士誤認為台灣選民不理性,台灣民主走向惡質化。其實多數台灣選民還是很在乎經濟發展,也瞭解參與國際經貿組織的重要性,不幸的是這些年來台灣政府部門在推動加入區域經貿組織過程讓民眾的感覺是重財團輕百姓,紅利由少數企業財團所獨享,苦果卻必須由社會弱勢族群來承擔,造成貧富階級不斷擴大,族群間產生相對剝奪感。政府以多項租稅減免優惠措施鼓勵台商鮭魚返鄉的結果並沒有創造更多就業機會,反將資金拿來炒房、炒股市、養地等,不僅炒高房價讓一般人買不起房子,所造成高失業率以及低薪資結構,讓年青人感到憤怒與不滿,這樣的氛圍透過網路、臉書、Line等快速聯結與傳送,很快形成一股反對金權政治的龐大力量,特別是台商頂新集團黑心油毒害全台事件中所揭露綿密的政商關係,更將不滿情緒推向最高峰並化為實際行動,給執政黨一個教訓。

                    +

                    選舉的結果讓許多人對台灣繼續推動加入區域經貿合作組織以及兩岸經貿合作感到悲觀。其實正所謂危機就是轉機,剛好給執政的國民黨一個重新檢視與修正其經濟政策的機會。台灣經濟成長需仰賴國際貿易,自然需融入區域經貿組織才不會被邊緣,想加入就必需有取有給,雙方互利才可能成局,問題是我們的官員,還是存在「民可使由之不可使知之」的老舊思想,不懂溝通的藝術,也不願告訴民眾真相,來取得民眾認同與支持,然而在資訊快速傳播的今日,只要上網google一下就可以抓到全球資訊,不會被唬弄,例如中韓簽定FTA當然會對台灣產生競爭壓力,但是在內容細節都還未對外公告的情況下,政府官員立即提出這對台灣產業是「極震撼」的衝擊,將對我國經濟造成高達6500億元損失,彷彿整個國家就要走上衰運,卻馬上遭到網友以數據打臉,使得政府原本想借力使力讓卡關的服貿、貨貿加速通過的企圖落空。

                    +

                    痛定思痛未來政府部門對於經濟政策的擬定事先應做好充分的準備顧及全民利益,並與民眾做充分對話溝通,讓民眾安心不能一意孤行。從中韓FTA與美韓FTA韓國對農產品在開放程度上大不相同,即可顯出談判對象與談判策略致關重要,事先須經縝密的分析與精算,列出不同的因應對策來維護國家與農民最大權益並編列足夠的經費做好對受損農戶的照顧,而這部份正是台灣政府所最欠缺也最為外界所詬病。

                    +

                    特別是台灣未來經濟走向勢必要與他國做經貿結盟,無論是透過中國間接擁抱世界還是直接面對世界,都有它的風險,目前藍綠倆黨主張均趨向極端化,並未將真相向全民說明,把個人與政黨私利置於全民利益之上,難道沒有讓台灣能趨吉避凶而使得台灣民眾獲得最大益處的第三條路線嗎?台灣需要的是有遠見有能力解決問題的領導者而不是製造對立的麻煩製造者!

                    +

                    ●作者李武忠,新北市,博,經濟系教授。本文為網友投稿,言論不代表本報立場。ET論壇歡迎更多參與,投稿請寄editor@ettoday.net

                    +

                    + + + + + + + + + + + + +
                    +

                    + +

                    +
                    + + + +
                    +
                    + + + +
                    + + + +
                    + +
                    + + + + + + + + + + + + + + + + + + + + +
                    + + +
                    + + + + + + + +

                    ※本文版權所有,非經授權,不得轉載。[ETtoday著作權聲明]※

                    + + + + + + + + +
                    +
                    +
                    訂閱《論壇新聞》電子報: | 《論壇新聞》RSS 訂閱
                    + +
                    +
                    +
                    +

                    論壇 熱門新聞

                    +
                    +
                    +
                    +
                    +
                    +
                    + +

                    + +

                    + + +

                    + +

                    +

                    彭明輝/台灣真的會更好嗎?

                    +

                    彭明輝/火車出軌不能只想換司機

                    +

                    評/連勝文再爛,都比柯文哲好!

                    +

                    快評/基神,歡迎回到凡間!

                    +

                    神話破滅? 阿基師的100種道歉

                    +

                    這次選舉是鍵盤世代贏了嗎?

                    +

                    那不是流氓,什麼才是流氓!

                    +

                    中國國民黨與蜀漢王朝

                    +

                    台電員工:電費根本不用漲!

                    +

                    馬英九的政治生命為何提前結束

                    +

                    短線炒房救星:房地合一稅來了!

                    +

                    幫幫忙,這有什麼猛?

                    +

                    你不知道的日本食物化工技術

                    +

                    柯網路得天下,不可網路治天下!

                    + +
                    +
                    + + + +
                    +
                    + +
                    + +
                    +
                    + + + + + + + + + + + + + + + +
                    +
                    + 訂閱《論壇新聞》電子報: + + + + | + 《論壇新聞》RSS 訂閱 | + 下載新聞工具霸 +
                    +
                    + + + +
                    +
                    + + + + + + + +
                    + + + + + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + +
                    +
                    +
                    +
                    +

                    讀者迴響 使用G+留言

                    +
                    +
                    +
                    +
                    + + + +
                    +
                    + +
                    +
                    + + + + + + + + + +
                    + + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + + + + + + + + + + + + + + + + + + +
                    + +
                    + + + + + + + +
                    + +
                    + + + + + + + + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    +
                    + +
                    + + + + + diff --git a/tests/models/Crawler/Ettoday/data/436375.json b/tests/models/Crawler/Ettoday/data/436375.json new file mode 100644 index 0000000..bf342b2 --- /dev/null +++ b/tests/models/Crawler/Ettoday/data/436375.json @@ -0,0 +1,4 @@ +{ + "title": "如何推動區域經貿合作", + "body": "http://static.ettoday.net/images/807/d807921.jpg\n\r\n李武忠\n\r\n台灣九合一選舉揭曉中國國民黨遭到空前挫敗,選前儘管國民黨大打經濟牌工商業大老們也強力對經濟選民喊話,但是似乎沒有發生預期效果,讓部分人士誤認為台灣選民不理性,台灣民主走向惡質化。其實多數台灣選民還是很在乎經濟發展,也瞭解參與國際經貿組織的重要性,不幸的是這些年來台灣政府部門在推動加入區域經貿組織過程讓民眾的感覺是重財團輕百姓,紅利由少數企業財團所獨享,苦果卻必須由社會弱勢族群來承擔,造成貧富階級不斷擴大,族群間產生相對剝奪感。政府以多項租稅減免優惠措施鼓勵台商鮭魚返鄉的結果並沒有創造更多就業機會,反將資金拿來炒房、炒股市、養地等,不僅炒高房價讓一般人買不起房子,所造成高失業率以及低薪資結構,讓年青人感到憤怒與不滿,這樣的氛圍透過網路、臉書、Line等快速聯結與傳送,很快形成一股反對金權政治的龐大力量,特別是台商頂新集團黑心油毒害全台事件中所揭露綿密的政商關係,更將不滿情緒推向最高峰並化為實際行動,給執政黨一個教訓。\n\r\n選舉的結果讓許多人對台灣繼續推動加入區域經貿合作組織以及兩岸經貿合作感到悲觀。其實正所謂危機就是轉機,剛好給執政的國民黨一個重新檢視與修正其經濟政策的機會。台灣經濟成長需仰賴國際貿易,自然需融入區域經貿組織才不會被邊緣,想加入就必需有取有給,雙方互利才可能成局,問題是我們的官員,還是存在「民可使由之不可使知之」的老舊思想,不懂溝通的藝術,也不願告訴民眾真相,來取得民眾認同與支持,然而在資訊快速傳播的今日,只要上網google一下就可以抓到全球資訊,不會被唬弄,例如中韓簽定FTA當然會對台灣產生競爭壓力,但是在內容細節都還未對外公告的情況下,政府官員立即提出這對台灣產業是「極震撼」的衝擊,將對我國經濟造成高達6500億元損失,彷彿整個國家就要走上衰運,卻馬上遭到網友以數據打臉,使得政府原本想借力使力讓卡關的服貿、貨貿加速通過的企圖落空。\n\r\n痛定思痛未來政府部門對於經濟政策的擬定事先應做好充分的準備顧及全民利益,並與民眾做充分對話溝通,讓民眾安心不能一意孤行。從中韓FTA與美韓FTA韓國對農產品在開放程度上大不相同,即可顯出談判對象與談判策略致關重要,事先須經縝密的分析與精算,列出不同的因應對策來維護國家與農民最大權益並編列足夠的經費做好對受損農戶的照顧,而這部份正是台灣政府所最欠缺也最為外界所詬病。\n\r\n特別是台灣未來經濟走向勢必要與他國做經貿結盟,無論是透過中國間接擁抱世界還是直接面對世界,都有它的風險,目前藍綠倆黨主張均趨向極端化,並未將真相向全民說明,把個人與政黨私利置於全民利益之上,難道沒有讓台灣能趨吉避凶而使得台灣民眾獲得最大益處的第三條路線嗎?台灣需要的是有遠見有能力解決問題的領導者而不是製造對立的麻煩製造者!\n\r\nhttp://static.ettoday.net/images/11/d11456.jpg\n●作者李武忠,新北市,博,經濟系教授。本文為網友投稿,言論不代表本報立場。ET論壇歡迎更多參與,投稿請寄editor@ettoday.net\n\r\nhttp://static.ettoday.net/images/633/d633420.jpg\n " +} \ No newline at end of file diff --git a/tests/models/Crawler/Ettoday/data/README.md b/tests/models/Crawler/Ettoday/data/README.md new file mode 100644 index 0000000..847b4cb --- /dev/null +++ b/tests/models/Crawler/Ettoday/data/README.md @@ -0,0 +1,14 @@ +Ettoday data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `436375.html` + From: http://www.ettoday.net/news/20141210/436375.htm \ No newline at end of file diff --git a/tests/models/Crawler/Ettoday/data/listing.html b/tests/models/Crawler/Ettoday/data/listing.html new file mode 100644 index 0000000..69073e4 --- /dev/null +++ b/tests/models/Crawler/Ettoday/data/listing.html @@ -0,0 +1,2518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ETtoday 東森新聞雲 | 樂在分享‧愛上雲端 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + + + + +
                    + +
                    + + + + +
                    + + + + +
                    + +
                    + + + + + + + +
                    + +
                    + + + +
                    +
                    + +
                    +

                    ETtoday 新聞雲

                    + + + + + + +
                    + +
                    + + + +
                    + +
                    + + + + + + + + + + + + +
                    +
                    » + +
                    +
                    » + +
                    +
                    » + +
                    +
                    + +
                    + +
                    +
                    + + + + + + +
                    + +
                    + + + + +
                    + +
                    + + + +
                    + +
                    + + + + + + + +
                    + +
                    +
                    +

                    扁保外就醫案抗告高院駁回 「三條明路」兩條遭打臉

                    +

                    前總統陳水扁之前申請保外就醫遭駁,向台北地方法院提出聲明異議也遭駁回,扁不服提起抗告,台灣高等法院1.. (15:11)

                    +
                    +
                    +

                    全台最夯早餐店 南霸天「丹丹漢堡」奪冠!

                    +

                    在台灣隨處都可以看到各式各樣的早餐店,不管是燒餅油條、蛋餅還是三明治及漢堡,你都可找到。而網路溫度計.. (14:33)

                    +
                    +
                    +

                    NBA/林書豪復活加楊恩猛炸 湖人延長賽摧毀馬刺

                    +

                    湖人隊13日再度面對馬刺,林書豪替補上陣,經過前一場被「老大」布萊恩(Kobe Bryant)罵「沒.. (13:22)

                    +
                    +
                    +

                    怒談阿基師上摩鐵! 鄭弘儀狠批「沒有擔當又自私」

                    +

                    名廚阿基師(鄭衍基)10日被爆帶熟女「陳小姐」上摩鐵後,親自召開記者會說明原由,但記者會上的「咻~滑.. (12:35)

                    +
                    +
                    +

                    首波寒流下周二報到 中部以北低溫下探8度

                    +

                    大陸冷氣團持續影響台灣,14日白天起至15日回溫,但入冬首波寒流下16日報到,威力持續到18日,中部.. (12:33)

                    +
                    +
                    + + +
                    +
                      + +
                    +
                    + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    + +
                    + +
                    + + + +
                    + +
                    + +
                    + +
                    + + + + + + +
                    +
                    + +
                    + + +
                    + + +
                    +
                    + +
                    +
                    +
                    + + + +
                    +
                    + +
                    + + +
                    + +
                    +
                    + +
                    +
                    +

                    住院把藥盒當畫紙 北京78歲老奶奶一年繪製200幅畫

                    +

                    大陸微博近日瘋傳一組照片,北京一名78歲的老婦人王月珍在病床上,利用藥盒背面,手繪200多幅畫作,並將自己與老伴的愛情故事也一同畫了進去,她說,「我最大的心願就.. (15:29)

                    +
                    + +
                    + +
                    +
                    + +
                    + + +
                    + +
                    +
                    + +
                    +
                    +

                    單身後更美麗! 于美人離婚1周年送「12字」共勉之

                    +

                    主持人于美人2013年歷經與前夫王維倫(James)的婚變風波,重整心情再出發,半年內瘦了近12公斤,受到粉絲大力稱讚「離婚後變得更美麗」。她13日在臉書PO出.. (15:26)

                    +
                    + +
                    +
                    +

                    張兆志嘆台灣生育率「被拿掉」

                    +

                    恭喜!陳浩民再度喜獲千金

                    +

                    彭于晏激戰劉詩詩:整天都在床上

                    +

                    18年來首次!小生孫翠鳳演小旦

                    +

                    空姐救援 九把刀狂賀:我清白!

                    +

                    鄭弘儀怒批阿基師沒有擔當又自私

                    +

                    何韻詩:香港要新世代政黨

                    +

                    等12小時 彥均夫妻對話QQ洗..

                    +

                    敗給遠距離!妙麗分手牛津高材生

                    +

                    陳致遠讚阿基師「開悟論」很勇敢

                    +

                    賭王千金「哈啾!」後椎間盤突出

                    +

                    小蝦:嫉妒心讓我失去最好的朋友

                    +

                    李易見兒爽喊「像我」:雞雞大

                    +

                    東網爆劉喬安遭《壹週刊》設局!

                    +

                    小茉莉駁整形自捏下巴還要記者摸

                    +

                    郭書瑤練鋼管舞太滑 出招噴髮膠

                    +

                    許瑋甯和帥哥玩相愛的七種打法

                    +

                    陳語安自曝大學4年從沒談過戀愛

                    +

                    接手LIVE益智節目 張小燕喊..

                    +

                    妻變美 黃仲崑質問:你背著我?

                    +

                    林采緹拼命拍MV! 全身癱軟送..

                    +

                    吃完就甩!韓男星外遇遭小三復仇

                    +

                    傳東方衛視跨年名單 2男神同台

                    +

                    黃河賺到與陳庭妮「嘴對嘴」10..

                    +

                    韓女偶像扮醜!臉上爆痘嚇壞媽媽

                    +

                    breeze倒嫩奶扮火辣耶誕女..

                    +

                    GENTLEMAN MV也撞哏..

                    +

                    解偉苓嗓音迷倒「歐巴」獻身拍M..

                    +

                    阿基師新聞0條 民視被讚清流

                    +

                    杜汶澤自嘲公司小 請不起劉德華

                    +

                    炎亞綸想跨行主持廣播節目

                    +

                    蔡郁璇PO離婚後美照勵:單身很..

                    +
                    +
                    + +
                    +
                    + +
                    + + + + + + + + +
                    + +
                    +
                    + +
                    +
                    +

                    店巷弄中別有洞天的老宅甜點 每周還會推出新甜點

                    +

                    最近在台中火車站的後方發現了新的購物中心正在興建中,還有一間艾美酒店也將出現,曾經繁華為城市發展中心的中區,在沒落許久之後,終於開始有了新的復甦商機。目前這樣其.. (15:00)

                    +
                    + +
                    + +
                    +
                    + +
                    + + +
                    + +
                    +
                    + +
                    +
                    +

                    文藝青年快來尋寶 萬件商品3折起

                    +

                    12月是送禮旺季,誠品台大店從即日起展開冬日尋寶季,不僅把3樓藝文閣樓打造成文青必逛的寶藏閣樓,推出文具禮品、兒童玩物、影音商品等萬件寶物全面3折起,另外還與台.. (11:00)

                    +
                    + +
                    + +
                    +
                    + +
                    + + + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    +
                    +

                    比伊波拉恐怖,D病毒讓全美不能呼吸

                    +

                    伊波拉疫情還沒結束,現在美國又出現一種「D病毒」。該病毒爆發於7月17日,一名黑人賈奈爾(Eric Garner)涉嫌非法販賣私菸,警方查獲後,他被警方以勒住脖子的方式制服。然而,賈奈爾肥胖又患有氣喘,隨即因為缺氧引發心臟病,送醫後宣告不治,死前他掙扎說「我不能呼吸了」,原來...D病毒是(2014-12-13 15:00)

                    +
                    + + + + +
                    + + + + +
                    +
                    + +
                    + + + +
                    + +
                    +
                    + +
                    +
                    + + +
                    +
                    + +
                    + + + + + + + + +
                    +
                    + + + + +
                    + + +
                    +
                    + + + + +
                    + + +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    +

                    房市可望解凍 選後民眾購屋意願增2成4

                    +

                    受政府打房及9合1大選影響,2014年全台房市冷颼颼,選舉結束後,是否有回溫跡象?根據房仲業者觀察,選後民眾一掃觀望態度,有意進場購屋者,比選前多出2成4,房市.. (12:46)

                    +
                    + +
                    + +
                    +
                    + +
                    + + + + + + + + +
                    +
                    + +
                    +
                    +
                    + +
                    +
                    +

                    這次選舉是鍵盤世代贏了嗎?

                    +

                    他們可以在從未見過面的情形下進行很多討論。而他們因為沒見過面,所以無法因為容貌、口音、省籍、穿著、財富、見面場合等等因素產生等入為主的偏見。因為他們不要需見面,.. (00:17)

                    +
                    + +
                    + +
                    +
                    + +
                    + + +
                    +
                    + +
                    +
                    + +
                    + +
                    + + +
                    +
                    + +
                    +
                    +
                    + + + +
                    +
                    + +
                    + + +
                    +
                    +
                    +

                    權證評論專區

                    +
                    +
                    +
                    +
                    + +
                    + +
                    +
                    + + +
                    +

                    + + 加權指數認購超熱 權證成交金額躍上前5大 +

                    +

                    台股今(12)日外資持續偏空操作,雖台股全面收漲,但觀察集中市場外資持續賣超相對有壓,OTC指數近來飆漲也面臨前波套牢壓力區,前期上漲的股價逐漸面臨沉重賣壓,因此,雖上市櫃收紅但連結加權指數的權證成交金額更躍上前5大。 +(2014-12-12 17:19)

                    +
                    + + + + + + + + + + + +
                    + +
                    + + +
                    + + + + +
                    +
                    + +
                    + + + + + + + +
                    + + + +
                    +
                    + +
                    +
                    +
                    + +
                    + +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    + + + + + + + +
                    + +
                    + + + + + + + + + + + + + + +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + +
                    +
                    + +
                    + + + + +
                    + +
                    + + +
                    + +
                    + + +
                    + +
                    + + +
                    + +
                    + + + + + + + + <![CDATA[ETtoday 新聞雲]]> + + http://www.ettoday.net + + + + Sat,13 Dec 2014 15:20:06 +0800 + 2011 ETtoday.net. All Rights Reserved. + Sen Information Co., Ltd. + zh + + ettoday/realtimehttps://feedburner.google.comSubscribe with My Yahoo!Subscribe with NewsGatorSubscribe with My AOLSubscribe with BloglinesSubscribe with NetvibesSubscribe with GoogleSubscribe with PageflakesSubscribe with PlusmoSubscribe with The Free DictionarySubscribe with Bitty BrowserSubscribe with Live.comSubscribe with Excite MIXSubscribe with WebwagSubscribe with Podcast ReadySubscribe with WikioSubscribe with Daily Rotation + + <![CDATA[中國漁船常越界 海巡署將加強執法強度]]> + + <img src="http://static.ettoday.net/images/758/b758887.jpg" alt="中國漁船常越界 海巡署將加強執法強度" /><br/> 中國漁民多次侵入我國海域捕魚,甚至碰撞攻擊海巡署,行政院海巡署海巡總局因此在12日上午召開「北部海域護漁具體作法檢討會」,將自明年起提著執法強度,並規劃超前部署值勤,嚴防陸船越界,讓我國漁民可以安心捕魚,漁業資源不受侵害。 <a href="http://www.ettoday.net/news/20141213/438461.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CI7MpdF7tsA:WUUtPwPUz1A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CI7MpdF7tsA:WUUtPwPUz1A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CI7MpdF7tsA:WUUtPwPUz1A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=CI7MpdF7tsA:WUUtPwPUz1A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CI7MpdF7tsA:WUUtPwPUz1A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/CI7MpdF7tsA" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/CI7MpdF7tsA/438461.htm + http://www.ettoday.net/news/20141213/438461.htm + Sat,13 Dec 2014 15:13:00 +0800 + http://www.ettoday.net/news/20141213/438461.htm + + + <![CDATA[扁保外就醫案抗告高院駁回 「三條明路」兩條遭打臉]]> + + <img src="http://static.ettoday.net/images/839/b839930.jpg" alt="扁保外就醫案抗告高院駁回 「三條明路」兩條遭打臉" /><br/> 前總統陳水扁之前申請保外就醫遭駁,向台北地方法院提出聲明異議也遭駁回,扁不服提起抗告,台灣高等法院13日仍以管轄法院錯誤為由,裁定抗告駁回。 <a href="http://www.ettoday.net/news/20141213/438494.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=45vjm7emFas:mI7c3WSWilQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=45vjm7emFas:mI7c3WSWilQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=45vjm7emFas:mI7c3WSWilQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=45vjm7emFas:mI7c3WSWilQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=45vjm7emFas:mI7c3WSWilQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/45vjm7emFas" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/45vjm7emFas/438494.htm + http://www.ettoday.net/news/20141213/438494.htm + Sat,13 Dec 2014 15:11:00 +0800 + http://www.ettoday.net/news/20141213/438494.htm + + + <![CDATA[一哭、二不捨、三麻木!張兆志嘆台灣生育率「被拿掉」]]> + + <img src="http://static.ettoday.net/images/853/b853851.jpg" alt="一哭、二不捨、三麻木!張兆志嘆台灣生育率「被拿掉」" /><br/> 藝人張兆志(George)對愛情的見解獨到,常一語道破回覆網友的感情問題,幽默風格廣受好評,他先前特地在臉書粉絲團設立「愛情診斷室」,和大家一起探討兩性問題。他13日分享一名護理師常看到年輕女孩去醫院拿小孩的投書,並有感而發地寫下:「原來台灣生育率並不是往下掉,而是被拿掉。」 <a href="http://www.ettoday.net/news/20141213/438500.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=tnd4o8W1Wfs:LyV4vT_QGs0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=tnd4o8W1Wfs:LyV4vT_QGs0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=tnd4o8W1Wfs:LyV4vT_QGs0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=tnd4o8W1Wfs:LyV4vT_QGs0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=tnd4o8W1Wfs:LyV4vT_QGs0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/tnd4o8W1Wfs" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/tnd4o8W1Wfs/438500.htm + http://www.ettoday.net/news/20141213/438500.htm + Sat,13 Dec 2014 15:11:00 +0800 + http://www.ettoday.net/news/20141213/438500.htm + + + <![CDATA[MLB/找來古巴砲手 皇家填補中心打線]]> + + <img src="http://static.ettoday.net/images/521/b521615.jpg" alt="MLB/找來古巴砲手 皇家填補中心打線" /><br/> 本季拿下美聯冠軍,堪薩斯皇家隊將與莫拉萊斯(Kendrys Morales)簽下2年1700萬美元(約5.35億新台幣)合約,只要等到通過體檢,預計這名古巴砲手將補上原先巴特勒(Billy Butler)中心打者的角色。 <a href="http://www.ettoday.net/news/20141213/438490.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=NCUpCrq9WHw:BQ-VHx765M0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=NCUpCrq9WHw:BQ-VHx765M0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=NCUpCrq9WHw:BQ-VHx765M0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=NCUpCrq9WHw:BQ-VHx765M0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=NCUpCrq9WHw:BQ-VHx765M0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/NCUpCrq9WHw" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/NCUpCrq9WHw/438490.htm + http://www.ettoday.net/news/20141213/438490.htm + Sat,13 Dec 2014 15:07:00 +0800 + http://www.ettoday.net/news/20141213/438490.htm + + + <![CDATA[店巷弄中別有洞天的老宅甜點 每周還會推出新甜點]]> + + <img src="http://static.ettoday.net/images/820/b820530.jpg" alt="店巷弄中別有洞天的老宅甜點 每周還會推出新甜點" /><br/> 最近在台中火車站的後方發現了新的購物中心正在興建中,還有一間艾美酒店也將出現,曾經繁華為城市發展中心的中區,在沒落許久之後,終於開始有了新的復甦商機。目前這樣其實也不賴,雖然蕭條但靜謐,老臺中的許多老味道都還保留在這個城區裡,而一直離不開這個城區的人們... <a href="http://travel.ettoday.net/article/428344.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=6yv6f6F2H-E:1k2sRa38VQM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=6yv6f6F2H-E:1k2sRa38VQM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=6yv6f6F2H-E:1k2sRa38VQM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=6yv6f6F2H-E:1k2sRa38VQM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=6yv6f6F2H-E:1k2sRa38VQM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/6yv6f6F2H-E" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/6yv6f6F2H-E/428344.htm + http://travel.ettoday.net/article/428344.htm + Sat,13 Dec 2014 15:00:00 +0800 + http://travel.ettoday.net/article/428344.htm + + + <![CDATA[比咒怨恐怖百萬倍《怨宅》現簡體版上架iOS等你解謎]]> + + <img src="http://static.ettoday.net/images/849/b849455.jpg" alt="比咒怨恐怖百萬倍《怨宅》現簡體版上架iOS等你解謎" /><br/> 解謎遊戲百百款,你是密室解謎達人嗎?絕對不要錯過這款,充滿噁心、恐怖氣氛的咒怨元素解謎手遊。風靡日本的恐怖類解謎遊戲《怨宅》近日終於在App Store上架。遊戲現在已經有出了簡體中文版本,喜歡原汁原味的日式恐怖怨零遊戲的可以來看看!感受一下遊戲中的駭人畫面吧!。 + <a href="http://www.ettoday.net/news/20141213/437242.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=d8L5E4T_xAI:VwAdM0bOP-8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=d8L5E4T_xAI:VwAdM0bOP-8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=d8L5E4T_xAI:VwAdM0bOP-8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=d8L5E4T_xAI:VwAdM0bOP-8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=d8L5E4T_xAI:VwAdM0bOP-8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/d8L5E4T_xAI" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/d8L5E4T_xAI/437242.htm + http://www.ettoday.net/news/20141213/437242.htm + Sat,13 Dec 2014 15:00:00 +0800 + http://www.ettoday.net/news/20141213/437242.htm + + + <![CDATA[路跑/亞洲盃100公里超馬賽 中華隊冬山河保衛戰]]> + + <img src="http://static.ettoday.net/images/828/b828719.jpg" alt="路跑/亞洲盃100公里超馬賽 中華隊冬山河保衛戰" /><br/> 2014 宜蘭 IAU 亞洲盃100公里超級馬拉松錦標賽週六(13日)上午7時於宜蘭冬山河親水公園鳴槍起跑,本屆有來自韓國、蒙古、斯里蘭卡及香港等國的選手報名來台參賽,我國由中華民國超級馬拉松跑者協會理事長吳勝銘領軍,派出9男9女共18人的中華台北超馬代表隊迎戰。 <a href="http://www.ettoday.net/news/20141213/438495.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=qbj98Zx9Pjg:1b5KjQix3SU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=qbj98Zx9Pjg:1b5KjQix3SU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=qbj98Zx9Pjg:1b5KjQix3SU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=qbj98Zx9Pjg:1b5KjQix3SU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=qbj98Zx9Pjg:1b5KjQix3SU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/qbj98Zx9Pjg" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/qbj98Zx9Pjg/438495.htm + http://www.ettoday.net/news/20141213/438495.htm + Sat,13 Dec 2014 14:53:00 +0800 + http://www.ettoday.net/news/20141213/438495.htm + + + <![CDATA[沒救腹痛隊友害喪命 5山友「能力有限」判無罪]]> + + <img src="http://static.ettoday.net/images/596/b596799.jpg" alt="沒救腹痛隊友害喪命 5山友「能力有限」判無罪" /><br/> 一名余姓男子2012年初登山時突然嚴重腹痛,但沈男等5名隊友逕自繼續攻頂,只留下一人陪伴,造成余男治療不及引發腹膜炎,導致敗血性休克死亡。檢方認為山友彼此是「危險共同體」,將沈男等5人依過失致死罪起訴,但高雄地院審理後認為,5人「能力有限」不能防止死亡,判決無罪。 <a href="http://www.ettoday.net/news/20141213/438462.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=DibQScI2Ls0:S-Dm1egvZEM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=DibQScI2Ls0:S-Dm1egvZEM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=DibQScI2Ls0:S-Dm1egvZEM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=DibQScI2Ls0:S-Dm1egvZEM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=DibQScI2Ls0:S-Dm1egvZEM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/DibQScI2Ls0" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/DibQScI2Ls0/438462.htm + http://www.ettoday.net/news/20141213/438462.htm + Sat,13 Dec 2014 14:51:00 +0800 + http://www.ettoday.net/news/20141213/438462.htm + + + <![CDATA[錯把剃刀當梳子 男童一秒變河童了!]]> + + <img src="http://static.ettoday.net/images/853/b853823.jpg" alt="錯把剃刀當梳子 男童一秒變河童了!" /><br/> 小朋友就是天生的好奇寶寶,很愛模仿大人的動作,但國外有一名小男童想學爸爸梳頭髮,沒想到居然越梳越少,甚至1秒變河童了,原來是他把剃刀錯當成梳子了,不過媽媽看到後有沒有阻止兒子,反而稱讚他,並告訴他哪裡還沒梳到。 <a href="http://www.ettoday.net/news/20141213/438473.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=X1QnjJBJcaU:9gbhNts_5bs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=X1QnjJBJcaU:9gbhNts_5bs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=X1QnjJBJcaU:9gbhNts_5bs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=X1QnjJBJcaU:9gbhNts_5bs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=X1QnjJBJcaU:9gbhNts_5bs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/X1QnjJBJcaU" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/X1QnjJBJcaU/438473.htm + http://www.ettoday.net/news/20141213/438473.htm + Sat,13 Dec 2014 14:42:00 +0800 + http://www.ettoday.net/news/20141213/438473.htm + + + <![CDATA[警摩鐵抓槍毒雙方駁火 防彈盾牌遭子彈貫入逮6人]]> + + <img src="http://static.ettoday.net/images/853/b853819.jpg" alt="警摩鐵抓槍毒雙方駁火 防彈盾牌遭子彈貫入逮6人" /><br/> 新北市警樹林分局與刑事警員警聯手,13日淩晨前往淡水一處汽車旅館,查緝月前發生在樹林肉品市場前槍擊案時,遇槍毒集團張姓嫌犯持槍拒捕,雙方爆發槍戰,警方所持防彈盾牌還險遭貫穿,最後歹徒棄械投降,5男1女分遭逮捕,警並起出威力強大的改造長短槍5把,警訊後全案依組織、槍砲、毒品等罪移送。 <a href="http://www.ettoday.net/news/20141213/438488.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=mwHnMsDvcPU:tNSjcQfL304:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=mwHnMsDvcPU:tNSjcQfL304:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=mwHnMsDvcPU:tNSjcQfL304:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=mwHnMsDvcPU:tNSjcQfL304:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=mwHnMsDvcPU:tNSjcQfL304:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/mwHnMsDvcPU" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/mwHnMsDvcPU/438488.htm + http://www.ettoday.net/news/20141213/438488.htm + Sat,13 Dec 2014 14:34:00 +0800 + http://www.ettoday.net/news/20141213/438488.htm + + + <![CDATA[琅岐島首現2株「活化石」筆筒樹 身世年齡是謎]]> + + <img src="http://static.ettoday.net/images/853/b853822.jpg" alt="琅岐島首現2株「活化石」筆筒樹 身世年齡是謎" /><br/> 福建福州植物研究專家近日在琅岐島發現「筆筒樹」身影。專家稱,這是在琅岐島首次發現筆筒樹,既填補了閩江口島嶼上該樹種分佈的空白;又對研究中國大陸與台灣植物區系的關係有一定意義。 <a href="http://www.ettoday.net/news/20141213/438487.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=9rbOrFZu8F8:emDA9HPylyI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=9rbOrFZu8F8:emDA9HPylyI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=9rbOrFZu8F8:emDA9HPylyI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=9rbOrFZu8F8:emDA9HPylyI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=9rbOrFZu8F8:emDA9HPylyI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/9rbOrFZu8F8" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/9rbOrFZu8F8/438487.htm + http://www.ettoday.net/news/20141213/438487.htm + Sat,13 Dec 2014 14:33:00 +0800 + http://www.ettoday.net/news/20141213/438487.htm + + + <![CDATA[全台最夯早餐店 南霸天「丹丹漢堡」奪冠!]]> + + <img src="http://static.ettoday.net/images/728/b728610.jpg" alt="全台最夯早餐店 南霸天「丹丹漢堡」奪冠!" /><br/> 在台灣隨處都可以看到各式各樣的早餐店,不管是燒餅油條、蛋餅還是三明治及漢堡,你都可找到。而網路溫度計DailyView利用網路大數據,整理出全台最夯的十大早餐店,第一名就是擁有早餐南霸天之大稱的「丹丹漢堡」。 <a href="http://travel.ettoday.net/article/438484.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=wcSAwk1sLG0:_8iQDGwPWB0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=wcSAwk1sLG0:_8iQDGwPWB0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=wcSAwk1sLG0:_8iQDGwPWB0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=wcSAwk1sLG0:_8iQDGwPWB0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=wcSAwk1sLG0:_8iQDGwPWB0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/wcSAwk1sLG0" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/wcSAwk1sLG0/438484.htm + http://travel.ettoday.net/article/438484.htm + Sat,13 Dec 2014 14:33:00 +0800 + http://travel.ettoday.net/article/438484.htm + + + <![CDATA[陳德銘參觀台東史前館 三度提問「台灣人從哪裡來?」]]> + + <img src="http://static.ettoday.net/images/565/b565432.jpg" alt="陳德銘參觀台東史前館 三度提問「台灣人從哪裡來?」" /><br/> 中國海協會會長陳德銘13日參觀台東縣國立台灣史前文化博物館,過程中三度提問「台灣人從哪裡來?」,館長回應,從中國西南沿海、東南亞等地來,還語出驚人,「台灣玉飾品賣到東南亞,三千年前就有服貿、貨貿了」。 <a href="http://www.ettoday.net/news/20141213/438466.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=chuOmZ6GCZk:QBCUQWAtUTY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=chuOmZ6GCZk:QBCUQWAtUTY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=chuOmZ6GCZk:QBCUQWAtUTY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=chuOmZ6GCZk:QBCUQWAtUTY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=chuOmZ6GCZk:QBCUQWAtUTY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/chuOmZ6GCZk" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/chuOmZ6GCZk/438466.htm + http://www.ettoday.net/news/20141213/438466.htm + Sat,13 Dec 2014 14:31:00 +0800 + http://www.ettoday.net/news/20141213/438466.htm + + + <![CDATA[「只有柯P敢說國王沒穿新衣」 台中建築師挺北宜直鐵]]> + + <img src="http://static.ettoday.net/images/853/b853817.jpg" alt="「只有柯P敢說國王沒穿新衣」 台中建築師挺北宜直鐵" /><br/> 台北市長當選人柯文哲先前拋出「北宜直鐵」的議題,引起環保團體的抗議,認為貫穿翡翠水庫將會造成生態環境的汙染。不過,台中建築師黃瑞明日前在臉書PO文,並貼了2張比較圖來表示贊同其想法,「只有柯P敢說出國王沒穿新衣。」 <a href="http://www.ettoday.net/news/20141213/438483.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=gKl_3QVFS4s:N_85VfJAo40:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=gKl_3QVFS4s:N_85VfJAo40:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=gKl_3QVFS4s:N_85VfJAo40:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=gKl_3QVFS4s:N_85VfJAo40:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=gKl_3QVFS4s:N_85VfJAo40:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/gKl_3QVFS4s" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/gKl_3QVFS4s/438483.htm + http://www.ettoday.net/news/20141213/438483.htm + Sat,13 Dec 2014 14:30:00 +0800 + http://www.ettoday.net/news/20141213/438483.htm + + + <![CDATA[臉書能按「不讚」了? 祖克柏考慮增加新按鈕]]> + + <img src="http://static.ettoday.net/images/782/b782961.jpg" alt="臉書能按「不讚」了? 祖克柏考慮增加新按鈕" /><br/> 臉書執行長祖克柏(Mark Zuckerberg)日前在一場座談中,表示正考慮在臉書增加新的按鈕,讓人們除了「讚」之外,能夠有表達其他情緒的選項。 <a href="http://www.ettoday.net/news/20141213/438458.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=ZajN6wDWlmI:5TzK1Ph8rwc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=ZajN6wDWlmI:5TzK1Ph8rwc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=ZajN6wDWlmI:5TzK1Ph8rwc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=ZajN6wDWlmI:5TzK1Ph8rwc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=ZajN6wDWlmI:5TzK1Ph8rwc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/ZajN6wDWlmI" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/ZajN6wDWlmI/438458.htm + http://www.ettoday.net/news/20141213/438458.htm + Sat,13 Dec 2014 14:15:00 +0800 + http://www.ettoday.net/news/20141213/438458.htm + + + <![CDATA[被砍報案變「人球」 警所長不耐:隨便問問就好]]> + + <img src="http://static.ettoday.net/images/853/b853757.jpg" alt="被砍報案變「人球」 警所長不耐:隨便問問就好" /><br/> 居然有這種人民保母!高市2名青年騎機車遭追撞,上前理論反遭對方以斧頭砍傷,報案時竟在兩個派出所和交通隊共3個單位間被當成人球踢來踢去,由於2人堅持報案,最後受理的派出所所長竟不耐煩指示警員「隨便問問就好」,2名被害人前後折騰5個多小時才完成報案手續。 <a href="http://www.ettoday.net/news/20141213/438479.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=FE8H_OzhMeo:jb1KJrktePg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=FE8H_OzhMeo:jb1KJrktePg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=FE8H_OzhMeo:jb1KJrktePg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=FE8H_OzhMeo:jb1KJrktePg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=FE8H_OzhMeo:jb1KJrktePg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/FE8H_OzhMeo" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/FE8H_OzhMeo/438479.htm + http://www.ettoday.net/news/20141213/438479.htm + Sat,13 Dec 2014 14:14:00 +0800 + http://www.ettoday.net/news/20141213/438479.htm + + + <![CDATA[恭喜!妻剖腹產第3胎 陳浩民喜迎小女兒:我要更努力]]> + + <img src="http://static.ettoday.net/images/853/b853814.jpg" alt="恭喜!妻剖腹產第3胎 陳浩民喜迎小女兒:我要更努力" /><br/> 香港藝人陳浩民2011年和大陸演員蔣麗莎(Lisa)結婚,育有一子一女,家庭生活幸福美滿。他近來都在大陸橫店趕拍新戲,以及做唱片宣傳,最近特地請假8天回香港陪老婆待產,妻子已於12日晚間剖腹生下第3胎,兩人開心地迎接小女兒的到來。 <a href="http://www.ettoday.net/news/20141213/438481.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jTUe106Ggo0:3aeQUtIu27k:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jTUe106Ggo0:3aeQUtIu27k:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jTUe106Ggo0:3aeQUtIu27k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=jTUe106Ggo0:3aeQUtIu27k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jTUe106Ggo0:3aeQUtIu27k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/jTUe106Ggo0" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/jTUe106Ggo0/438481.htm + http://www.ettoday.net/news/20141213/438481.htm + Sat,13 Dec 2014 14:13:00 +0800 + http://www.ettoday.net/news/20141213/438481.htm + + + <![CDATA[泰國裸胸王儲妃娘家涉貪 喪失王室頭銜]]> + + <img src="http://static.ettoday.net/images/853/b853733.jpg" alt="泰國裸胸王儲妃娘家涉貪 喪失王室頭銜" /><br/> 泰國王儲妃西拉米(Srirasm)親戚接連因貪腐醜聞遭警方逮捕,泰國王室今天發表聲明:「國王授權同意宣布,王儲瓦吉拉隆功(Maha Vajiralongkorn)的王妃西拉米透過書面聲明,放棄王室地位。」 <a href="http://www.ettoday.net/news/20141213/438441.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jB8d55Ip-q4:rqXo5C_ulds:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jB8d55Ip-q4:rqXo5C_ulds:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jB8d55Ip-q4:rqXo5C_ulds:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=jB8d55Ip-q4:rqXo5C_ulds:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=jB8d55Ip-q4:rqXo5C_ulds:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/jB8d55Ip-q4" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/jB8d55Ip-q4/438441.htm + http://www.ettoday.net/news/20141213/438441.htm + Sat,13 Dec 2014 14:04:00 +0800 + http://www.ettoday.net/news/20141213/438441.htm + + + <![CDATA[沒有這些綠葉 紅花們哪能這麼秋!超受歡迎配角來囉~]]> + + <img src="http://static.ettoday.net/images/851/b851258.jpg" alt="沒有這些綠葉 紅花們哪能這麼秋!超受歡迎配角來囉~" /><br/> 在求學時期,班上一定都會有最紅最水最吸引學長們每節下課都來走廊站崗的那朵花,我們這些小角色就只能在旁邊乖乖當陪襯的綠葉,總是想著哪天才能輪到我啊~大家不要灰心,你一定會是某個人心中最棒的主角!為了激勵各位現在在人生路上有點失志的大大,小編就整理了幾個遊戲界很受歡迎的配角! <a href="http://www.ettoday.net/news/20141213/437740.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=362jmd9Oedc:-oGaarWP0Xk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=362jmd9Oedc:-oGaarWP0Xk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=362jmd9Oedc:-oGaarWP0Xk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=362jmd9Oedc:-oGaarWP0Xk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=362jmd9Oedc:-oGaarWP0Xk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/362jmd9Oedc" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/362jmd9Oedc/437740.htm + http://www.ettoday.net/news/20141213/437740.htm + Sat,13 Dec 2014 14:00:00 +0800 + http://www.ettoday.net/news/20141213/437740.htm + + + <![CDATA[莫札特救經濟 法國經濟部長提改革]]> + + <img src="http://static.ettoday.net/images/853/b853734.jpg" alt="莫札特救經濟 法國經濟部長提改革" /><br/> 法國執政黨社會黨八月任命埃曼努爾‧馬克龍(Emmanuel Macron)為經濟部長,才36歲的他勇往直前,提出經濟改革法案,希望能經濟鬆綁,以提高國家競爭力,振興處於停滯的經濟。 <a href="http://www.ettoday.net/news/20141213/438427.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=5eZkHwraMNI:AvnLj71BXno:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=5eZkHwraMNI:AvnLj71BXno:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=5eZkHwraMNI:AvnLj71BXno:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=5eZkHwraMNI:AvnLj71BXno:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=5eZkHwraMNI:AvnLj71BXno:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/5eZkHwraMNI" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/5eZkHwraMNI/438427.htm + http://www.ettoday.net/news/20141213/438427.htm + Sat,13 Dec 2014 13:57:00 +0800 + http://www.ettoday.net/news/20141213/438427.htm + + + <![CDATA[APP01/安卓網站最推薦的平板竟然是?]]> + + <img src="http://static.ettoday.net/images/850/b850530.jpg" alt="APP01/安卓網站最推薦的平板竟然是?" /><br/> 國外知名Android系統資訊網站Android Police,有許多Android使用者常常會去瀏覽最新消息,但最近他們公布了一個耶誕節購物季的推薦產品清單,編輯竟然大力推崇了蘋果的iPad Air 2? <a href="http://www.ettoday.net/news/20141213/437600.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fZxdIIdOVTw:yPEoALfRnz4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fZxdIIdOVTw:yPEoALfRnz4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fZxdIIdOVTw:yPEoALfRnz4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=fZxdIIdOVTw:yPEoALfRnz4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fZxdIIdOVTw:yPEoALfRnz4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/fZxdIIdOVTw" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/fZxdIIdOVTw/437600.htm + http://www.ettoday.net/news/20141213/437600.htm + Sat,13 Dec 2014 13:55:00 +0800 + http://www.ettoday.net/news/20141213/437600.htm + + + <![CDATA[邊吃薑母鴨邊喝酒 男吐血500CC嚇壞友人!]]> + + <img src="http://static.ettoday.net/images/853/b853763.jpg" alt="邊吃薑母鴨邊喝酒 男吐血500CC嚇壞友人!" /><br/> 台北市一名30多歲的男子一邊吃薑母一邊喝酒,結果突然吐出將近500CC的鮮血,嚇得朋友趕緊幫他叫救護車送醫。檢查發現,男子本身罹患食道靜脈曲張,可能是湯的溫度過高刺激到血管,造成破裂出血。 <a href="http://www.ettoday.net/news/20141213/438480.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=r_KHcJMAdcc:9kDGnNVDfBM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=r_KHcJMAdcc:9kDGnNVDfBM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=r_KHcJMAdcc:9kDGnNVDfBM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=r_KHcJMAdcc:9kDGnNVDfBM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=r_KHcJMAdcc:9kDGnNVDfBM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/r_KHcJMAdcc" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/r_KHcJMAdcc/438480.htm + http://www.ettoday.net/news/20141213/438480.htm + Sat,13 Dec 2014 13:52:00 +0800 + http://www.ettoday.net/news/20141213/438480.htm + + + <![CDATA[電價回饋有譜了 立即降價及新計價公式分頭並行]]> + + <img src="http://static.ettoday.net/images/847/b847070.jpg" alt="電價回饋有譜了 立即降價及新計價公式分頭並行" /><br/> 針對外界關切台電盈餘回饋降電價還價於民,不能等電價公式通過後才進行,應雙軌齊動,行政院長毛治國12日在立法院答詢時表示,這兩個時間點不必綁在一起,電價計價公式與還價差於民雖可適度切割處理,但應公平合理,符合跨世代正義,電價回饋已責成經濟部儘速辦理。 <a href="http://www.ettoday.net/news/20141213/438485.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fOtzQ7dtiWE:gZwGPG3j_mQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fOtzQ7dtiWE:gZwGPG3j_mQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fOtzQ7dtiWE:gZwGPG3j_mQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=fOtzQ7dtiWE:gZwGPG3j_mQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=fOtzQ7dtiWE:gZwGPG3j_mQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/fOtzQ7dtiWE" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/fOtzQ7dtiWE/438485.htm + http://www.ettoday.net/news/20141213/438485.htm + Sat,13 Dec 2014 13:45:00 +0800 + http://www.ettoday.net/news/20141213/438485.htm + + + <![CDATA[彭于晏肉慾激戰劉詩詩2天 自曝:整天都躺在床上]]> + + <img src="http://static.ettoday.net/images/845/b845061.jpg" alt="彭于晏肉慾激戰劉詩詩2天 自曝:整天都躺在床上" /><br/> 彭于晏在古裝劇《風中奇緣》中,與美女劉詩詩有精彩對手戲,兩人因飾演夫妻,有多場在臥房床上談戀愛的甜蜜劇情,堪稱是彭于晏從影以來最多「床戲」的作品!而彭于晏日前接受專訪時大方透露,劇中所有床戲,其實都是在兩天內拍攝完成,「當時幾乎一整天都躺在床上演戲,真的是『躺著賺』!」 <a href="http://www.ettoday.net/news/20141213/438482.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=0Dz4vqfS1ho:1iZ3tzacMAg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=0Dz4vqfS1ho:1iZ3tzacMAg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=0Dz4vqfS1ho:1iZ3tzacMAg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=0Dz4vqfS1ho:1iZ3tzacMAg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=0Dz4vqfS1ho:1iZ3tzacMAg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/0Dz4vqfS1ho" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/0Dz4vqfS1ho/438482.htm + http://www.ettoday.net/news/20141213/438482.htm + Sat,13 Dec 2014 13:40:00 +0800 + http://www.ettoday.net/news/20141213/438482.htm + + + <![CDATA[18年來第一次! 「無敵小生」孫翠鳳長捲髮當印度女子]]> + + <img src="http://static.ettoday.net/images/853/b853807.jpg" alt="18年來第一次! 「無敵小生」孫翠鳳長捲髮當印度女子" /><br/> 在傳統歌仔戲藝術界中有「無敵小生」美名的孫翠鳳,將在大愛電視台12/15播出的《菩提禪心》節目中挑戰小旦,在「賣身供養」的歌仔戲單元裡化身印度女子「阿龍夫人」。18年前孫翠鳳與葉青演出《皇甫少華與孟麗君》中的孟麗君,贏得戲迷們的讚賞,但是從此就不再以小旦的扮相出現螢幕。 <a href="http://www.ettoday.net/news/20141213/438471.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=n8aNdVnOFuY:hMveQmeaHGg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=n8aNdVnOFuY:hMveQmeaHGg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=n8aNdVnOFuY:hMveQmeaHGg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=n8aNdVnOFuY:hMveQmeaHGg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=n8aNdVnOFuY:hMveQmeaHGg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/n8aNdVnOFuY" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/n8aNdVnOFuY/438471.htm + http://www.ettoday.net/news/20141213/438471.htm + Sat,13 Dec 2014 13:29:00 +0800 + http://www.ettoday.net/news/20141213/438471.htm + + + <![CDATA[NBA/林書豪復活加楊恩猛炸 湖人延長賽摧毀馬刺]]> + + <img src="http://static.ettoday.net/images/853/b853735.jpg" alt="NBA/林書豪復活加楊恩猛炸 湖人延長賽摧毀馬刺" /><br/> 湖人隊13日再度面對馬刺,林書豪替補上陣,經過前一場被「老大」布萊恩(Kobe Bryant)罵「沒種」,此戰他展現氣勢,拿下14分8助攻2籃板,再加上楊恩單場6個三分,並拿下29分;雙方進入延長賽,林書豪在情急下傳給楊恩,他竟然在不平衡的情況下投進大號三分,終場就以這球,112比110擊敗馬刺拿下2連勝。 <a href="http://www.ettoday.net/news/20141213/438404.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=f2AMGPd55y8:iNWfhPuJTV0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=f2AMGPd55y8:iNWfhPuJTV0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=f2AMGPd55y8:iNWfhPuJTV0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=f2AMGPd55y8:iNWfhPuJTV0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=f2AMGPd55y8:iNWfhPuJTV0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/f2AMGPd55y8" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/f2AMGPd55y8/438404.htm + http://www.ettoday.net/news/20141213/438404.htm + Sat,13 Dec 2014 13:22:00 +0800 + http://www.ettoday.net/news/20141213/438404.htm + + + <![CDATA[爆盧升等空姐翻案救援「沒聽過」 九把刀狂賀:我清白]]> + + <img src="http://static.ettoday.net/images/853/b853797.jpg" alt="爆盧升等空姐翻案救援「沒聽過」 九把刀狂賀:我清白" /><br/> 作家九把刀好不容易走過劈腿中視女記者周亭羽的醜聞風波,沒想到日前又被爆是航空界的黑名單人物,搭經濟艙會「主動」要求服務人員幫忙升等商務艙,還被直指近日從新加坡返台也在搭乘班機上以此為由盧空姐。怎料,13日案情大轉彎,有空姐出面救援表示從沒聽過此事,讓他轉PO此文大呼終於清白。 <a href="http://www.ettoday.net/news/20141213/438475.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=Sfi713Tjnvc:7AC8vloBO30:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=Sfi713Tjnvc:7AC8vloBO30:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=Sfi713Tjnvc:7AC8vloBO30:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=Sfi713Tjnvc:7AC8vloBO30:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=Sfi713Tjnvc:7AC8vloBO30:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/Sfi713Tjnvc" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/Sfi713Tjnvc/438475.htm + http://www.ettoday.net/news/20141213/438475.htm + Sat,13 Dec 2014 13:11:00 +0800 + http://www.ettoday.net/news/20141213/438475.htm + + + <![CDATA[破門救狗!主人坐牢 馬爾濟斯犬3周靠電動門縫進食]]> + + <img src="http://static.ettoday.net/images/853/b853771.jpg" alt="破門救狗!主人坐牢 馬爾濟斯犬3周靠電動門縫進食" /><br/> 新竹一名男子因為酒駕,11月21日入監服刑,他養的馬爾濟斯犬沒人餵養,只好拜託朋友照顧,卻因為沒有鑰匙,只能從電動門縫丟食物進去,愛狗人士多次向警方、縣政府等單位投書,得到的答覆都是「私宅有私權問題,無法破壞強制進入」;最後透過監獄取得飼主同意書,13日在警方陪同下,找來鎖匠開鎖把狗狗救出。 <a href="http://www.ettoday.net/news/20141213/438465.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=yc2JXITeI1M:wS-0chGp9lg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=yc2JXITeI1M:wS-0chGp9lg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=yc2JXITeI1M:wS-0chGp9lg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=yc2JXITeI1M:wS-0chGp9lg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=yc2JXITeI1M:wS-0chGp9lg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/yc2JXITeI1M" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/yc2JXITeI1M/438465.htm + http://www.ettoday.net/news/20141213/438465.htm + Sat,13 Dec 2014 13:08:00 +0800 + http://www.ettoday.net/news/20141213/438465.htm + + + <![CDATA[《專訪》夢想在TeSL發芽 社群記者Bryant的自白]]> + + <img src="http://static.ettoday.net/images/850/b850755.jpg" alt="《專訪》夢想在TeSL發芽 社群記者Bryant的自白" /><br/> 說也有趣,其實當初我所應徵的職缺並非如此,而是一名網站管理,卻因為當時新聞部需支援而意外踏入這個領域,從起初不順利到越做越有心得,主管問我:「你想要當網管還是記者?」我笑了笑回答:「在這裡就好。」 <a href="http://www.ettoday.net/news/20141213/437662.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CobE2b4BC9I:Yt05zRp2Tkg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CobE2b4BC9I:Yt05zRp2Tkg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CobE2b4BC9I:Yt05zRp2Tkg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=CobE2b4BC9I:Yt05zRp2Tkg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=CobE2b4BC9I:Yt05zRp2Tkg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/CobE2b4BC9I" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/CobE2b4BC9I/437662.htm + http://www.ettoday.net/news/20141213/437662.htm + Sat,13 Dec 2014 13:00:00 +0800 + http://www.ettoday.net/news/20141213/437662.htm + + + <![CDATA[男買便當猶豫爆爭吵 怒持斷湯杓刺死廚師判12年]]> + + <img src="http://static.ettoday.net/images/837/b837074.jpg" alt="男買便當猶豫爆爭吵 怒持斷湯杓刺死廚師判12年" /><br/> 林姓男子是北市長安西路某便當店常客,但常因點菜過久而招致店員抱怨,去7月間他又至店內買晚餐,再因是否內用或外帶猶豫不決而和店員爆爭吵,店內廚師前來幫腔,林男竟憤而持湯杓攻擊廚師頭部頸部,造成廚師送醫不治死亡,法院審理後以林男有中度智障判刑12年定讞。 <a href="http://www.ettoday.net/news/20141213/438467.htm?from=rss" target="_blank">《詳全文...》</a><div class="feedflare"> +<a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=vUUG1rtIr1Y:qiRSux5zoMQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=vUUG1rtIr1Y:qiRSux5zoMQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=vUUG1rtIr1Y:qiRSux5zoMQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?i=vUUG1rtIr1Y:qiRSux5zoMQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ettoday/realtime?a=vUUG1rtIr1Y:qiRSux5zoMQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ettoday/realtime?d=yIl2AUoC8zA" border="0"></img></a> +</div><img src="//feeds.feedburner.com/~r/ettoday/realtime/~4/vUUG1rtIr1Y" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/ettoday/realtime/~3/vUUG1rtIr1Y/438467.htm + http://www.ettoday.net/news/20141213/438467.htm + Sat,13 Dec 2014 12:52:00 +0800 + http://www.ettoday.net/news/20141213/438467.htm + + diff --git a/tests/models/Crawler/Ettoday/data/listing.json b/tests/models/Crawler/Ettoday/data/listing.json new file mode 100644 index 0000000..8987830 --- /dev/null +++ b/tests/models/Crawler/Ettoday/data/listing.json @@ -0,0 +1,273 @@ +[ + "http://www.ettoday.net/news/20141028/418645.htm", + "http://www.ettoday.net/news/20141202/433797.htm", + "http://www.ettoday.net/news/20141204/434834.htm", + "http://www.ettoday.net/news/20141206/435287.htm", + "http://www.ettoday.net/news/20141208/436152.htm", + "http://www.ettoday.net/news/20141209/436359.htm", + "http://www.ettoday.net/news/20141209/436374.htm", + "http://www.ettoday.net/news/20141209/436692.htm", + "http://www.ettoday.net/news/20141210/436375.htm", + "http://www.ettoday.net/news/20141210/436867.htm", + "http://www.ettoday.net/news/20141210/436996.htm", + "http://www.ettoday.net/news/20141210/437018.htm", + "http://www.ettoday.net/news/20141210/437036.htm", + "http://www.ettoday.net/news/20141211/437390.htm", + "http://www.ettoday.net/news/20141211/437513.htm", + "http://www.ettoday.net/news/20141211/437558.htm", + "http://www.ettoday.net/news/20141211/437573.htm", + "http://www.ettoday.net/news/20141211/437632.htm", + "http://www.ettoday.net/news/20141211/437739.htm", + "http://www.ettoday.net/news/20141211/437865.htm", + "http://www.ettoday.net/news/20141211/437879.htm", + "http://www.ettoday.net/news/20141211/437884.htm", + "http://www.ettoday.net/news/20141211/437893.htm", + "http://www.ettoday.net/news/20141212/434778.htm", + "http://www.ettoday.net/news/20141212/435066.htm", + "http://www.ettoday.net/news/20141212/436447.htm", + "http://www.ettoday.net/news/20141212/437476.htm", + "http://www.ettoday.net/news/20141212/437496.htm", + "http://www.ettoday.net/news/20141212/437572.htm", + "http://www.ettoday.net/news/20141212/437661.htm", + "http://www.ettoday.net/news/20141212/437674.htm", + "http://www.ettoday.net/news/20141212/437869.htm", + "http://www.ettoday.net/news/20141212/437870.htm", + "http://www.ettoday.net/news/20141212/437887.htm", + "http://www.ettoday.net/news/20141212/437900.htm", + "http://www.ettoday.net/news/20141212/437902.htm", + "http://www.ettoday.net/news/20141212/437920.htm", + "http://www.ettoday.net/news/20141212/437937.htm", + "http://www.ettoday.net/news/20141212/437956.htm", + "http://www.ettoday.net/news/20141212/437974.htm", + "http://www.ettoday.net/news/20141212/437986.htm", + "http://www.ettoday.net/news/20141212/437990.htm", + "http://www.ettoday.net/news/20141212/437999.htm", + "http://www.ettoday.net/news/20141212/438001.htm", + "http://www.ettoday.net/news/20141212/438005.htm", + "http://www.ettoday.net/news/20141212/438019.htm", + "http://www.ettoday.net/news/20141212/438020.htm", + "http://www.ettoday.net/news/20141212/438029.htm", + "http://www.ettoday.net/news/20141212/438031.htm", + "http://www.ettoday.net/news/20141212/438033.htm", + "http://www.ettoday.net/news/20141212/438037.htm", + "http://www.ettoday.net/news/20141212/438040.htm", + "http://www.ettoday.net/news/20141212/438043.htm", + "http://www.ettoday.net/news/20141212/438046.htm", + "http://www.ettoday.net/news/20141212/438054.htm", + "http://www.ettoday.net/news/20141212/438061.htm", + "http://www.ettoday.net/news/20141212/438065.htm", + "http://www.ettoday.net/news/20141212/438067.htm", + "http://www.ettoday.net/news/20141212/438073.htm", + "http://www.ettoday.net/news/20141212/438074.htm", + "http://www.ettoday.net/news/20141212/438075.htm", + "http://www.ettoday.net/news/20141212/438077.htm", + "http://www.ettoday.net/news/20141212/438083.htm", + "http://www.ettoday.net/news/20141212/438097.htm", + "http://www.ettoday.net/news/20141212/438110.htm", + "http://www.ettoday.net/news/20141212/438111.htm", + "http://www.ettoday.net/news/20141212/438130.htm", + "http://www.ettoday.net/news/20141212/438131.htm", + "http://www.ettoday.net/news/20141212/438133.htm", + "http://www.ettoday.net/news/20141212/438138.htm", + "http://www.ettoday.net/news/20141212/438139.htm", + "http://www.ettoday.net/news/20141212/438146.htm", + "http://www.ettoday.net/news/20141212/438148.htm", + "http://www.ettoday.net/news/20141212/438149.htm", + "http://www.ettoday.net/news/20141212/438150.htm", + "http://www.ettoday.net/news/20141212/438159.htm", + "http://www.ettoday.net/news/20141212/438162.htm", + "http://www.ettoday.net/news/20141212/438196.htm", + "http://www.ettoday.net/news/20141212/438197.htm", + "http://www.ettoday.net/news/20141212/438199.htm", + "http://www.ettoday.net/news/20141212/438200.htm", + "http://www.ettoday.net/news/20141212/438201.htm", + "http://www.ettoday.net/news/20141212/438205.htm", + "http://www.ettoday.net/news/20141212/438208.htm", + "http://www.ettoday.net/news/20141212/438209.htm", + "http://www.ettoday.net/news/20141212/438210.htm", + "http://www.ettoday.net/news/20141212/438212.htm", + "http://www.ettoday.net/news/20141212/438218.htm", + "http://www.ettoday.net/news/20141212/438222.htm", + "http://www.ettoday.net/news/20141212/438224.htm", + "http://www.ettoday.net/news/20141212/438234.htm", + "http://www.ettoday.net/news/20141212/438238.htm", + "http://www.ettoday.net/news/20141212/438243.htm", + "http://www.ettoday.net/news/20141212/438244.htm", + "http://www.ettoday.net/news/20141212/438248.htm", + "http://www.ettoday.net/news/20141212/438255.htm", + "http://www.ettoday.net/news/20141212/438256.htm", + "http://www.ettoday.net/news/20141212/438259.htm", + "http://www.ettoday.net/news/20141212/438261.htm", + "http://www.ettoday.net/news/20141212/438267.htm", + "http://www.ettoday.net/news/20141212/438272.htm", + "http://www.ettoday.net/news/20141212/438274.htm", + "http://www.ettoday.net/news/20141212/438281.htm", + "http://www.ettoday.net/news/20141212/438284.htm", + "http://www.ettoday.net/news/20141212/438288.htm", + "http://www.ettoday.net/news/20141212/438290.htm", + "http://www.ettoday.net/news/20141212/438292.htm", + "http://www.ettoday.net/news/20141212/438297.htm", + "http://www.ettoday.net/news/20141212/438298.htm", + "http://www.ettoday.net/news/20141212/438299.htm", + "http://www.ettoday.net/news/20141212/438300.htm", + "http://www.ettoday.net/news/20141212/438303.htm", + "http://www.ettoday.net/news/20141212/438314.htm", + "http://www.ettoday.net/news/20141212/438316.htm", + "http://www.ettoday.net/news/20141212/438318.htm", + "http://www.ettoday.net/news/20141212/438333.htm", + "http://www.ettoday.net/news/20141212/438334.htm", + "http://www.ettoday.net/news/20141212/438335.htm", + "http://www.ettoday.net/news/20141212/438341.htm", + "http://www.ettoday.net/news/20141212/438346.htm", + "http://www.ettoday.net/news/20141212/438349.htm", + "http://www.ettoday.net/news/20141212/438352.htm", + "http://www.ettoday.net/news/20141212/438354.htm", + "http://www.ettoday.net/news/20141212/438355.htm", + "http://www.ettoday.net/news/20141212/438356.htm", + "http://www.ettoday.net/news/20141212/438358.htm", + "http://www.ettoday.net/news/20141212/438360.htm", + "http://www.ettoday.net/news/20141212/438362.htm", + "http://www.ettoday.net/news/20141212/438363.htm", + "http://www.ettoday.net/news/20141212/438364.htm", + "http://www.ettoday.net/news/20141212/438365.htm", + "http://www.ettoday.net/news/20141212/438366.htm", + "http://www.ettoday.net/news/20141212/438367.htm", + "http://www.ettoday.net/news/20141212/438369.htm", + "http://www.ettoday.net/news/20141212/438370.htm", + "http://www.ettoday.net/news/20141212/438371.htm", + "http://www.ettoday.net/news/20141212/438374.htm", + "http://www.ettoday.net/news/20141212/438375.htm", + "http://www.ettoday.net/news/20141212/438376.htm", + "http://www.ettoday.net/news/20141212/438378.htm", + "http://www.ettoday.net/news/20141212/438379.htm", + "http://www.ettoday.net/news/20141212/438380.htm", + "http://www.ettoday.net/news/20141212/438385.htm", + "http://www.ettoday.net/news/20141212/438388.htm", + "http://www.ettoday.net/news/20141212/438389.htm", + "http://www.ettoday.net/news/20141212/438391.htm", + "http://www.ettoday.net/news/20141212/438392.htm", + "http://www.ettoday.net/news/20141212/438394.htm", + "http://www.ettoday.net/news/20141212/438395.htm", + "http://www.ettoday.net/news/20141213/433489.htm", + "http://www.ettoday.net/news/20141213/435001.htm", + "http://www.ettoday.net/news/20141213/435217.htm", + "http://www.ettoday.net/news/20141213/435228.htm", + "http://www.ettoday.net/news/20141213/437242.htm", + "http://www.ettoday.net/news/20141213/437384.htm", + "http://www.ettoday.net/news/20141213/437600.htm", + "http://www.ettoday.net/news/20141213/437608.htm", + "http://www.ettoday.net/news/20141213/437662.htm", + "http://www.ettoday.net/news/20141213/437670.htm", + "http://www.ettoday.net/news/20141213/437675.htm", + "http://www.ettoday.net/news/20141213/437678.htm", + "http://www.ettoday.net/news/20141213/437740.htm", + "http://www.ettoday.net/news/20141213/437807.htm", + "http://www.ettoday.net/news/20141213/437903.htm", + "http://www.ettoday.net/news/20141213/437963.htm", + "http://www.ettoday.net/news/20141213/437984.htm", + "http://www.ettoday.net/news/20141213/438055.htm", + "http://www.ettoday.net/news/20141213/438090.htm", + "http://www.ettoday.net/news/20141213/438135.htm", + "http://www.ettoday.net/news/20141213/438168.htm", + "http://www.ettoday.net/news/20141213/438175.htm", + "http://www.ettoday.net/news/20141213/438177.htm", + "http://www.ettoday.net/news/20141213/438180.htm", + "http://www.ettoday.net/news/20141213/438198.htm", + "http://www.ettoday.net/news/20141213/438203.htm", + "http://www.ettoday.net/news/20141213/438207.htm", + "http://www.ettoday.net/news/20141213/438221.htm", + "http://www.ettoday.net/news/20141213/438225.htm", + "http://www.ettoday.net/news/20141213/438246.htm", + "http://www.ettoday.net/news/20141213/438252.htm", + "http://www.ettoday.net/news/20141213/438264.htm", + "http://www.ettoday.net/news/20141213/438273.htm", + "http://www.ettoday.net/news/20141213/438282.htm", + "http://www.ettoday.net/news/20141213/438306.htm", + "http://www.ettoday.net/news/20141213/438307.htm", + "http://www.ettoday.net/news/20141213/438311.htm", + "http://www.ettoday.net/news/20141213/438338.htm", + "http://www.ettoday.net/news/20141213/438344.htm", + "http://www.ettoday.net/news/20141213/438353.htm", + "http://www.ettoday.net/news/20141213/438373.htm", + "http://www.ettoday.net/news/20141213/438381.htm", + "http://www.ettoday.net/news/20141213/438390.htm", + "http://www.ettoday.net/news/20141213/438398.htm", + "http://www.ettoday.net/news/20141213/438400.htm", + "http://www.ettoday.net/news/20141213/438401.htm", + "http://www.ettoday.net/news/20141213/438402.htm", + "http://www.ettoday.net/news/20141213/438403.htm", + "http://www.ettoday.net/news/20141213/438404.htm", + "http://www.ettoday.net/news/20141213/438406.htm", + "http://www.ettoday.net/news/20141213/438407.htm", + "http://www.ettoday.net/news/20141213/438408.htm", + "http://www.ettoday.net/news/20141213/438409.htm", + "http://www.ettoday.net/news/20141213/438410.htm", + "http://www.ettoday.net/news/20141213/438411.htm", + "http://www.ettoday.net/news/20141213/438412.htm", + "http://www.ettoday.net/news/20141213/438414.htm", + "http://www.ettoday.net/news/20141213/438415.htm", + "http://www.ettoday.net/news/20141213/438416.htm", + "http://www.ettoday.net/news/20141213/438417.htm", + "http://www.ettoday.net/news/20141213/438418.htm", + "http://www.ettoday.net/news/20141213/438419.htm", + "http://www.ettoday.net/news/20141213/438420.htm", + "http://www.ettoday.net/news/20141213/438422.htm", + "http://www.ettoday.net/news/20141213/438423.htm", + "http://www.ettoday.net/news/20141213/438424.htm", + "http://www.ettoday.net/news/20141213/438425.htm", + "http://www.ettoday.net/news/20141213/438426.htm", + "http://www.ettoday.net/news/20141213/438427.htm", + "http://www.ettoday.net/news/20141213/438428.htm", + "http://www.ettoday.net/news/20141213/438429.htm", + "http://www.ettoday.net/news/20141213/438430.htm", + "http://www.ettoday.net/news/20141213/438431.htm", + "http://www.ettoday.net/news/20141213/438432.htm", + "http://www.ettoday.net/news/20141213/438433.htm", + "http://www.ettoday.net/news/20141213/438434.htm", + "http://www.ettoday.net/news/20141213/438435.htm", + "http://www.ettoday.net/news/20141213/438436.htm", + "http://www.ettoday.net/news/20141213/438437.htm", + "http://www.ettoday.net/news/20141213/438438.htm", + "http://www.ettoday.net/news/20141213/438440.htm", + "http://www.ettoday.net/news/20141213/438441.htm", + "http://www.ettoday.net/news/20141213/438442.htm", + "http://www.ettoday.net/news/20141213/438443.htm", + "http://www.ettoday.net/news/20141213/438444.htm", + "http://www.ettoday.net/news/20141213/438445.htm", + "http://www.ettoday.net/news/20141213/438446.htm", + "http://www.ettoday.net/news/20141213/438448.htm", + "http://www.ettoday.net/news/20141213/438449.htm", + "http://www.ettoday.net/news/20141213/438453.htm", + "http://www.ettoday.net/news/20141213/438454.htm", + "http://www.ettoday.net/news/20141213/438455.htm", + "http://www.ettoday.net/news/20141213/438456.htm", + "http://www.ettoday.net/news/20141213/438457.htm", + "http://www.ettoday.net/news/20141213/438458.htm", + "http://www.ettoday.net/news/20141213/438459.htm", + "http://www.ettoday.net/news/20141213/438460.htm", + "http://www.ettoday.net/news/20141213/438461.htm", + "http://www.ettoday.net/news/20141213/438462.htm", + "http://www.ettoday.net/news/20141213/438464.htm", + "http://www.ettoday.net/news/20141213/438465.htm", + "http://www.ettoday.net/news/20141213/438466.htm", + "http://www.ettoday.net/news/20141213/438467.htm", + "http://www.ettoday.net/news/20141213/438468.htm", + "http://www.ettoday.net/news/20141213/438471.htm", + "http://www.ettoday.net/news/20141213/438473.htm", + "http://www.ettoday.net/news/20141213/438475.htm", + "http://www.ettoday.net/news/20141213/438479.htm", + "http://www.ettoday.net/news/20141213/438480.htm", + "http://www.ettoday.net/news/20141213/438481.htm", + "http://www.ettoday.net/news/20141213/438482.htm", + "http://www.ettoday.net/news/20141213/438483.htm", + "http://www.ettoday.net/news/20141213/438484.htm", + "http://www.ettoday.net/news/20141213/438485.htm", + "http://www.ettoday.net/news/20141213/438487.htm", + "http://www.ettoday.net/news/20141213/438488.htm", + "http://www.ettoday.net/news/20141213/438490.htm", + "http://www.ettoday.net/news/20141213/438494.htm", + "http://www.ettoday.net/news/20141213/438495.htm", + "http://www.ettoday.net/news/20141213/438498.htm", + "http://www.ettoday.net/news/20141213/438500.htm", + "http://www.ettoday.net/news/20141213/438502.htm" +] \ No newline at end of file diff --git a/tests/models/Crawler/FTV/Crawl.test b/tests/models/Crawler/FTV/Crawl.test new file mode 100644 index 0000000..b794880 --- /dev/null +++ b/tests/models/Crawler/FTV/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_FTV::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_FTV::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/FTV/Parse.test b/tests/models/Crawler/FTV/Parse.test new file mode 100644 index 0000000..84ce58e --- /dev/null +++ b/tests/models/Crawler/FTV/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_FTV::parse (2014C01L08M1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/2014C01L08M1.html'); + $result = Crawler_FTV::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/2014C01L08M1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/FTV/data/2014C01L08M1.html b/tests/models/Crawler/FTV/data/2014C01L08M1.html new file mode 100644 index 0000000..89163ac --- /dev/null +++ b/tests/models/Crawler/FTV/data/2014C01L08M1.html @@ -0,0 +1,573 @@ + + + + + 「良心包子」重視食安 虧損2年出頭天 + + + + + + + +
                    + + + + + +
                    +
                    + + + + +
                    + + + +
                    + +
                    + + +
                    + +
                    + + + + + + + + + + + +
                    + +
                    +
                    + + + + +
                    + + +
                    + +
                    + +
                    +
                    + +
                    +
                    + 其它生活新聞 +
                    + +
                    +
                    +
                    +
                    + + +
                    + +

                    + + +
                    + +
                    +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + + + + + +
                    + + + + + +
                    +
                    +
                    + + diff --git a/tests/models/Crawler/FTV/data/2014C01L08M1.json b/tests/models/Crawler/FTV/data/2014C01L08M1.json new file mode 100644 index 0000000..1310ccd --- /dev/null +++ b/tests/models/Crawler/FTV/data/2014C01L08M1.json @@ -0,0 +1,4 @@ +{ + "title": "「良心包子」重視食安 虧損2年出頭天", + "body": "內湖有家包子店,開業3年來,堅持使用新鮮原物料,製作良心包子,由於賣得比較貴,一開始每月都虧損,但老闆不放棄理念,終於在食安風暴後,轉虧為盈,年營業額達300萬元,還獲得勞動部的創業楷模獎。\n\n掰開包子皮,青綠色高麗菜,或一絲一絲白蘿蔔絲,冒著熱煙,讓人想咬一口,這位香港觀光客,更直接搬一箱回國。\n\n讓客人安心,也是包子店老闆娘,3年來堅持的原則。\n\n麵團用新鮮麵粉,高麗菜去黑邊,洗4次切絲,填入麵團中,再捏起來,健檢中心出身的葉謹瑜,因父親罹癌,立志做出最健康的良心包子。\n\n可是巴掌大包子,得賣20元以上,客人嫌貴,因此頭一年,每月都虧10萬多元。\n\n如今店裡年營業額達300萬元,還獲選「微型企業創業楷模獎」,新推出的動物包,更受到動物園青睞,業績蒸蒸日上,證明了良心是經營生意的不二法門。(民視新聞陳韻平、郭文海台北報導)" +} \ No newline at end of file diff --git a/tests/models/Crawler/FTV/data/README.md b/tests/models/Crawler/FTV/data/README.md new file mode 100644 index 0000000..298a9ac --- /dev/null +++ b/tests/models/Crawler/FTV/data/README.md @@ -0,0 +1,14 @@ +FTV data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + +- `2014C01L08M1.html` + From: http://news.ftv.com.tw/NewsContent.aspx?sno=2014C01L08M1 \ No newline at end of file diff --git a/tests/models/Crawler/FTV/data/listing.html b/tests/models/Crawler/FTV/data/listing.html new file mode 100644 index 0000000..2d06453 --- /dev/null +++ b/tests/models/Crawler/FTV/data/listing.html @@ -0,0 +1,876 @@ + + + + + 【民視新聞網】 + + + + + + + +
                    +
                    + +
                    + +
                    + + + +
                    + +
                    +
                    + + + + +
                    + + + +
                    + +
                    + + +
                    + +
                    + + + + + + + + +
                    +
                    + + + + +
                    + +
                    +
                    + +
                    +
                    +
                    +
                    強烈冷氣團影響 各地氣溫低
                    下週二水氣增 北部及東部有陣雨
                    朱立倫提內閣制 胡志強:要全民有共識
                    胡志強北上會朱立倫 宣布不選黨主席
                    北市副市長 傳內定廣告人莊淑芬
                    陳為廷選立委 賴清德表態力挺
                    內閣制行不行? 賴清德:改回"完整雙首長制"
                    陳水扁保外就醫聲明異議 遭高院駁回
                    司機曾求助桃警 員警僅登記資料未通知家屬
                    男子被砍報案 3單位拖5小時怒控警吃案
                    黑手缺工潮 30K請不到車床.焊接工
                    麵粉價格降一成 土司麵包反漲兩成
                    國際原物料紛走跌 速食店仍喊漲
                    網路山寨原廠維修站 罰鍰恐提高
                    兒福聯盟社團活動 助偏鄉學童圓夢
                    1/10 全球女權鬥士伊芙.恩斯勒蒞台演講
                    2015台南跨年"就是愛秀"比賽 請洽官網
                    12/13 紙風車卡車藝術 19:00雲林元長國小
                    12/14 紙風車卡車藝術 "蘋果劇團"演出
                    12/14午13時台北車站西二門 外勞健康關懷
                    李鎮源冥誕音樂會 06-2381711#1222免費
                    北市淘汰二行程加碼3千 12/15截止洽1999
                    陳定南陽光獎金.志工 宜蘭高中職12/13截止
                    總獎金10萬元 上網搜尋幸福能量大募集
                    心健康短片徵選 上網搜尋心健康短片
                    更多民視新聞 請看民視新聞App
                    闖蕩大聯盟20年 哈金斯宣布明年退休
                    美國奧瑞岡校園槍擊 4傷3人命危
                    美國西部風雨交加 南加州爆土石流
                    聯航卡跑道 乘客受困澳洲機場8小時
                    航管電腦故障 倫敦關閉領空1小時
                    娘家貪腐案纏身 王儲妃棄王室頭銜
                    +
                    + +
                    +
                    +
                    +
                    週日白天至週一 冷氣團減弱氣溫回升
                    下週二寒流來襲 低溫下探九度
                    胡志強北上會朱立倫 退選黨主席
                    朱拋內閣制 吳敦義:輔選中立不表態
                    朱立倫讓位2016?吳敦義避談留伏筆
                    林佳龍團隊亮相 行動市府啟動
                    國防部副部長夏立言 夜宴前共軍官員
                    憂罷免蔡正元難成案 割闌尾續衝刺
                    失智老翁失蹤凍死 家屬控訴桃園員警冷漠
                    追捕槍毒通緝犯 汽旅爆警匪駁火
                    彭淮南喊話 明年企業應加薪4%!
                    太魯閣路跑賽 民眾綁布條抗議亞泥
                    量販土司.漢堡王喊漲 消費者:拒吃
                    生活焦點/黑手缺工潮 30K請不到焊接工
                    漁民"飄浪的人生" 全在行動討海館
                    伊芙.恩斯勒演講 洽勵馨02-89115595#118
                    12/17慈林音樂會 19:00台北馬偕大禮堂
                    12/13 紙風車卡車藝術 "唐美雲歌仔戲團"演出
                    12/14 紙風車卡車藝術 19:00麻豆總爺藝文中心
                    紙風車劇團12/13晚7時 嘉義民雄鄉東榮國小
                    12/21李鎮源百歲冥誕音樂會 臺南文化中心
                    南投集集花現寶 12/21前每週六日
                    集集花現寶活動請上FB "HI!中區商圈"
                    陳定南陽光獎學金.志工營 洽03-989-8855
                    紓壓小偏方徵選 上網搜尋EQ小偏方
                    民視新聞Live 同步YouTube直播
                    第三屆台灣之美大賽募件 洽民視官網
                    目擊者指槍手不只一人 疑幫派份子
                    印尼爪哇島大山崩 已3死38傷107失蹤
                    中國情侶鬧機 泡麵潑空姐遭求償
                    佔中剩銅鑼灣一處 最快下週清場
                    東京表參道點燈 浪漫燈海吸睛
                    +
                    + +
                    +
                    + +
                    + + + + + + + + + + + +
                    +
                    + +
                    +
                    +

                    阿愷報氣象更多

                    +
                    + +
                    +
                    + +
                    +

                    好康新聞更多

                    +
                    +
                    + +
                    +無花果園養火雞 攝取酵素肉質 +

                    火雞,向來是感恩節或耶誕節的代表食物,雲林北港有農民,將.....

                    +
                    +
                    + + + +
                    +
                    + +
                    +

                    新聞節目

                    +
                    + +
                    +
                    + + + + +
                    劉里長的前背包(上)
                    九合一選舉落幕,選出來這麼多民意代表當中,和民眾互動最密切的,應該就是里長了。里長的工作包括了傳達政令、協調里民紛爭,以及協助辦理各項申請補助等等,不過,在...
                    +
                    +
                    + + + + +
                    劉里長的前背包(下)
                    無奈的政治歷史因素,讓無數的家庭被迫分隔海峽兩岸。熱心的里長劉德文把老兵的骨灰放在他的前背包,一路背回中國家鄉,完成老兵與家人團圓的心願,這樣感人的故事也傳...
                    +
                    +
                    + + + + +
                    「金」非昔比
                    黃金是大家非常熟悉的貴金屬,從古到今,人們都把黃金和財富畫上等號,在古代中醫,甚至把它拿來當作治病的藥材之一。現代人聽來或許覺得不可思議,黃金真的可以治病嗎...
                    +
                    + +
                    + + +
                    +
                    + + + + +
                    頭家來開講
                    超越藍綠.台北重開機!? 獨家專訪柯文哲 +...
                    +
                    +
                    + + + + +
                    新聞觀測站
                    高雄市長陳菊 專訪...
                    +
                    +
                    + + + + +
                    民視異言堂
                    九合一選舉落幕,選出來這麼多民意代表當中,和民眾互動最密切的,應該就是里長了。里長的工作包括了傳達政令、協調里民紛爭,以及協助辦理各項申請補助等等,不過,在...
                    +
                    + +
                    + +
                    +
                    +
                    + + + + + +
                     
                    + +
                    +

                    主播社群

                    +
                    +
                    + + + + + + +
                    +
                    +
                      +
                    • + + + + + + + + + + +
                      ▲胡婉玲
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲李偵禎
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲張嘉欣
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲林靖芬
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲常聖傳
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲林柏妤
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲張筱芬
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲陳淑貞
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲劉朝陽
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲陳建君
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲許仲江
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲王人瑞
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲何文堯
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲林子皓
                      +
                    • +
                    • + + + + + + + + + + +
                      ▲周康韵
                      +
                    • + + +
                    +
                    +
                    +
                    +
                    + + +
                    +
                    + +
                    + +
                    + + + +
                    + + + + + +
                    +
                    +
                    + + diff --git a/tests/models/Crawler/FTV/data/listing.json b/tests/models/Crawler/FTV/data/listing.json new file mode 100644 index 0000000..3c16cf4 --- /dev/null +++ b/tests/models/Crawler/FTV/data/listing.json @@ -0,0 +1,47 @@ +[ + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C01L08M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C07C07M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C09C06M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C10S12M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C11Q01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C11Q04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C11Q05M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C11Q06M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12A05M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12A07M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12A10M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12C08M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12F05M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12F07M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12F08M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12I18M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12I20M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12L05M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12N10M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C12S10M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13A01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13C01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13C02M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13C03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13F01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13I03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13I04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13I05M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13L02M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13L03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13L04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13N01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13N03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13N04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13P01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13P02M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13P03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13P04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13S02M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13S03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13S04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13U01M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13U03M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13U04M1", + "http://news.ftv.com.tw/NewsContent.aspx?sno=2014C13U05M1" +] \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/Crawl.test b/tests/models/Crawler/Libertytimes/Crawl.test new file mode 100644 index 0000000..239ab13 --- /dev/null +++ b/tests/models/Crawler/Libertytimes/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Libertytimes::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Libertytimes::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/Parse.test b/tests/models/Crawler/Libertytimes/Parse.test new file mode 100644 index 0000000..7899724 --- /dev/null +++ b/tests/models/Crawler/Libertytimes/Parse.test @@ -0,0 +1,57 @@ +label = 'Crawler_Libertytimes::parse (20130813t3.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/20130813t3.html'); + $result = Crawler_Libertytimes::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/20130813t3.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} + +class TestCase_Crawler_Libertytimes_Parse_1180585 extends UnitTestCase +{ + + function __construct() + { + $this->label = 'Crawler_Libertytimes::parse (1180585.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/1180585.html'); + $result = Crawler_Libertytimes::parse($content); + $reference = json_decode(file_get_contents(__DIR__ . '/data/1180585.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} diff --git a/tests/models/Crawler/Libertytimes/data/1180585.html b/tests/models/Crawler/Libertytimes/data/1180585.html new file mode 100644 index 0000000..e7bf8e8 --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/1180585.html @@ -0,0 +1,798 @@ + + + + + + +金融時報2014年代表人物:蘋果執行長庫克 - 財經 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + +
                    +
                    + +
                    + + + + +

                    金融時報2014年代表人物:蘋果執行長庫克

                    + +
                    +
                    + +
                    + 2014-12-13  12:30 +

                    〔本報訊〕英國《金融時報》評選庫克﹝Tim Cook﹞為2014年度代表人物,這位蘋果現任執行長,在蘋果創始人賈伯斯﹝Steve Jobs﹞去世後,帶領蘋果走過風風雨雨,不但以銷售佳績延續了蘋果的成功故事,也帶領蘋果走出賈伯斯的影子,今年發表的iPhone 6和Apple Watch,更正式宣告「庫克時代」的來臨。

                    一點都沒有輸給賈伯斯 庫克勇於不同

                    賈伯斯過世後,許多人冷言嘲諷,認為庫克不若賈伯斯有個人魅力,恐無法持續維持蘋果3c霸主的寶座,但庫克用傲人的財務成績「iPhone 6銷售量上看7000萬、上季銷售額衝上420億美元、今年市值接近Google」證明了自己的能力。

                    如此亮眼的財務業績或許足以讓這位蘋果執行長贏得英國《金融時報》2014年度代表人物的稱號,但庫克闡述自己價值觀的勇氣,更讓他與眾不同。

                    庫克在10月份的《彭博商業周刊》公開出櫃,表示以身為同志為榮,並在內容中寫到「如果蘋果執行長是同性戀的訊息,能幫助一些人勇於面對真實的自我,或者給一些感到孤獨的人帶來慰藉,或者激勵人們堅持自己的平等權利,那麽這值得我用個人隱私來交換。」

                    庫克勇於面對自我的宣言,獲得許多領導人讚揚,臉書執行長祖克柏在臉書上感謝庫克「身為一位領導者,庫克做出勇敢且真實的示範」;美國前總統柯林頓﹝Bill Clinton﹞更在推特上﹝twitter﹞發言「向庫克脫帽致敬。」

                    庫克管理公司有一套 「Keep calm and carry on」

                    麻省理工學院斯隆管理學院教授Michael Cusumano表示,賈伯斯是蘋果無可取代的精神象徵,但不得不說庫克很有一套,庫克使用制衡的手段讓公司內部派系和平共處。

                    一位蘋果的員工表示,公司內部一直存在「巨大的緊張感」但在瞬息萬變的科技業,緊迫感至關重要,關係到整個公司未來的發展。

                    2012年底,蘋果推出了有缺陷的蘋果地圖﹝Apple Maps﹞之後,庫克解雇了賈伯斯的盟友、領導開發iOS的Scott Forstall以及前Dixons首席執行長、掌管蘋果零售部門不到一年的John Browett,說明庫克不會容忍業績不佳或內部鉤心鬥角。

                    蘋果大股東之一加州公務員退休基金(Calpers)經理辛普森(Anne Simpson)形容庫克行事冷靜,泰然自若,「也是保持冷靜,繼續前進﹝Keep calm and carry on﹞這句話在企業界的最佳模範。」

                    +
                    +
                    廣告
                    +
                      +
                    • 英國《金融時報》評選庫克﹝Tim Cook﹞為2014年度代表人物,iPhone 6和Apple Watch正式宣告「庫克時代」的來臨。﹝路透﹞ +

                      英國《金融時報》評選庫克﹝Tim Cook﹞為2014年度代表人物,iPhone 6和Apple Watch正式宣告「庫克時代」的來臨。﹝路透﹞

                    • + +
                    +
                    +
                    +
                    + +
                    +
                    + +
                    + +
                    +
                    +
                    網友回應
                    +
                    + + + + + + + +
                    +
                    Top
                    + + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    熱門新聞
                    + +
                    + +
                    +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    轉寄
                    +

                    標題:金融時報2014年代表人物:蘋果執行長庫克

                    +
                    +
                    *收件人 Email 
                    如果要寄多個email,請用「;」分開,最多10個email
                    +
                    你的姓名 
                    +
                    *你的 Email 
                    +
                    訊息
                    + 驗證碼   驗證碼有大小寫之分 +  +
                    +
                    +
                    + +
                    Top
                    +
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/1180585.json b/tests/models/Crawler/Libertytimes/data/1180585.json new file mode 100644 index 0000000..5026f0d --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/1180585.json @@ -0,0 +1,4 @@ +{ + "title": "金融時報2014年代表人物:蘋果執行長庫克", + "body": "\n〔本報訊〕英國《金融時報》評選庫克﹝Tim Cook﹞為2014年度代表人物,這位蘋果現任執行長,在蘋果創始人賈伯斯﹝Steve Jobs﹞去世後,帶領蘋果走過風風雨雨,不但以銷售佳績延續了蘋果的成功故事,也帶領蘋果走出賈伯斯的影子,今年發表的iPhone 6和Apple Watch,更正式宣告「庫克時代」的來臨。\n一點都沒有輸給賈伯斯 庫克勇於不同\n賈伯斯過世後,許多人冷言嘲諷,認為庫克不若賈伯斯有個人魅力,恐無法持續維持蘋果3c霸主的寶座,但庫克用傲人的財務成績「iPhone 6銷售量上看7000萬、上季銷售額衝上420億美元、今年市值接近Google」證明了自己的能力。\n如此亮眼的財務業績或許足以讓這位蘋果執行長贏得英國《金融時報》2014年度代表人物的稱號,但庫克闡述自己價值觀的勇氣,更讓他與眾不同。\n庫克在10月份的《彭博商業周刊》公開出櫃,表示以身為同志為榮,並在內容中寫到「如果蘋果執行長是同性戀的訊息,能幫助一些人勇於面對真實的自我,或者給一些感到孤獨的人帶來慰藉,或者激勵人們堅持自己的平等權利,那麽這值得我用個人隱私來交換。」\n庫克勇於面對自我的宣言,獲得許多領導人讚揚,臉書執行長祖克柏在臉書上感謝庫克「身為一位領導者,庫克做出勇敢且真實的示範」;美國前總統柯林頓﹝Bill Clinton﹞更在推特上﹝twitter﹞發言「向庫克脫帽致敬。」\n庫克管理公司有一套 「Keep calm and carry on」\n麻省理工學院斯隆管理學院教授Michael Cusumano表示,賈伯斯是蘋果無可取代的精神象徵,但不得不說庫克很有一套,庫克使用制衡的手段讓公司內部派系和平共處。\n一位蘋果的員工表示,公司內部一直存在「巨大的緊張感」但在瞬息萬變的科技業,緊迫感至關重要,關係到整個公司未來的發展。\n2012年底,蘋果推出了有缺陷的蘋果地圖﹝Apple Maps﹞之後,庫克解雇了賈伯斯的盟友、領導開發iOS的Scott Forstall以及前Dixons首席執行長、掌管蘋果零售部門不到一年的John Browett,說明庫克不會容忍業績不佳或內部鉤心鬥角。\n蘋果大股東之一加州公務員退休基金(Calpers)經理辛普森(Anne Simpson)形容庫克行事冷靜,泰然自若,「也是保持冷靜,繼續前進﹝Keep calm and carry on﹞這句話在企業界的最佳模範。」" +} \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/20130813t3.html b/tests/models/Crawler/Libertytimes/data/20130813t3.html new file mode 100644 index 0000000..a9be6a8 --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/20130813t3.html @@ -0,0 +1,813 @@ + + + + + + +HTC拚行銷 有請鋼鐵人助陣 - 焦點 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + +
                    +
                    + +
                    + + + + +

                    HTC拚行銷 有請鋼鐵人助陣

                    + +
                    +
                    + +
                    + 2013-08-13 +

                    〔記者王憶紅/台北報導〕宏達電HTC行銷長何永生昨正式宣布,主演「鋼鐵人」系列電影的國際巨星小勞勃道尼(Robert DowneyJr.)將代言HTC品牌手機二年,代言廣告十五日起將陸續在台灣、美國、英國、俄羅斯、德國、中國等國播出。這是宏達電首度找全球品牌代言人,也是小勞勃道尼第一次接演電視商業廣告。

                    小勞勃道尼 代言費約三億六

                    對於代言費用,何永生僅低調回應,跟「之前你們傳的(指兩年一二○○萬美元,約三.六億台幣)」差不多。他透露,小勞勃道尼目前共錄製了五到六支廣告,除了讓小勞勃道尼說中文外,未來如果有需求,也很有可能教他學「台語」。

                    品牌知名度 盼提升三到四成

                    宏達電希望透過小勞勃道尼的全球知名度,提高HTC的品牌知名度三十到四十%。

                    何永生指出,宏達電今年全年行銷費用不會較去年的十億美元高;而今年上半年約花費四.七億美元,不到去年一半。傳聞中的小勞勃道尼代言費,則約占宏達電行銷費用的○.六%。

                    宏達電今年五月首次與小勞勃道尼接觸時,他並不清楚HTC這個品牌;何永生表示,找小勞勃道尼代言,主要是他的人生經歷與宏達電的DNA相當。小勞勃道尼年輕就出道,得到奧斯卡提名、榮獲金球獎,九十年代卻陷入人生低潮,但又重回世界舞台,並發光發熱。意味著宏達電遇到困難也會不斷改進,並會回到最好的狀況。

                    宏達電之前也請過區域代言人,如日本、台灣曾以乃木坂46代言HTC J(台灣HTC Butterfly),而今年新HTC One的大中華區代言人是王力宏、天團五月天。

                    宏達電昨天也推出最新的全球品牌行銷計畫「Here’s To Change」;何永生說,「Change」品牌平台以「它可以千變萬化(anything you want it to)」完整呈現HTC激發創新的精神。而「Change」品牌平台一系列就由小勞勃道尼主演的廣告影片起跑。

                    何永生說,身為改變推動者的小勞勃道尼,發現以HTC這三個英文字母為首,能排列出各式各樣詞彙組合,將廣泛引起消費者的興趣與討論。因此廣告影片將會呈現HTC在英文字母中代表的無限可能,如巨型錫箔遊艇(Humongous Tinfoil Catamaran)、潮怪洗車(Hipster Troll Carwash)等充滿創意的多樣發想。

                    +
                    +
                    廣告
                    +
                      +
                    • 宏達電HTC昨推出全球品牌行銷計畫「Change」,訴求HTC千變萬化的創新精神,並請來以電影「鋼鐵人」聞名的國際巨星小勞勃道尼(左二)代言。圖為小勞勃道尼主演的廣告影片一景,影片中的「潮怪洗車(Hipster Troll Carwash)」,即由HTC三個字母為首組成。(圖︰宏達電提供) +

                      宏達電HTC昨推出全球品牌行銷計畫「Change」,訴求HTC千變萬化的創新精神,並請來以電影「鋼鐵人」聞名的國際巨星小勞勃道尼(左二)代言。圖為小勞勃道尼主演的廣告影片一景,影片中的「潮怪洗車(Hipster Troll Carwash)」,即由HTC三個字母為首組成。(圖︰宏達電提供)

                    • + +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + +
                    +
                    +
                    網友回應
                    +
                    + + + + + + + +
                    +
                    Top
                    + + + + + +
                    +
                    +
                    + + + +
                    +
                    +
                    熱門新聞
                    + +
                    + +
                    +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    + + + + +
                    +
                    +
                    轉寄
                    +

                    標題:HTC拚行銷 有請鋼鐵人助陣

                    +
                    +
                    *收件人 Email 
                    如果要寄多個email,請用「;」分開,最多10個email
                    +
                    你的姓名 
                    +
                    *你的 Email 
                    +
                    訊息
                    + 驗證碼   驗證碼有大小寫之分 +  +
                    +
                    +
                    + +
                    Top
                    +
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/20130813t3.json b/tests/models/Crawler/Libertytimes/data/20130813t3.json new file mode 100644 index 0000000..9f8557c --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/20130813t3.json @@ -0,0 +1,4 @@ +{ + "title": "HTC拚行銷 有請鋼鐵人助陣", + "body": "\n〔記者王憶紅/台北報導〕宏達電HTC行銷長何永生昨正式宣布,主演「鋼鐵人」系列電影的國際巨星小勞勃道尼(Robert DowneyJr.)將代言HTC品牌手機二年,代言廣告十五日起將陸續在台灣、美國、英國、俄羅斯、德國、中國等國播出。這是宏達電首度找全球品牌代言人,也是小勞勃道尼第一次接演電視商業廣告。\n對於代言費用,何永生僅低調回應,跟「之前你們傳的(指兩年一二○○萬美元,約三.六億台幣)」差不多。他透露,小勞勃道尼目前共錄製了五到六支廣告,除了讓小勞勃道尼說中文外,未來如果有需求,也很有可能教他學「台語」。\n宏達電希望透過小勞勃道尼的全球知名度,提高HTC的品牌知名度三十到四十%。\n何永生指出,宏達電今年全年行銷費用不會較去年的十億美元高;而今年上半年約花費四.七億美元,不到去年一半。傳聞中的小勞勃道尼代言費,則約占宏達電行銷費用的○.六%。\n宏達電今年五月首次與小勞勃道尼接觸時,他並不清楚HTC這個品牌;何永生表示,找小勞勃道尼代言,主要是他的人生經歷與宏達電的DNA相當。小勞勃道尼年輕就出道,得到奧斯卡提名、榮獲金球獎,九十年代卻陷入人生低潮,但又重回世界舞台,並發光發熱。意味著宏達電遇到困難也會不斷改進,並會回到最好的狀況。\n宏達電之前也請過區域代言人,如日本、台灣曾以乃木坂46代言HTC J(台灣HTC Butterfly),而今年新HTC One的大中華區代言人是王力宏、天團五月天。\n宏達電昨天也推出最新的全球品牌行銷計畫「Here’s To Change」;何永生說,「Change」品牌平台以「它可以千變萬化(anything you want it to)」完整呈現HTC激發創新的精神。而「Change」品牌平台一系列就由小勞勃道尼主演的廣告影片起跑。\n何永生說,身為改變推動者的小勞勃道尼,發現以HTC這三個英文字母為首,能排列出各式各樣詞彙組合,將廣泛引起消費者的興趣與討論。因此廣告影片將會呈現HTC在英文字母中代表的無限可能,如巨型錫箔遊艇(Humongous Tinfoil Catamaran)、潮怪洗車(Hipster Troll Carwash)等充滿創意的多樣發想。" +} \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/README.md b/tests/models/Crawler/Libertytimes/data/README.md new file mode 100644 index 0000000..5142fdd --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/README.md @@ -0,0 +1,17 @@ +Libertytimes data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `1180585.html` + From: http://news.ltn.com.tw/news/business/breakingnews/1180585 + + - `20130813t3.html` + From: http://www.libertytimes.com.tw/2013/new/aug/13/today-t3.htm \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/listing.html b/tests/models/Crawler/Libertytimes/data/listing.html new file mode 100644 index 0000000..8fb7cda --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/listing.html @@ -0,0 +1,8470 @@ + + + + + + +即時新聞總覽 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + +
                    +
                    警方查賭場 170公分賭客躲衣櫥夾層
                    +

                    警方查賭場 170公分賭客躲衣櫥夾層[2014-12-13 15:39]

                    +

                    新北市一名34歲陳姓女子,3年多前與前夫離婚後,獨力扶養4個月大的幼子,為了貼補家用,陳女將三重區的住處出租給36歲的潘姓男子,做為職業賭場使用。警方接獲線報,今天凌晨5時許,派員至現場查緝,當場查獲...

                    +
                    +
                    + +
                    +
                    第一頁12345最後
                    +
                    +
                    熱門新聞
                    + +
                    + +
                    +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +焦點新聞總覽 - 報紙 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + + + +
                    第一頁1最後
                    + +
                    +
                    熱門新聞
                    + +
                    + +
                    +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    +
                    + + + + + + + + + + + + + + + + + +
                    « + +  »
                    +
                    + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +焦點 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    爆劉喬安援交 壹週刊被指派記者設局

                    +

                    媽媽桑嫖客 自家人喬裝《壹週刊》日前報導,指讀者爆料太陽花女王劉喬安是高檔援交妹,報導內容還有劉女赴飯店與嫖客碰面的清晰畫面及對話內容,有媒體昨指出,這是《壹週刊》找自家女記者、男狗仔,分別喬裝媽媽桑...

                    +
                    + + + + + + + + +
                    +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +政治 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    陳德銘明拜會證嚴法師 行程低調不公開

                    +

                    來台訪問的中國海協會會長陳德銘,今天抵達屏東訪問,明天則將到台南靜思堂拜會證嚴法師,但陳德銘對此行程相當低調,並未開放媒體採訪。根據海基會發出的最新行程,陳德銘在明天上午將到位在屏東的大成桐德牧場參觀...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +社會 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    警方查賭場 170公分賭客躲衣櫥夾層

                    +

                    新北市一名34歲陳姓女子,3年多前與前夫離婚後,獨力扶養4個月大的幼子,為了貼補家用,陳女將三重區的住處出租給36歲的潘姓男子,做為職業賭場使用。警方接獲線報,今天凌晨5時許,派員至現場查緝,當場查獲...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +地方 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + + + + + + + + + + + +
                    +
                    中部‧本日最多瀏覽
                    + +
                    買票被收押 嘉義首宗里長當選人起訴 +

                    嘉義地檢署偵辦今年選舉的嘉義地區賄選案,昨天偵結首宗當選人起訴案。嘉市東區連任的許姓里長,選前涉嫌以一票一千元向樁腳、選民買票,幫助他及另一名連任市議員當選,檢方昨起訴許姓里長及涉案六名樁腳、選民,緩…

                    +
                    + +
                    + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +生活 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    太陽花女王值得業務學習? 網友整理5大優點

                    +

                    在太陽花學運中因外表姣好而一夕爆紅,被稱為「太陽花女王」的劉喬安,近日遭爆料是高檔援交妹,負面風波越演越烈,網路上各有支持和反對的聲浪,而有網友趁著這起事件,整理出劉喬安讓人敬佩的五大理由。網友指出,...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +言論 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    柯P翻臉像翻書?

                    +

                    柯文哲日前拋出北宜直鐵想法,引起正反方討論,柯辦政策總監張景森則表明支持這項看法,直言「環團屬宗教團體」,筆者看到這裡,不禁想起幾天前劉克襄老師的感嘆來。基於對改革的盼望,對創新的渴求,台北市民們用選...

                    +
                    + + +
                    +
                    自由共和國
                    + +
                    顏厥安/從公民社會到公民共和 +

                    顏厥安/台大法律系教授、台灣守護民主平台監事本次大選結果出爐後,不少人高喊公民力量勝利,號稱由公民社會支持的第三勢力也呼之欲出。但由種種選後情狀來看,也許公民力量並未勝出,僅是有所突破。兩大黨的勢力固…

                    +
                    + +
                    + +
                    +
                    言論‧本日最多瀏覽
                    +
                    苗栗縣黨部生什麼氣? +

                    在九合一大選中,消失的民進黨苗栗縣黨部,終於在最近出現並且躍升熱門焦點。 暫且不論民進黨苗栗縣黨部面對陳為廷參選一事的反應,我們回頭看此次苗栗縣的選舉結果。首先,從縣長選舉來看,儘管參選人數爆炸、國民…

                    +
                    + +
                    + + + + +
                    + + + +
                    +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +國際 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    達賴想見教宗 卻遭「與中國間關係微妙」為由拒絕

                    +

                    現正訪問羅馬參加會議的達賴喇嘛想見教宗,卻遭教宗以「與中國間關係微妙」為由拒絕,梵蒂岡發言人表示,儘管教宗對達賴抱持「高度尊敬」,但不會和任何一位和平獎得主會面。達賴喇嘛12日抵達羅馬參加諾貝爾和平獎...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +財經 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    中、韓資訊關稅談判無共識 ITA宣告破局

                    +

                    本週世界貿易組織(WTO),在瑞士日內瓦針對《資訊科技協定》(Information Technology Agreement,ITA)進行談判,但中國拒絕南韓要求取消平板電腦顯示器的關稅,談判宣告破...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +體育 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    黑曼巴紀錄片預告曝光 Kobe難得感性含淚

                    +

                    NBA洛杉磯湖人隊一哥Kobe Bryant,今日在個人推特上公布了他的個人紀錄片《Kobe的沉思》(Kobe Bryant’s Muse)的最新預告片,片中Kobe難得感性,一度含淚盈眶,紀錄片預計...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +影視 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    法拉利姊歌手夢碎 《深蹲》10歌遭收回

                    +

                    法拉利姊(張婷婷)日前才爆出與好友「好娜姬」鬧翻,今好娜姬在臉書發文,表示將收回原本為法拉利姊打造的10首歌,讓法拉利姊的歌手夢就此夢碎。##法拉利姊%%https://www.facebook.co...

                    +
                    + + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +消費 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    全智賢黑白配 潮穿adidas Originals

                    +

                    姊最潮!全智賢本季加入adidas Originals形象代言人行列,不出意料,果然引發商品大缺貨;由她親身展演、品牌與英國新銳設計師Mary Katrantzou的聯名系列及其它新單品一上架就被「秒...

                    +
                    + + + + + + + + +
                    + + + +
                    + + + + +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + + + + + + +副刊 - 自由時報電子報 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + +
                    +
                    + + + +
                    +
                    + + + +
                    + +
                    + + + + +
                    +
                    + + + +
                    +
                    +
                    + + + +
                    +
                    圖
                    +

                    輕輕一瞬》咖啡時光

                    +

                    星期一的下午,我在東區的咖啡館內消磨時間,悠閒地品嘗咖啡,吃著美味可口的巧克力鬆餅。咖啡館的氣氛如此緩慢放鬆,窗外的人們則為著生活忙碌奔波。我看見送貨員搬運一箱箱的貨物,漂亮妹妹努力發送著廣告傳單,房...

                    +
                    + + +
                    + +
                    + + + + + + + +
                    +
                    + + + + + + + + +
                    + + + +
                    +
                    +
                    熱門新聞
                    + +
                    + +
                    + +
                    +
                    贊助商廣告
                    +
                    +
                    +
                    +
                    +
                    +
                    Top
                    +
                    +
                    +
                    + + + + +
                    Top
                    +
                    +
                    +
                    +
                    2014年12月13日‧星期六‧甲午年十月廿二日
                    +
                    + + + + + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Libertytimes/data/listing.json b/tests/models/Crawler/Libertytimes/data/listing.json new file mode 100644 index 0000000..bba7e19 --- /dev/null +++ b/tests/models/Crawler/Libertytimes/data/listing.json @@ -0,0 +1,454 @@ +[ + "http://news.ltn.com.tw/news/business/breakingnews/1180424", + "http://news.ltn.com.tw/news/business/breakingnews/1180426", + "http://news.ltn.com.tw/news/business/breakingnews/1180429", + "http://news.ltn.com.tw/news/business/breakingnews/1180474", + "http://news.ltn.com.tw/news/business/breakingnews/1180481", + "http://news.ltn.com.tw/news/business/breakingnews/1180483", + "http://news.ltn.com.tw/news/business/breakingnews/1180486", + "http://news.ltn.com.tw/news/business/breakingnews/1180489", + "http://news.ltn.com.tw/news/business/breakingnews/1180491", + "http://news.ltn.com.tw/news/business/breakingnews/1180513", + "http://news.ltn.com.tw/news/business/breakingnews/1180554", + "http://news.ltn.com.tw/news/business/breakingnews/1180568", + "http://news.ltn.com.tw/news/business/breakingnews/1180585", + "http://news.ltn.com.tw/news/business/breakingnews/1180627", + "http://news.ltn.com.tw/news/business/breakingnews/1180660", + "http://news.ltn.com.tw/news/business/paper/838646", + "http://news.ltn.com.tw/news/business/paper/838721", + "http://news.ltn.com.tw/news/business/paper/838722", + "http://news.ltn.com.tw/news/business/paper/838723", + "http://news.ltn.com.tw/news/business/paper/838724", + "http://news.ltn.com.tw/news/business/paper/838725", + "http://news.ltn.com.tw/news/business/paper/838726", + "http://news.ltn.com.tw/news/business/paper/838727", + "http://news.ltn.com.tw/news/business/paper/838728", + "http://news.ltn.com.tw/news/consumer/paper/838251", + "http://news.ltn.com.tw/news/consumer/paper/838252", + "http://news.ltn.com.tw/news/consumer/paper/838539", + "http://news.ltn.com.tw/news/consumer/paper/838540", + "http://news.ltn.com.tw/news/consumer/paper/838541", + "http://news.ltn.com.tw/news/consumer/paper/838542", + "http://news.ltn.com.tw/news/consumer/paper/838543", + "http://news.ltn.com.tw/news/consumer/paper/838544", + "http://news.ltn.com.tw/news/consumer/paper/838545", + "http://news.ltn.com.tw/news/consumer/paper/838546", + "http://news.ltn.com.tw/news/consumer/paper/838547", + "http://news.ltn.com.tw/news/consumer/paper/838548", + "http://news.ltn.com.tw/news/consumer/paper/838549", + "http://news.ltn.com.tw/news/consumer/paper/838698", + "http://news.ltn.com.tw/news/consumer/paper/838699", + "http://news.ltn.com.tw/news/consumer/paper/838700", + "http://news.ltn.com.tw/news/consumer/paper/838701", + "http://news.ltn.com.tw/news/consumer/paper/838702", + "http://news.ltn.com.tw/news/consumer/paper/838703", + "http://news.ltn.com.tw/news/consumer/paper/838704", + "http://news.ltn.com.tw/news/consumer/paper/838705", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1179117", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1179890", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180439", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180441", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180456", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180505", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180510", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180524", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180538", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180582", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180607", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180639", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180656", + "http://news.ltn.com.tw/news/entertainment/breakingnews/1180701", + "http://news.ltn.com.tw/news/entertainment/paper/838550", + "http://news.ltn.com.tw/news/entertainment/paper/838552", + "http://news.ltn.com.tw/news/entertainment/paper/838553", + "http://news.ltn.com.tw/news/entertainment/paper/838554", + "http://news.ltn.com.tw/news/entertainment/paper/838555", + "http://news.ltn.com.tw/news/entertainment/paper/838556", + "http://news.ltn.com.tw/news/entertainment/paper/838557", + "http://news.ltn.com.tw/news/entertainment/paper/838558", + "http://news.ltn.com.tw/news/entertainment/paper/838559", + "http://news.ltn.com.tw/news/entertainment/paper/838560", + "http://news.ltn.com.tw/news/entertainment/paper/838561", + "http://news.ltn.com.tw/news/entertainment/paper/838562", + "http://news.ltn.com.tw/news/entertainment/paper/838564", + "http://news.ltn.com.tw/news/entertainment/paper/838565", + "http://news.ltn.com.tw/news/entertainment/paper/838566", + "http://news.ltn.com.tw/news/entertainment/paper/838567", + "http://news.ltn.com.tw/news/entertainment/paper/838568", + "http://news.ltn.com.tw/news/entertainment/paper/838569", + "http://news.ltn.com.tw/news/entertainment/paper/838572", + "http://news.ltn.com.tw/news/entertainment/paper/838573", + "http://news.ltn.com.tw/news/entertainment/paper/838574", + "http://news.ltn.com.tw/news/entertainment/paper/838575", + "http://news.ltn.com.tw/news/focus/breakingnews/1180410", + "http://news.ltn.com.tw/news/focus/breakingnews/1180411", + "http://news.ltn.com.tw/news/focus/breakingnews/1180412", + "http://news.ltn.com.tw/news/focus/breakingnews/1180413", + "http://news.ltn.com.tw/news/focus/breakingnews/1180414", + "http://news.ltn.com.tw/news/focus/paper/838402", + "http://news.ltn.com.tw/news/focus/paper/838403", + "http://news.ltn.com.tw/news/focus/paper/838404", + "http://news.ltn.com.tw/news/focus/paper/838672", + "http://news.ltn.com.tw/news/focus/paper/838673", + "http://news.ltn.com.tw/news/focus/paper/838674", + "http://news.ltn.com.tw/news/focus/paper/838684", + "http://news.ltn.com.tw/news/focus/paper/838685", + "http://news.ltn.com.tw/news/focus/paper/838686", + "http://news.ltn.com.tw/news/focus/paper/838687", + "http://news.ltn.com.tw/news/focus/paper/838688", + "http://news.ltn.com.tw/news/focus/paper/838689", + "http://news.ltn.com.tw/news/focus/paper/838690", + "http://news.ltn.com.tw/news/focus/paper/838691", + "http://news.ltn.com.tw/news/focus/paper/838692", + "http://news.ltn.com.tw/news/focus/paper/838693", + "http://news.ltn.com.tw/news/focus/paper/838694", + "http://news.ltn.com.tw/news/focus/paper/838695", + "http://news.ltn.com.tw/news/focus/paper/838696", + "http://news.ltn.com.tw/news/focus/paper/838697", + "http://news.ltn.com.tw/news/life/breakingnews/1179463", + "http://news.ltn.com.tw/news/life/breakingnews/1180430", + "http://news.ltn.com.tw/news/life/breakingnews/1180476", + "http://news.ltn.com.tw/news/life/breakingnews/1180482", + "http://news.ltn.com.tw/news/life/breakingnews/1180511", + "http://news.ltn.com.tw/news/life/breakingnews/1180547", + "http://news.ltn.com.tw/news/life/breakingnews/1180548", + "http://news.ltn.com.tw/news/life/breakingnews/1180577", + "http://news.ltn.com.tw/news/life/breakingnews/1180586", + "http://news.ltn.com.tw/news/life/breakingnews/1180603", + "http://news.ltn.com.tw/news/life/breakingnews/1180610", + "http://news.ltn.com.tw/news/life/breakingnews/1180624", + "http://news.ltn.com.tw/news/life/breakingnews/1180644", + "http://news.ltn.com.tw/news/life/breakingnews/1180645", + "http://news.ltn.com.tw/news/life/breakingnews/1180664", + "http://news.ltn.com.tw/news/life/paper/838500", + "http://news.ltn.com.tw/news/life/paper/838502", + "http://news.ltn.com.tw/news/life/paper/838503", + "http://news.ltn.com.tw/news/life/paper/838504", + "http://news.ltn.com.tw/news/life/paper/838505", + "http://news.ltn.com.tw/news/life/paper/838506", + "http://news.ltn.com.tw/news/life/paper/838507", + "http://news.ltn.com.tw/news/life/paper/838508", + "http://news.ltn.com.tw/news/life/paper/838509", + "http://news.ltn.com.tw/news/life/paper/838510", + "http://news.ltn.com.tw/news/life/paper/838754", + "http://news.ltn.com.tw/news/life/paper/838755", + "http://news.ltn.com.tw/news/life/paper/838756", + "http://news.ltn.com.tw/news/life/paper/838757", + "http://news.ltn.com.tw/news/life/paper/838758", + "http://news.ltn.com.tw/news/life/paper/838759", + "http://news.ltn.com.tw/news/life/paper/838760", + "http://news.ltn.com.tw/news/local/paper/838585", + "http://news.ltn.com.tw/news/local/paper/838586", + "http://news.ltn.com.tw/news/local/paper/838587", + "http://news.ltn.com.tw/news/local/paper/838588", + "http://news.ltn.com.tw/news/local/paper/838589", + "http://news.ltn.com.tw/news/local/paper/838590", + "http://news.ltn.com.tw/news/local/paper/838591", + "http://news.ltn.com.tw/news/local/paper/838592", + "http://news.ltn.com.tw/news/local/paper/838593", + "http://news.ltn.com.tw/news/local/paper/838594", + "http://news.ltn.com.tw/news/local/paper/838596", + "http://news.ltn.com.tw/news/local/paper/838597", + "http://news.ltn.com.tw/news/local/paper/838598", + "http://news.ltn.com.tw/news/local/paper/838599", + "http://news.ltn.com.tw/news/local/paper/838600", + "http://news.ltn.com.tw/news/local/paper/838601", + "http://news.ltn.com.tw/news/local/paper/838602", + "http://news.ltn.com.tw/news/local/paper/838604", + "http://news.ltn.com.tw/news/local/paper/838605", + "http://news.ltn.com.tw/news/local/paper/838606", + "http://news.ltn.com.tw/news/local/paper/838607", + "http://news.ltn.com.tw/news/local/paper/838608", + "http://news.ltn.com.tw/news/local/paper/838609", + "http://news.ltn.com.tw/news/local/paper/838610", + "http://news.ltn.com.tw/news/local/paper/838611", + "http://news.ltn.com.tw/news/local/paper/838612", + "http://news.ltn.com.tw/news/local/paper/838621", + "http://news.ltn.com.tw/news/local/paper/838622", + "http://news.ltn.com.tw/news/local/paper/838623", + "http://news.ltn.com.tw/news/local/paper/838624", + "http://news.ltn.com.tw/news/local/paper/838625", + "http://news.ltn.com.tw/news/local/paper/838626", + "http://news.ltn.com.tw/news/local/paper/838627", + "http://news.ltn.com.tw/news/local/paper/838628", + "http://news.ltn.com.tw/news/local/paper/838629", + "http://news.ltn.com.tw/news/local/paper/838630", + "http://news.ltn.com.tw/news/local/paper/838631", + "http://news.ltn.com.tw/news/local/paper/838632", + "http://news.ltn.com.tw/news/local/paper/838633", + "http://news.ltn.com.tw/news/local/paper/838634", + "http://news.ltn.com.tw/news/local/paper/838635", + "http://news.ltn.com.tw/news/local/paper/838636", + "http://news.ltn.com.tw/news/local/paper/838637", + "http://news.ltn.com.tw/news/local/paper/838638", + "http://news.ltn.com.tw/news/local/paper/838639", + "http://news.ltn.com.tw/news/local/paper/838640", + "http://news.ltn.com.tw/news/local/paper/838642", + "http://news.ltn.com.tw/news/local/paper/838643", + "http://news.ltn.com.tw/news/local/paper/838644", + "http://news.ltn.com.tw/news/local/paper/838645", + "http://news.ltn.com.tw/news/local/paper/838706", + "http://news.ltn.com.tw/news/local/paper/838707", + "http://news.ltn.com.tw/news/local/paper/838708", + "http://news.ltn.com.tw/news/local/paper/838710", + "http://news.ltn.com.tw/news/local/paper/838711", + "http://news.ltn.com.tw/news/local/paper/838712", + "http://news.ltn.com.tw/news/local/paper/838713", + "http://news.ltn.com.tw/news/local/paper/838714", + "http://news.ltn.com.tw/news/local/paper/838715", + "http://news.ltn.com.tw/news/local/paper/838716", + "http://news.ltn.com.tw/news/local/paper/838717", + "http://news.ltn.com.tw/news/local/paper/838718", + "http://news.ltn.com.tw/news/local/paper/838719", + "http://news.ltn.com.tw/news/local/paper/838729", + "http://news.ltn.com.tw/news/local/paper/838730", + "http://news.ltn.com.tw/news/local/paper/838731", + "http://news.ltn.com.tw/news/local/paper/838732", + "http://news.ltn.com.tw/news/local/paper/838733", + "http://news.ltn.com.tw/news/local/paper/838734", + "http://news.ltn.com.tw/news/local/paper/838736", + "http://news.ltn.com.tw/news/local/paper/838737", + "http://news.ltn.com.tw/news/local/paper/838738", + "http://news.ltn.com.tw/news/local/paper/838739", + "http://news.ltn.com.tw/news/local/paper/838740", + "http://news.ltn.com.tw/news/local/paper/838741", + "http://news.ltn.com.tw/news/local/paper/838743", + "http://news.ltn.com.tw/news/local/paper/838744", + "http://news.ltn.com.tw/news/local/paper/838745", + "http://news.ltn.com.tw/news/local/paper/838746", + "http://news.ltn.com.tw/news/local/paper/838747", + "http://news.ltn.com.tw/news/local/paper/838748", + "http://news.ltn.com.tw/news/local/paper/838749", + "http://news.ltn.com.tw/news/local/paper/838750", + "http://news.ltn.com.tw/news/local/paper/838751", + "http://news.ltn.com.tw/news/local/paper/838752", + "http://news.ltn.com.tw/news/opinion/paper/833076", + "http://news.ltn.com.tw/news/opinion/paper/833077", + "http://news.ltn.com.tw/news/opinion/paper/833078", + "http://news.ltn.com.tw/news/opinion/paper/833079", + "http://news.ltn.com.tw/news/opinion/paper/835206", + "http://news.ltn.com.tw/news/opinion/paper/835207", + "http://news.ltn.com.tw/news/opinion/paper/835208", + "http://news.ltn.com.tw/news/opinion/paper/835209", + "http://news.ltn.com.tw/news/opinion/paper/837240", + "http://news.ltn.com.tw/news/opinion/paper/837241", + "http://news.ltn.com.tw/news/opinion/paper/837242", + "http://news.ltn.com.tw/news/opinion/paper/837243", + "http://news.ltn.com.tw/news/opinion/paper/838373", + "http://news.ltn.com.tw/news/opinion/paper/838405", + "http://news.ltn.com.tw/news/opinion/paper/838406", + "http://news.ltn.com.tw/news/opinion/paper/838407", + "http://news.ltn.com.tw/news/opinion/paper/838408", + "http://news.ltn.com.tw/news/opinion/paper/838409", + "http://news.ltn.com.tw/news/opinion/paper/838410", + "http://news.ltn.com.tw/news/opinion/paper/838411", + "http://news.ltn.com.tw/news/opinion/paper/838412", + "http://news.ltn.com.tw/news/opinion/paper/838413", + "http://news.ltn.com.tw/news/opinion/paper/838492", + "http://news.ltn.com.tw/news/opinion/paper/838675", + "http://news.ltn.com.tw/news/opinion/paper/838676", + "http://news.ltn.com.tw/news/opinion/paper/838677", + "http://news.ltn.com.tw/news/opinion/paper/838678", + "http://news.ltn.com.tw/news/opinion/paper/838679", + "http://news.ltn.com.tw/news/opinion/paper/838680", + "http://news.ltn.com.tw/news/opinion/paper/838681", + "http://news.ltn.com.tw/news/opinion/paper/838682", + "http://news.ltn.com.tw/news/opinion/paper/838720", + "http://news.ltn.com.tw/news/opinion/paper/838753", + "http://news.ltn.com.tw/news/politics/breakingnews/1179251", + "http://news.ltn.com.tw/news/politics/breakingnews/1179289", + "http://news.ltn.com.tw/news/politics/breakingnews/1180431", + "http://news.ltn.com.tw/news/politics/breakingnews/1180436", + "http://news.ltn.com.tw/news/politics/breakingnews/1180440", + "http://news.ltn.com.tw/news/politics/breakingnews/1180457", + "http://news.ltn.com.tw/news/politics/breakingnews/1180459", + "http://news.ltn.com.tw/news/politics/breakingnews/1180506", + "http://news.ltn.com.tw/news/politics/breakingnews/1180540", + "http://news.ltn.com.tw/news/politics/breakingnews/1180549", + "http://news.ltn.com.tw/news/politics/breakingnews/1180561", + "http://news.ltn.com.tw/news/politics/breakingnews/1180562", + "http://news.ltn.com.tw/news/politics/breakingnews/1180590", + "http://news.ltn.com.tw/news/politics/breakingnews/1180640", + "http://news.ltn.com.tw/news/politics/breakingnews/1180652", + "http://news.ltn.com.tw/news/politics/breakingnews/1180654", + "http://news.ltn.com.tw/news/politics/breakingnews/1180693", + "http://news.ltn.com.tw/news/politics/breakingnews/1180694", + "http://news.ltn.com.tw/news/politics/paper/838656", + "http://news.ltn.com.tw/news/politics/paper/838657", + "http://news.ltn.com.tw/news/politics/paper/838658", + "http://news.ltn.com.tw/news/politics/paper/838659", + "http://news.ltn.com.tw/news/politics/paper/838660", + "http://news.ltn.com.tw/news/politics/paper/838661", + "http://news.ltn.com.tw/news/politics/paper/838662", + "http://news.ltn.com.tw/news/politics/paper/838663", + "http://news.ltn.com.tw/news/politics/paper/838664", + "http://news.ltn.com.tw/news/politics/paper/838665", + "http://news.ltn.com.tw/news/politics/paper/838666", + "http://news.ltn.com.tw/news/politics/paper/838667", + "http://news.ltn.com.tw/news/politics/paper/838668", + "http://news.ltn.com.tw/news/politics/paper/838669", + "http://news.ltn.com.tw/news/politics/paper/838670", + "http://news.ltn.com.tw/news/politics/paper/838671", + "http://news.ltn.com.tw/news/society/breakingnews/1180425", + "http://news.ltn.com.tw/news/society/breakingnews/1180428", + "http://news.ltn.com.tw/news/society/breakingnews/1180434", + "http://news.ltn.com.tw/news/society/breakingnews/1180501", + "http://news.ltn.com.tw/news/society/breakingnews/1180523", + "http://news.ltn.com.tw/news/society/breakingnews/1180537", + "http://news.ltn.com.tw/news/society/breakingnews/1180546", + "http://news.ltn.com.tw/news/society/breakingnews/1180578", + "http://news.ltn.com.tw/news/society/breakingnews/1180579", + "http://news.ltn.com.tw/news/society/breakingnews/1180580", + "http://news.ltn.com.tw/news/society/breakingnews/1180589", + "http://news.ltn.com.tw/news/society/breakingnews/1180608", + "http://news.ltn.com.tw/news/society/breakingnews/1180609", + "http://news.ltn.com.tw/news/society/breakingnews/1180618", + "http://news.ltn.com.tw/news/society/breakingnews/1180626", + "http://news.ltn.com.tw/news/society/breakingnews/1180638", + "http://news.ltn.com.tw/news/society/breakingnews/1180658", + "http://news.ltn.com.tw/news/society/breakingnews/1180677", + "http://news.ltn.com.tw/news/society/breakingnews/1180679", + "http://news.ltn.com.tw/news/society/breakingnews/1180680", + "http://news.ltn.com.tw/news/society/breakingnews/1180682", + "http://news.ltn.com.tw/news/society/breakingnews/1180688", + "http://news.ltn.com.tw/news/society/breakingnews/1180695", + "http://news.ltn.com.tw/news/society/breakingnews/1180696", + "http://news.ltn.com.tw/news/society/paper/838647", + "http://news.ltn.com.tw/news/society/paper/838648", + "http://news.ltn.com.tw/news/society/paper/838649", + "http://news.ltn.com.tw/news/society/paper/838650", + "http://news.ltn.com.tw/news/society/paper/838651", + "http://news.ltn.com.tw/news/society/paper/838652", + "http://news.ltn.com.tw/news/society/paper/838653", + "http://news.ltn.com.tw/news/society/paper/838654", + "http://news.ltn.com.tw/news/society/paper/838655", + "http://news.ltn.com.tw/news/sports/breakingnews/1180422", + "http://news.ltn.com.tw/news/sports/breakingnews/1180477", + "http://news.ltn.com.tw/news/sports/breakingnews/1180492", + "http://news.ltn.com.tw/news/sports/breakingnews/1180500", + "http://news.ltn.com.tw/news/sports/breakingnews/1180522", + "http://news.ltn.com.tw/news/sports/breakingnews/1180574", + "http://news.ltn.com.tw/news/sports/breakingnews/1180581", + "http://news.ltn.com.tw/news/sports/breakingnews/1180601", + "http://news.ltn.com.tw/news/sports/breakingnews/1180637", + "http://news.ltn.com.tw/news/sports/breakingnews/1180655", + "http://news.ltn.com.tw/news/sports/breakingnews/1180678", + "http://news.ltn.com.tw/news/sports/paper/838511", + "http://news.ltn.com.tw/news/sports/paper/838512", + "http://news.ltn.com.tw/news/sports/paper/838513", + "http://news.ltn.com.tw/news/sports/paper/838514", + "http://news.ltn.com.tw/news/sports/paper/838516", + "http://news.ltn.com.tw/news/sports/paper/838517", + "http://news.ltn.com.tw/news/sports/paper/838518", + "http://news.ltn.com.tw/news/sports/paper/838519", + "http://news.ltn.com.tw/news/sports/paper/838520", + "http://news.ltn.com.tw/news/sports/paper/838522", + "http://news.ltn.com.tw/news/sports/paper/838523", + "http://news.ltn.com.tw/news/sports/paper/838524", + "http://news.ltn.com.tw/news/sports/paper/838525", + "http://news.ltn.com.tw/news/sports/paper/838526", + "http://news.ltn.com.tw/news/sports/paper/838527", + "http://news.ltn.com.tw/news/sports/paper/838528", + "http://news.ltn.com.tw/news/sports/paper/838529", + "http://news.ltn.com.tw/news/sports/paper/838530", + "http://news.ltn.com.tw/news/sports/paper/838531", + "http://news.ltn.com.tw/news/sports/paper/838532", + "http://news.ltn.com.tw/news/sports/paper/838533", + "http://news.ltn.com.tw/news/sports/paper/838534", + "http://news.ltn.com.tw/news/sports/paper/838535", + "http://news.ltn.com.tw/news/sports/paper/838536", + "http://news.ltn.com.tw/news/sports/paper/838537", + "http://news.ltn.com.tw/news/sports/paper/838538", + "http://news.ltn.com.tw/news/supplement/paper/837295", + "http://news.ltn.com.tw/news/supplement/paper/837296", + "http://news.ltn.com.tw/news/supplement/paper/837297", + "http://news.ltn.com.tw/news/supplement/paper/837298", + "http://news.ltn.com.tw/news/supplement/paper/837299", + "http://news.ltn.com.tw/news/supplement/paper/837300", + "http://news.ltn.com.tw/news/supplement/paper/837318", + "http://news.ltn.com.tw/news/supplement/paper/837436", + "http://news.ltn.com.tw/news/supplement/paper/837437", + "http://news.ltn.com.tw/news/supplement/paper/837438", + "http://news.ltn.com.tw/news/supplement/paper/837534", + "http://news.ltn.com.tw/news/supplement/paper/837535", + "http://news.ltn.com.tw/news/supplement/paper/837536", + "http://news.ltn.com.tw/news/supplement/paper/837562", + "http://news.ltn.com.tw/news/supplement/paper/837568", + "http://news.ltn.com.tw/news/supplement/paper/837569", + "http://news.ltn.com.tw/news/supplement/paper/837570", + "http://news.ltn.com.tw/news/supplement/paper/837571", + "http://news.ltn.com.tw/news/supplement/paper/837572", + "http://news.ltn.com.tw/news/supplement/paper/837573", + "http://news.ltn.com.tw/news/supplement/paper/837602", + "http://news.ltn.com.tw/news/supplement/paper/837603", + "http://news.ltn.com.tw/news/supplement/paper/837604", + "http://news.ltn.com.tw/news/supplement/paper/837605", + "http://news.ltn.com.tw/news/supplement/paper/837606", + "http://news.ltn.com.tw/news/supplement/paper/837731", + "http://news.ltn.com.tw/news/supplement/paper/837732", + "http://news.ltn.com.tw/news/supplement/paper/837733", + "http://news.ltn.com.tw/news/supplement/paper/837734", + "http://news.ltn.com.tw/news/supplement/paper/837735", + "http://news.ltn.com.tw/news/supplement/paper/837841", + "http://news.ltn.com.tw/news/supplement/paper/837842", + "http://news.ltn.com.tw/news/supplement/paper/837843", + "http://news.ltn.com.tw/news/supplement/paper/837844", + "http://news.ltn.com.tw/news/supplement/paper/837845", + "http://news.ltn.com.tw/news/supplement/paper/837867", + "http://news.ltn.com.tw/news/supplement/paper/837868", + "http://news.ltn.com.tw/news/supplement/paper/837869", + "http://news.ltn.com.tw/news/supplement/paper/837870", + "http://news.ltn.com.tw/news/supplement/paper/837871", + "http://news.ltn.com.tw/news/supplement/paper/837872", + "http://news.ltn.com.tw/news/supplement/paper/837873", + "http://news.ltn.com.tw/news/supplement/paper/837874", + "http://news.ltn.com.tw/news/supplement/paper/837875", + "http://news.ltn.com.tw/news/supplement/paper/837876", + "http://news.ltn.com.tw/news/supplement/paper/837899", + "http://news.ltn.com.tw/news/supplement/paper/837900", + "http://news.ltn.com.tw/news/supplement/paper/838167", + "http://news.ltn.com.tw/news/supplement/paper/838300", + "http://news.ltn.com.tw/news/supplement/paper/838301", + "http://news.ltn.com.tw/news/supplement/paper/838302", + "http://news.ltn.com.tw/news/supplement/paper/838303", + "http://news.ltn.com.tw/news/supplement/paper/838304", + "http://news.ltn.com.tw/news/supplement/paper/838305", + "http://news.ltn.com.tw/news/supplement/paper/838576", + "http://news.ltn.com.tw/news/supplement/paper/838577", + "http://news.ltn.com.tw/news/supplement/paper/838578", + "http://news.ltn.com.tw/news/supplement/paper/838579", + "http://news.ltn.com.tw/news/supplement/paper/838580", + "http://news.ltn.com.tw/news/supplement/paper/838581", + "http://news.ltn.com.tw/news/supplement/paper/838582", + "http://news.ltn.com.tw/news/supplement/paper/838583", + "http://news.ltn.com.tw/news/supplement/paper/838584", + "http://news.ltn.com.tw/news/world/breakingnews/1180418", + "http://news.ltn.com.tw/news/world/breakingnews/1180419", + "http://news.ltn.com.tw/news/world/breakingnews/1180420", + "http://news.ltn.com.tw/news/world/breakingnews/1180423", + "http://news.ltn.com.tw/news/world/breakingnews/1180427", + "http://news.ltn.com.tw/news/world/breakingnews/1180458", + "http://news.ltn.com.tw/news/world/breakingnews/1180461", + "http://news.ltn.com.tw/news/world/breakingnews/1180466", + "http://news.ltn.com.tw/news/world/breakingnews/1180467", + "http://news.ltn.com.tw/news/world/breakingnews/1180469", + "http://news.ltn.com.tw/news/world/breakingnews/1180470", + "http://news.ltn.com.tw/news/world/breakingnews/1180475", + "http://news.ltn.com.tw/news/world/breakingnews/1180490", + "http://news.ltn.com.tw/news/world/breakingnews/1180493", + "http://news.ltn.com.tw/news/world/breakingnews/1180497", + "http://news.ltn.com.tw/news/world/breakingnews/1180499", + "http://news.ltn.com.tw/news/world/breakingnews/1180507", + "http://news.ltn.com.tw/news/world/breakingnews/1180555", + "http://news.ltn.com.tw/news/world/breakingnews/1180636", + "http://news.ltn.com.tw/news/world/breakingnews/1180648", + "http://news.ltn.com.tw/news/world/breakingnews/1180659", + "http://news.ltn.com.tw/news/world/breakingnews/1180662", + "http://news.ltn.com.tw/news/world/breakingnews/1180681", + "http://news.ltn.com.tw/news/world/paper/838613", + "http://news.ltn.com.tw/news/world/paper/838614", + "http://news.ltn.com.tw/news/world/paper/838615", + "http://news.ltn.com.tw/news/world/paper/838616", + "http://news.ltn.com.tw/news/world/paper/838617", + "http://news.ltn.com.tw/news/world/paper/838619" +] \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/Crawl.test b/tests/models/Crawler/Newtalk/Crawl.test new file mode 100644 index 0000000..bb13cee --- /dev/null +++ b/tests/models/Crawler/Newtalk/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Newtalk::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Newtalk::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/Parse.test b/tests/models/Crawler/Newtalk/Parse.test new file mode 100644 index 0000000..0b2a30e --- /dev/null +++ b/tests/models/Crawler/Newtalk/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_Newtalk::parse (52850.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/52850.html'); + $result = Crawler_Newtalk::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/52850.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/data/52850.html b/tests/models/Crawler/Newtalk/data/52850.html new file mode 100644 index 0000000..59204ba --- /dev/null +++ b/tests/models/Crawler/Newtalk/data/52850.html @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + +高雄電影節開幕 日星為氣爆災區祈福 - 新頭殼 newtalk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + +
                    + + + + + + + + + + + + + +
                    +
                    +
                    +
                    + + 2014經濟人權指標下滑 民團指稅制不公
                    + 總統府人權諮詢委員會副召集人柴松林針對經濟人權指標下降表示,其中很重要的原因就是稅制 + ......more +
                    + +
                    +
                    +
                    +
                    + + + + + + + +
                    + +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + +
                    + + +
                    + + + + + + + + + + + + + Apycom jQuery Menus + +
                    + + + + +
                    + + + +
                    + +
                    + + + +
                    + +
                    現在位置: + + 首頁 + \ + 要聞 + \ + 藝文 + +
                    + + +
                    + + + +
                    +
                    + + 轉寄好友 +  |  + + 友善列印 + + + +
                    + + +
                    + + +
                    + + +
                    + + +
                    + +
                    + + + + +
                    + +
                    點擊圖片可瀏覽相關圖片
                    +
                    + 2014高雄電影節今(24)日開幕,「真幌站前多田便利屋2」導演大森、日星瑛太,「愛琳娜」導演林靖傑、男女主角莊凱勛、陳怡蓉,戴立忍、柯叔元、黃鐙輝及「逆轉勝」女主角黃姵嘉等受邀出席。圖:高雄市政府提供 +
                    + +
                    + + + + + + + + +
                    +
                    +
                    + +
                    + 新頭殼newtalk2014.10.24 金名/高雄報導
                    +
                    +2014高雄電影節今(24)日在大東藝術文化中心開幕,「愛琳娜」、「逆轉勝」、「真幌站前多田便利屋2」等片導演劇組受邀出席,主演「多田便利屋2」的導演大森立嗣及日本個性男星瑛太首度來台, 2人特別準備了「祈福御守」獻給高雄市長陳菊,希望為高雄氣爆的罹難者及家屬們祈福。
                    +
                    +陳菊感謝瑛太與大森對高雄獻上祈福御守。她說,瑛太與大森兩人之前聽聞高雄發生氣爆事件,深感不捨,這次一獲主辦方邀約馬上點頭答應,想對曾援助日本311震災的台灣致意。
                    +
                    +陳菊表示,高雄電影節經過14年的努力與推動,成為亞洲第二大國際短片競賽與南台灣第一大的影展,並與日、德、美、法等國相互合作,今年有來自66個國家、3000部作品報名參賽,經過嚴選100部競賽入圍與觀摩影片,讓影迷能一睹世界級影展的得獎作品。
                    +
                    +她說,高雄是發展影音產業的友善城市,除了成立拍片支援中心,提供單一窗口的行政協助、補助拍攝劇組住宿費用外,更首創「雄影雲端戲院」APP,創造全新的影像市場,歡迎更多從事電影相關產業的人才到高雄發展。
                    +
                    +「真幌站前多田便利屋2」上周才在日本上映,這次被選為2014高雄電影節開幕片,大森和瑛太都表示非常開心。看起來十分害羞的瑛太,一開場就秀台語說:「高雄你好!」接著用中文自我介紹說:「我是瑛太,很高興來到高雄!」。
                    +
                    +與「真幌站前多田便利屋2」同被選為今年開幕片的台片「愛琳娜」廣告劇組,則由導演林靖傑領軍,包括女主角陳怡蓉和男主角莊凱勛都現身,戴立忍、柯叔元和黃鐙輝在電影中飾演陳怡蓉的哥哥們,今天也來到現場與影迷相見歡。
                    +
                    +高雄電影節從即日起到11月9日舉行,閉幕片「逆轉勝」今天由女主角黃姵嘉代表出席,該片在高雄電影節開放售票時10分鐘內秒殺,「五月天」怪獸在電影中草根性十足,與黃姵嘉的火花也很讓人期待。 +
                    + + +
                    + +
                    + + + + +
                    + 發表意見 + (0) + + + +
                    + + +
                    + + + + + + +
                    + +
                    +
                    + + + +
                    +
                    + + +
                    +
                    +
                    + 目前沒有發表意見!! +
                    +
                    + + +
                    + +
                    + + + +
                    + + +
                    + + + + + + +
                    +
                    + +
                    + +
                    + + + + + + + + + +
                    +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    陳忠義
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    盧燕俐
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    +
                    +
                    + + + + + + + +
                    +
                    + + + + + + +
                    +
                    + + + + + + + + + + + + + + + +
                    + +
                    + + + + + + +
                    + +
                    + +
                    + + +
                    +
                    +
                    + + +
                    + + + +
                    +
                    +
                    + + +
                    + + + + + + + +
                    + +
                    + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/data/52850.json b/tests/models/Crawler/Newtalk/data/52850.json new file mode 100644 index 0000000..0b63bf1 --- /dev/null +++ b/tests/models/Crawler/Newtalk/data/52850.json @@ -0,0 +1,4 @@ +{ + "title": "高雄電影節開幕 日星為氣爆災區祈福", + "body": "新頭殼newtalk2014.10.24 金名/高雄報導\n\n\r\n2014高雄電影節今(24)日在大東藝術文化中心開幕,「愛琳娜」、「逆轉勝」、「真幌站前多田便利屋2」等片導演劇組受邀出席,主演「多田便利屋2」的導演大森立嗣及日本個性男星瑛太首度來台, 2人特別準備了「祈福御守」獻給高雄市長陳菊,希望為高雄氣爆的罹難者及家屬們祈福。\n\n\r\n陳菊感謝瑛太與大森對高雄獻上祈福御守。她說,瑛太與大森兩人之前聽聞高雄發生氣爆事件,深感不捨,這次一獲主辦方邀約馬上點頭答應,想對曾援助日本311震災的台灣致意。\n\n\r\n陳菊表示,高雄電影節經過14年的努力與推動,成為亞洲第二大國際短片競賽與南台灣第一大的影展,並與日、德、美、法等國相互合作,今年有來自66個國家、3000部作品報名參賽,經過嚴選100部競賽入圍與觀摩影片,讓影迷能一睹世界級影展的得獎作品。\n\n\r\n她說,高雄是發展影音產業的友善城市,除了成立拍片支援中心,提供單一窗口的行政協助、補助拍攝劇組住宿費用外,更首創「雄影雲端戲院」APP,創造全新的影像市場,歡迎更多從事電影相關產業的人才到高雄發展。\n\n\r\n「真幌站前多田便利屋2」上周才在日本上映,這次被選為2014高雄電影節開幕片,大森和瑛太都表示非常開心。看起來十分害羞的瑛太,一開場就秀台語說:「高雄你好!」接著用中文自我介紹說:「我是瑛太,很高興來到高雄!」。\n\n\r\n與「真幌站前多田便利屋2」同被選為今年開幕片的台片「愛琳娜」廣告劇組,則由導演林靖傑領軍,包括女主角陳怡蓉和男主角莊凱勛都現身,戴立忍、柯叔元和黃鐙輝在電影中飾演陳怡蓉的哥哥們,今天也來到現場與影迷相見歡。\n\n\r\n高雄電影節從即日起到11月9日舉行,閉幕片「逆轉勝」今天由女主角黃姵嘉代表出席,該片在高雄電影節開放售票時10分鐘內秒殺,「五月天」怪獸在電影中草根性十足,與黃姵嘉的火花也很讓人期待。" +} \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/data/README.md b/tests/models/Crawler/Newtalk/data/README.md new file mode 100644 index 0000000..17d411e --- /dev/null +++ b/tests/models/Crawler/Newtalk/data/README.md @@ -0,0 +1,14 @@ +Newtalk data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `52850.html` + From: http://newtalk.tw/news/2014/10/24/52850.html \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/data/listing.html b/tests/models/Crawler/Newtalk/data/listing.html new file mode 100644 index 0000000..3c4bee0 --- /dev/null +++ b/tests/models/Crawler/Newtalk/data/listing.html @@ -0,0 +1,3973 @@ + + + + + + + + + + + + + + + + + + +一個有思考力的獨立媒體 新頭殼 newtalk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                    +
                    + + +
                    + + + + + + + + + + + + + +
                    +
                    +
                    +
                    + + 2014經濟人權指標下滑 民團指稅制不公
                    + 總統府人權諮詢委員會副召集人柴松林針對經濟人權指標下降表示,其中很重要的原因就是稅制 + ......more +
                    + +
                    +
                    +
                    +
                    + + + + + + + +
                    + +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + +
                    + + +
                    + + + + + + + + + + + + + Apycom jQuery Menus + +
                    + + + + + + + + + +
                    + + + +
                    + +
                    + + + +
                    + +
                    現在位置: + + 首頁 + +
                    + + +
                    + + + + +
                    +
                    + +
                    +
                    +
                    +
                    +
                    + +
                    + + +
                    + +
                    + +
                    + +
                    + +
                    +
                    + 新北市長朱立倫昨天宣布參選國民黨主席後,台北市長郝龍斌和台中市長胡志強隨後都表明不選了。而台北市議員李新今(13)天也宣布退選,截至目前為止,唯一有資格參選的黨主席候選人只剩朱立倫,形成同額競選的局面 + ......more +
                    + +
                    +
                    +
                    + + + + + + + + + + + + +
                    +
                    +
                    + + +
                    + + 陳水扁保外就醫抗告 今再遭高院裁定駁回
                    + 前總統陳水扁今年6月向法務部矯正署申請保外就醫遭駁回,扁不服而親筆寫訴狀向台北地院聲明異議也遭駁回,再向高等法院提聲明異議及抗告,但高院昨天指出,該案屬司法行政處分性質,應打行政訴訟尋求救濟,昨天將陳...more
                    + + + + + +
                    +
                    +
                    + + +
                    + + 港被捕者陸續獲釋 何韻詩:榮幸、畢生難忘
                    + 香港民眾「佔中」爭取普選75天後於昨天落幕,警方在清場過程中逮捕247人,被捕人士今(12)日上午陸續獲釋,包括學生領袖周永康、壹傳媒主席黎智英及藝人何韻詩。周永康表示,往後會發起更大規模的群眾運動;...more
                    + + + + + +
                    +
                    +
                    + + +
                    + + 吳志揚談航空城 「不能反對就買帳」
                    + 桃園縣長吳志揚在首屆桃園市長選舉中,意外敗給民進黨提名的鄭文燦,外界認為與他所推動的桃園航空城引發重大爭議有關,但吳志揚今(2)日反駁,稱航空城是對國家有利,但「不是講話大聲就是人民!」直言不能因為任...more
                    + + + + + +
                    +
                    +
                    + + +
                    + + 誤碰開關!福島核電廠冷卻池一時停止
                    + 東京電力公司11日公布,福島第一核電廠2號機11月時發生使用過後核燃料棒冷卻池一時停止的障礙,所幸燃料棒沒有發生異狀。 +根據日本共同通信社11日晚間報導,東京電力公司表示,發生障礙的原因很可能是作業...more
                    + + + + + +
                    +
                    +
                    + + +
                    + + 葉匡時留任 收費員募鞋預告抗爭再起
                    + 新內閣今(8)日交接,交通部長葉匡時仍在留任名單中。國道收費員自救會成員上午到行政院門口抗議,痛批葉匡時不出面解決收費員安置等問題,回鍋代表執政黨完全不知悔改。此外,去年關廠工人連線等團體曾向社會募鞋...more
                    + + + + + +
                    +
                    +
                    + +
                    + + +
                    + + + + + + +
                    +
                    + +
                    + +
                    + + + + + + + + + +
                    +
                    + +
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    盧燕俐
                    + +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    +
                    +
                    + +
                    +
                    +
                    +
                    +
                    +
                    + + + + + + + +
                    +
                    + + + + + + +
                    +
                    + + + + + + + + + + + + + + + +
                    + +
                    + + + + + + +
                    + +
                    + +
                    + + +
                    +
                    +
                    + + +
                    + + + +
                    +
                    +
                    + + +
                    + + + + + + + +
                    + +
                    + + + + + + + + + + + + + + + New Talk 新頭殼 - 要聞 + http://newtalk.tw/news_list.php + New Talk 新頭殼 - Rss 訂閱 - 要聞 + zh-tw + + 不一樣的Kobe!紀錄片預告淚眼盈眶 + 新頭殼newtalk2014.12.13 謝莉慧/綜合報導 + +NBA洛杉磯湖人隊一哥Kobe Bryant預計明年2月推出的個人紀錄片《Kobe的沉思》(Kobe Bryant’s Muse)最新預告,12日曝光!Kobe在片中一度含淚盈眶,讓球迷們看到不一樣的Kobe,點閱率在10幾個小時就突破75000人次。 + +上個賽季,Kobe因為阿基里斯腱和膝蓋受傷,所以僅僅打了6場比賽,這部紀錄片就是在他養傷期間所策劃拍攝完成的。 + +Kobe在預告片一開始就說,「這不只是部電影,我有很多事要思考、很... + http://newtalk.tw/news/2014/12/13/54758.html + 2014-12-13 16:04:27 + http://newtalk.tw/news/2014/12/13/54758.html + + + 小心!國際股市大幅回檔中 +
                    ]]>新頭殼newtalk2014.12.13 張揚/台北報導 + +美國股市週五締造數年來最大單週跌幅,主因在於油價跌勢不止引發市場投資人對全球經濟成長力道轉弱的擔憂。 + +道瓊指數下跌315.51點,收17280.83點,跌幅1.8%。累計一週以來,道瓊指數下跌高達3.8%,為2011年異常酷寒氣候抑制經濟增長以來最大單週跌幅。標普500指數下跌33點,收2002.33點,跌幅1.6%,為2012年以來最大單週跌幅。 + +與此同時,歐洲股市周五也再度出現全面下跌的態勢,主要股市指數紛紛下跌超過2%以上。...
                    + http://newtalk.tw/news/2014/12/13/54756.html + 2014-12-13 15:58:25 + http://newtalk.tw/news/2014/12/13/54756.html +
                    + + 毛治國:電價計價應符合跨世代正義 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/台北報導 + +針對外界關切台電盈餘回饋降電價還價於民,不能等電價公式通過後才進行,應該雙軌齊動,行政院長毛治國昨天在立法院答詢時表示,這2個時間點不必綁在一起,政院發言人孫立群今(13)天進一步指出,政府將著手檢討台電營運績效,並將相關成本資訊透明公開,以符合世代正義。 + +毛治國認為,電價計價公式與還價差於民雖然可以適度切割處理,但是應該公平合理,符合跨世代正義,目前電價回饋已責成經濟部儘速辦理,而對於即將審議的電價計價公式,行政院將與立法院將儘速溝...
                    + http://newtalk.tw/news/2014/12/13/54755.html + 2014-12-13 14:55:59 + http://newtalk.tw/news/2014/12/13/54755.html +
                    + + 陳水扁保外就醫抗告 今再遭高院裁定駁回 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/綜合報導 + +前總統陳水扁今年6月向法務部矯正署申請保外就醫遭駁回,扁不服而親筆寫訴狀向台北地院聲明異議也遭駁回,再向高等法院提聲明異議及抗告,但高院昨天指出,該案屬司法行政處分性質,應打行政訴訟尋求救濟,昨天將陳水扁的聲明異議駁回後,今(13)天再裁定抗告駁回。 + +陳水扁入獄服刑超過6年,今年6月10日首度委託律師申請保外就醫,但法務部認為他的病況不符規定,因此駁回。於是,他向北院提出聲明異議,但北院以非管轄法院為由,裁定駁回。 + +但日前法務部...
                    + http://newtalk.tw/news/2014/12/13/54754.html + 2014-12-13 14:35:03 + http://newtalk.tw/news/2014/12/13/54754.html +
                    + + 林佳龍開共識會議 要求落實「行動市府」 +
                    ]]>新頭殼newtalk2014.12.13 鄭進興/台中報導 + +台中市長當選人林佳龍今(13)天上午與一級主管舉行共識會議,林佳龍於致詞時表示,此次選舉得到近85萬位市民選票的支持,讓他戒慎恐懼,激勵他為台中市民組織一個最好的「行動市府」團隊,他除了向社會大眾報告市政運作的基本原則外,也說明初期市政運作安排與具體要求,林佳龍與市府團隊「約法三章」,訂出「4大守則」,違者嚴懲,顯示出他對打造高品質「行動市府」團隊的決心。 + +林佳龍說,選票贏得多是壓力,也是後盾,期待市府團隊的同仁能夠記住2個數字,...
                    + http://newtalk.tw/news/2014/12/13/54753.html + 2014-12-13 14:12:00 + http://newtalk.tw/news/2014/12/13/54753.html +
                    + + 李新宣布退選 朱立倫同額補選國民黨主席 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/台北報導 + +新北市長朱立倫昨天宣布參選國民黨主席後,台北市長郝龍斌和台中市長胡志強隨後都表明不選了。而台北市議員李新今(13)天也宣布退選,截至目前為止,唯一有資格參選的黨主席候選人只剩朱立倫,形成同額競選的局面。 + +李新昨天打算到黨中央領表參選黨主席,卻因為沒帶200萬元作業費而被打回票。李新今天發布新聞稿宣布退出,將全力支持朱立倫參選。李新同時也提出黨務革新要求,呼籲副主席、秘書長以下的黨務主管應該年輕化,不要再有「五府千歲」級的大老參與其中。...
                    + http://newtalk.tw/news/2014/12/13/54752.html + 2014-12-13 13:53:59 + http://newtalk.tw/news/2014/12/13/54752.html +
                    + + 勞動局長i-voting 網路實體票選明展開 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/台北報導 + +針對勞動局長公開遴選i-voting活動引發外界疑慮,無黨籍台北市長當選人柯文哲辦公室今(13)天宣布該活動相關選務資訊,登記成為實體票選人的民眾可於明(14)天上午8時至下午4時,攜帶個人身份證及印章,至吉林路24號1樓投票。至於網路票選者,認證碼已在今早8時開始傳訊到票選人手機或電子信箱,網路票選自14日0時起至下午4時止,票選網址:http://goo.gl/QkkwLX。 + +柯辦表示,關於柯文哲所推出的「自己的勞動局長自己選」勞...
                    + http://newtalk.tw/news/2014/12/13/54751.html + 2014-12-13 13:31:11 + http://newtalk.tw/news/2014/12/13/54751.html +
                    + + 莊淑芬將任北市女副市長?柯辦不證實 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/綜合報導 + +外傳準台北市長當選人柯文哲的第3位女副市長,鎖定奧美集團大中華區副董事長莊淑芬。對此,柯文哲辦公室今(13)天表示,「關於中時報導第3位副市長人選,柯文哲辦公室並未證實此一報導,相關新人事公布仍會按照既定節奏再正式向外宣布。」據《中國時報》報導指出,柯營預定下周一才會發佈該人事案。 + +柯文哲目前已發佈鄧家基、林欽榮2位副手,但第3位女副手遲遲沒宣布,但柯文哲日前透露,要找女性企業家擔任副市長,而外界猜測人選還包括前高鐵董事長殷琪、Yah...
                    + http://newtalk.tw/news/2014/12/13/54750.html + 2014-12-13 13:08:34 + http://newtalk.tw/news/2014/12/13/54750.html +
                    + + 朱立倫拋修憲改內閣制 吳敦義:不能評論 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/台北報導 + +新北市長朱立倫昨天宣布參選國民黨主席,並拋出修憲以內閣制取代現行雙首長制的政見。國民黨代理主席、副總統吳敦義今(13)天出席「2014年健康促進醫院研討會」時表示,身為代理主席,應公正、公平、公開處理黨主席補選原則,不能表示贊成與否的意見,「所以我不能作這種評論」。 + +吳敦義上午出席2014健康促進研討會,會後接受媒體訪問時,做了以上表示。 + +國民黨主席補選於昨、今2天進行領表,朱立倫昨早正式宣布參選並主張修憲將雙首長制改為內閣制,...
                    + http://newtalk.tw/news/2014/12/13/54749.html + 2014-12-13 12:20:34 + http://newtalk.tw/news/2014/12/13/54749.html +
                    + + 落成就荒廢 西班牙蚊子機場3年才1班飛機 + 新頭殼newtalk 2014.12.13 洪聖斐/編譯報導 + +政治人物好大喜功,浪費公帑興建華而不實的大型建築,並非台灣獨有。西班牙就有幾座機場興建後閒置多年,其中1座在落成3年9個月後,才迎來第1班飛機。 + +西班牙《國家報》(El País)12日報導,2名退休機師11日在飛行俱樂部吃完早餐後心血來潮,開著1架小飛機前往落成後就閒置的卡斯特利翁機場(Castellón),成為這個機場的第1批客人。 + +這個機場是在西班牙房地產泡沫高峰時期興建的。這個泡沫在2008年破滅後,西班牙的經濟就陷入... + http://newtalk.tw/news/2014/12/13/54748.html + 2014-12-13 11:36:54 + http://newtalk.tw/news/2014/12/13/54748.html + + + 英國空中交通大亂 現逐步恢復正常 +
                    ]]>新頭殼newtalk2014.12.13 謝莉慧/綜合報導 + +據歐洲空中交通管制單位Eurocontrol表示,由於位於英國史旺維克(Swanwick)的英國國家空中交通控制中心(National Air Traffic Control Service,NATS)的電腦系統出現「技術問題」,導致倫敦空域一度關閉,目前逐步回復正常,但未透露何時可全面恢復。對此,英國運輸部長表示「無法接受」,將要求相關單位提出完整解釋。 + +NATS表示,英國的航空交通正逐步回復正常,不過稍早延誤以及取消的班次,需要一...
                    + http://newtalk.tw/news/2014/12/13/54747.html + 2014-12-13 10:15:23 + http://newtalk.tw/news/2014/12/13/54747.html +
                    + + 亮點!傳張鐵志為柯P文化局長人選之一 +
                    ]]>新頭殼newtalk2014.12.13 劉奕霆/台北報導 + +準台北市長柯文哲在選前曾說,未來社會、勞動、文化、教育、環保等5個局處將對外公開遴選;不過到了昨(12)日上午柯文哲公布小內閣名單為止,這5個局處首長只有教育局長確定由湯志民出任,而勞動局長將在明(14)日進行投票;據了解,在文化局長方面,曾任《新新聞》副總編輯、現任彭博商業週刊中文版/現代傳播主筆的作家張鐵志是遴選委員會最後5位決選人之一,且文化局長遴選委員會將在週日進行面談。 + +柯文哲昨日公布小內閣名單,對外宣布多達3分之1的局處首...
                    + http://newtalk.tw/news/2014/12/13/54746.html + 2014-12-13 00:36:02 + http://newtalk.tw/news/2014/12/13/54746.html +
                    + + 交通股長不列積分 學生指揮交通白幹了? +
                    ]]>新頭殼newtalk2014.12.13 黃博郎/台南報導 + +免試入學超額比序項目積分爭議不斷,104年度台南區免試入學超額比序項目積分對照表一出爐,國中家長反彈聲浪再起,昨(12)日東區復興國中家長在市議員蔡旺詮陪同下舉行「12年國教再改革,政府信賴保護應週全!制度變革應有緩衝機制!」記者會,表達對交通股長未列學校幹部計分的不滿。 + +家長們強調,他們的孩子過去主動擔任交通股長,幾年來在學校辛苦指揮交通,原以為有採計,但104年度免試入學卻不採計,很多孩子都忍不住傷心落淚,會考就快到了,每個人的心...
                    + http://newtalk.tw/news/2014/12/13/54745.html + 2014-12-13 00:02:14 + http://newtalk.tw/news/2014/12/13/54745.html +
                    + + 設計劉喬安賣淫? 壹週刊:展開內部調查 +
                    ]]>新頭殼newtalk2014.12.12 林朝億/台北報導 + +香港「東網」今(12)晚發出獨家報導指出「『壹週刊』設計劉喬安過程流出」。「東網」認為,「壹週刊」指讀者爆料太陽花女王劉喬安是高檔援交妹,實際上是「台壹」設局設計劉喬安的圈套,所謂香港讀者的黑衣男子根本就是「台壹」自己的香港籍狗仔隊員工,「台壹」社長裴偉得知影片外流後緊急下令追回影片,企圖掩飾「台壹」嚴重違反新聞道德的事實。 + +對於「東網」指控,「壹週刊」總編輯邱銘輝接受新頭殼訪問時證實,影片已經外流。他們已經報警處理。至於是否是內部員...
                    + http://newtalk.tw/news/2014/12/12/54744.html + 2014-12-12 23:13:27 + http://newtalk.tw/news/2014/12/12/54744.html +
                    + + 北上與朱立倫會面後 胡志強決定退選黨主席 +
                    ]]>新頭殼newtalk2014.12.12鄭進興∕台中報導 + +原本今(12)天要領表參選國民黨主席的台中市長胡志強,今天北上與新北市長朱立倫會面後表示,他決定不參選全力並支持朱。 + +胡志強表示,朱立倫上午透過臉書發布參選黨主席的訊息後不久,就打電話給他說要來看他,但因為他昨晚就打算今天去台北,如果第一天真的都沒有人出來領表參選的話,他打算今天下午去領表,以免打擊黨的士氣,因此他就跟朱約下午1點在台北見面。 + +胡志強說,見面時朱對他表示,如果他要選朱可以讓他,但他則鼓勵朱出來選,並表示會給予全...
                    + http://newtalk.tw/news/2014/12/12/54743.html + 2014-12-12 23:10:24 + http://newtalk.tw/news/2014/12/12/54743.html +
                    + + 法務部槓高院:行政與刑事法院見解常不同 + 新頭殼newtalk2014.12.12 林朝億/台北報導 + +對於台灣高等法院今(12)日駁回陳水扁聲請保外就醫異議案,並指法務部建議尋刑事法院提異議不符規定,法務部今晚發出新聞稿,槓上高院指出,矯正機關對所為處分有所不服,到底應採行政訴訟或刑事訴訟程序救濟,行政法院與刑事法院常有不同見解。因此,法務部之前建議,並沒誤導陳水扁提出救濟方式。 + +法務部指出,司法院大法官釋字第653號解釋、第681號解釋已肯認對矯正機關之處分不服者應給予司法救濟之機會。但對矯正機關對所為處分有所不服,到底應採行政訴訟... + http://newtalk.tw/news/2014/12/12/54742.html + 2014-12-12 22:36:08 + http://newtalk.tw/news/2014/12/12/54742.html + + + 媒體高層跟陳德銘那場FTA大餐 消化了沒? +
                    ]]>新頭殼newtalk2014.12.12 文/邱珮文 + +在阿基師深陷桃色風暴之際,網路出現另一股聲音,希望大家多關注陳德銘來台的報導,同時也有人開始質疑,媒體是藉此掩蓋自家老闆當天被海協會長陳德銘「召見」一事。當這場「早餐會」名單傳出來後,外界更紛紛撻伐媒體「不分藍綠」皆應邀出席,或感嘆自甘墮落、或擔憂收編滲透。 + +根據《壹周刊》報導,參與媒體早餐會的高層包括中天電視董事長馬永睿、旺報社長黃清龍、三立電視台總經理張榮華、聯合報總編輯游美月、東森新聞雲董事長李傳偉、風傳媒總主筆夏珍、民視執行副總編廖...
                    + http://newtalk.tw/news/2014/12/12/54741.html + 2014-12-12 21:42:39 + http://newtalk.tw/news/2014/12/12/54741.html +
                    + + 黨產爭議 朱立倫:只要有疑慮 該還就還 +
                    ]]>新頭殼newtalk2014.12.12 陳冠廷/新北報導 + +新北市長朱立倫今(12)日宣布參與國民黨主席的補選,但不參選2016年的總統,並主張透過修憲將台灣的政治體制改為「內閣制」、降低投票至18歲,及政黨的門檻降低至3%。至於國民黨的黨產爭議,朱立倫則主張,「只要有疑慮的,該還就還」。 + +宣布角逐國民黨主席後,外界好奇黨產要如何處理?朱立倫強調,「黨產只要有疑慮的,該還就還」,但關鍵的重點是,所有政黨的財務一定要公開透明,包含民進黨、國民黨及每個政黨,都應該這樣要求;另外組織要內造化,未...
                    + http://newtalk.tw/news/2014/12/12/54740.html + 2014-12-12 19:53:07 + http://newtalk.tw/news/2014/12/12/54740.html +
                    + + 高雄經驗受肯定 陳菊臉書po文抒情懷 +
                    ]]>新頭殼newtalk2014.12.12 金名/高雄報導 + +桃園市長當選人鄭文燦今(12)日南下向高雄市長陳菊借將,陳菊表示,她樂見高雄經驗擴展,對被相中人選她總是鼓勵,人才是屬於國家的,她不會扣留人才。 + +陳菊隨後在臉書談及高雄經驗所懷抱的理念,對於台北市長當選人柯文哲及鄭文燦借將一事,都避開不談。 + +鄭文燦率員南下向陳菊請益高雄經驗,雙方闢室密談1小時後,鄭文燦現身表示,陳菊主政高雄以來,已將高雄建設成為帶動南台灣進步的領頭羊,他未來入主桃園市政府後,也考慮向市府借將。 + +陳菊表示,...
                    + http://newtalk.tw/news/2014/12/12/54739.html + 2014-12-12 19:02:20 + http://newtalk.tw/news/2014/12/12/54739.html +
                    + + 高院駁回扁保外就醫 民進黨批法務部卸責 +
                    ]]>新頭殼newtalk2014.12.12 林雨佑/台北報導 + +台灣高等法院今(12)日下午駁回前總統陳水扁家屬提出的保外就醫異議聲請,對此,民進黨發言人黃帝穎表示,此結果應證了法務部長羅瑩雪日前公開要求陳前總統家屬聲請異議,只是權責機關意圖卸責的托詞;黃並呼籲法務部不應該繼續卸責、推諉下去,應儘速讓陳前總統保外就醫。 + +民進黨發言人黃帝穎重申,為避免陳前總統病況持續惡化,法務部本可依法做出適法的裁定,讓陳水扁保外就醫,進行居家療養,這不僅是法務部的職權,也是基於尊重醫療專業、醫療人權的理由。高等法...
                    + http://newtalk.tw/news/2014/12/12/54738.html + 2014-12-12 18:52:48 + http://newtalk.tw/news/2014/12/12/54738.html +
                    + + 李柯會 李登輝給3箴言:謙卑 冷靜 忍耐 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲今(12)日下午2點抵達外雙溪翠山莊,拜會前總統李登輝,2人閉門會談長達3小時,會後,柯文哲和李登輝手牽著手走出大門接受採訪。李登輝說,他跟柯文哲講「做市長很艱苦!」另外,他也跟柯文哲說要「謙卑、冷靜、忍耐」這樣市政才會好;柯文哲則說,李登輝本來就是很博學的人,跟他提了芝投公路、關渡平原的開發計畫等議題,並覺得李登輝是很好的顧問。 + +柯文哲下午拜會李登輝,2人閉門會談長達3小時,李登輝在會後受訪時表示,他有把要講的話都跟...
                    + http://newtalk.tw/news/2014/12/12/54735.html + 2014-12-12 18:44:35 + http://newtalk.tw/news/2014/12/12/54735.html +
                    + + 陳菊:總統制或內閣制須長遠來看 +
                    ]]>新頭殼newtalk2014.12.12 金名/高雄報導 + +新北市長朱立倫拋出修憲公投主張,高雄市長陳菊及桃園市長當選人鄭文燦今(12)日都表示,可以開放朝野討論。陳菊並強調,對於採取內閣制或者總統制,應該從長遠方向來看。 + +陳菊認為,國家要採取內閣制或總統制,為應該長遠來看,很多國家的經驗都可以借重,但適不適合台灣,可以再討論。 + +鄭文燦表示,要公投修憲,眼前國會改革是重點,現行國會選制造成民意被扭曲、席次不對等,應按照憲法票票等值原則,不論國會改革或是立委選舉制度,都可以透過協商來推...
                    + http://newtalk.tw/news/2014/12/12/54737.html + 2014-12-12 18:36:04 + http://newtalk.tw/news/2014/12/12/54737.html +
                    + + 毛治國:若有選擇 不會接任行政院長 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +新任行政院長毛治國在朝野一片批評聲浪中接下閣揆,今(12)日他在立委的詢問下,首度公開表達自己接任行政院長的心路歷程。他表示,原本總統馬英九徵詢他時,他表示自己是工程人,「不要把時間浪費在我身上」。他也坦承,若有選擇,「我不會接受這個工作」。 + +親民黨立委陳怡潔下午詢問,馬英九當初是如何說服毛治國接任院長一職?毛治國回應,第一時間被徵詢時,他有向馬表示,自己是工程人,這個工作應找政治性格比較強的人,所以「不要浪費時間在我身上」。 + +...
                    + http://newtalk.tw/news/2014/12/12/54733.html + 2014-12-12 18:32:53 + http://newtalk.tw/news/2014/12/12/54733.html +
                    + + 馬雲身家286億美元 成亞洲新首富 +
                    ]]>新頭殼newtalk2014.12.12 周佑政/綜合報導 + +彭博社(Bloomberg)12日公布彭博億萬富豪指數(Bloomberg Billionaires Index),中國阿里巴巴集團創辦人馬雲擁有286億美元,高出香港房地產大亨李嘉誠3億美元,成為亞洲新首富。高齡86歲的李嘉誠獲悉後,透過發言人表示,「中國的年輕人做得很好,我對此感到欣慰。」 + +根據彭博億萬富豪指數統計,阿里巴巴今年9月再美國首次公開發行股票(IPO)後,股價急漲54%,目前阿里巴巴市值達2590億美元,超過美國網路購...
                    + http://newtalk.tw/news/2014/12/12/54736.html + 2014-12-12 18:22:49 + http://newtalk.tw/news/2014/12/12/54736.html +
                    + + 高院駁回扁保外就醫 陳菊:無法接受 +
                    ]]>新頭殼newtalk2014.12.12 謝莉慧/綜合報導 + +對於台灣高等法院今(12)天下午駁回前總統陳水扁保外就醫的裁定,下午才到台中培德監獄探視陳水扁的高雄市長陳菊表示,無法接受,因為陳水扁的健康已經亮起紅燈,今天談話不到1小時,陳水扁就出現尿失禁、手抖的情形。 + +陳菊下午在前行政院長張俊雄、李鴻禧教授以及民進黨立法委員李昆澤、李俊俋的陪同下,前往台中培德監獄探視陳水扁,關心扁的身體健康狀況。 + +陳菊說,榮總等醫療團隊都已經提出專業建議,認為扁應該居家療養,馬總統應該尊重醫師的專業判斷,...
                    + http://newtalk.tw/news/2014/12/12/54734.html + 2014-12-12 18:09:23 + http://newtalk.tw/news/2014/12/12/54734.html +
                    + + 扁保外就醫遭駁回 高院將皮球踢回法務部 +
                    ]]>新頭殼newtalk2014.12.12 林朝億/台北報導 + +法務部認為,前總統陳水扁如果不服不准保外就醫的聲請,得向法院聲請救濟一事,台灣高等法院今(12)日在陳水扁提出對於法務部裁示異議聲請後做出決定,關於陳水扁保外醫治之審核及許可與否決定,是屬法務部之行政處分。陳水扁若不服該處分,應循行政爭訟途徑救濟之;因此,駁回陳水扁異議聲請。 + +針對陳水扁聲請保外就醫一事,法務部10月28日做出法矯字第10301077920號函指出,陳水扁固罹有神經內科及精神科疾患,但經綜合評估健康狀況,尚非在監內無法...
                    + http://newtalk.tw/news/2014/12/12/54730.html + 2014-12-12 17:37:20 + http://newtalk.tw/news/2014/12/12/54730.html +
                    + + 拿下5席 青年佔領政治:下一步選制改革 +
                    ]]>新頭殼newtalk2014.12.12 邱珮文/台北報導 + +「青年佔領政治」今(12)天召開9合1選舉成果發表會,指出推出參選的18名青年中,共有5名成員成功當選。他們也宣布,「青年佔領政治」的下一步是打造友善青年參政的環境,除了下修參選年齡外,也將促生「公費選舉」、「議會比例代表制」等選制改革。 + +青年佔領政治表示,這5位當選者分別是竹北市民代表許育綸、宜蘭縣議員薛呈懿、集集鎮長陳紀衡、金龍里長鄭允強和綠川里長薛雅文,其餘成員雖落選,卻也幾乎都拿回保證金。 + +青年佔領政治發起人冼義哲說,此...
                    + http://newtalk.tw/news/2014/12/12/54731.html + 2014-12-12 17:27:46 + http://newtalk.tw/news/2014/12/12/54731.html +
                    + + 林佳龍:上任後盡速打造高水準會展中心 +
                    ]]>新頭殼newtalk2014.12.12 鄭進興/台中報導 + +台中市長當選人林佳龍今(12)日首度以準市長的身分出席公開活動,受邀參加在大台中國際會展中心舉行的2014年資訊月台中區展覽開幕活動,他在致詞時承諾,上任後將盡速興建「台中國際會議展覽中心」,並且促進軟體園區、科學園區與工業園區的結合,共同發揮產業鏈的效應帶動商機。 + +林佳龍表示,電腦公會在資訊月期間,最期待的就是能夠有像台北同樣水準的國際會展中心,來發揮功能性與服務性,除了軟體資訊要好,硬體設備也要棒,相信這也是未來市長的責任,他...
                    + http://newtalk.tw/news/2014/12/12/54732.html + 2014-12-12 17:19:46 + http://newtalk.tw/news/2014/12/12/54732.html +
                    + + 遭囚6年 劉曉波:多關注無名受難者 +
                    ]]>新頭殼newtalk2014.12.12 周佑政/綜合報導 + +諾貝爾和平獎得主、中國作家劉曉波遭中國當局囚禁超過6年,期間鮮少有他的訊息。現居德國柏林的中國流亡作家廖亦武昨(11)晚在個人臉書上表示,9日透過特殊管道得知劉曉波最新言論;劉曉波說,「我不錯」,希望世界多關注其他較不知名的受難者。 + +劉曉波表示,「託老廖(指廖亦武)代轉一段話:我不錯。自入獄以來,閱讀和思考從未間斷,通過學習,更加確信我沒有私敵。我身上的光環已經足夠,請將世界的關注更多地放在那些不太知名,或者根本不知名的受難者身上吧!...
                    + http://newtalk.tw/news/2014/12/12/54729.html + 2014-12-12 17:07:41 + http://newtalk.tw/news/2014/12/12/54729.html +
                    + + 游盈隆:朱立倫主張內閣制非深思熟慮 +
                    ]]>新頭殼newtalk2014.12.12 林朝億/台北報導 + +對於新北市長朱立倫倡議修憲推動內閣制,民進黨智庫民主憲政小組召集人游盈隆今(12)日表示,這並非一種深思熟慮的主張。他說,如果要解決目前政府體制權責不符問題,應該先從恢復立院對於內閣同意權以及給予總統主動解散國會這2項著手。 + +對於改成內閣制的困難,游盈隆表示,「權力分立與制衡」的憲政理念在台灣早已深入人心,根深蒂固,形成了一種共識與傳統;而嚴格定義下的「內閣制」,其背後的憲政原理是「權力合一」,這和台灣民意明顯背道而馳;此外,立法院形...
                    + http://newtalk.tw/news/2014/12/12/54728.html + 2014-12-12 16:35:31 + http://newtalk.tw/news/2014/12/12/54728.html +
                    + + 從趙舜看被台灣人忽略的澎湖鄉愁(管仁健) +
                    ]]>新頭殼newtalk2014.12.12 文/管仁健 + +「澎湖灣,澎湖灣,外婆的澎湖灣,有我許多的童年幻想,陽光、沙灘、海浪、仙人掌,還有一位老船長。」 + +這是校園民歌《外婆的澎湖灣》的歌詞結尾,去年2月3日,資深民歌手潘安邦因腎臟癌病逝於林口長庚醫院。當時我替趙舜採訪整理的自傳《讓人生變喜劇》正忙著出版,事前因潘安邦已重病、無法請到與舜哥同樣來自澎湖的他來寫序。 + +當時舜哥悲嘆潘安邦這位馬公中學的學長,不到60歲就英年早逝,豈料造化弄人,今年12月10日,三次中風、動過心臟手術又洗腎一年多、...
                    + http://newtalk.tw/news/2014/12/12/54726.html + 2014-12-12 16:30:52 + http://newtalk.tw/news/2014/12/12/54726.html +
                    + + 考毛治國網路用語 藍委自己也講錯 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +行政院長毛治國今(12)日赴立法院進行施政報告,除了強調行政團隊要「換個腦袋」,還強調要多與網路世界交流,了解網友的意見。不過,國民黨立委楊瓊瓔拿出多張手板,一一詢問毛治國是否了解包含「安安」、「BJ4」等網路用語的意思,雖然毛治國僅認得「婉君」指的是「網軍」,但楊瓊櫻自己也把「閃光」誤認為「有亮點」。 + +毛治國的施政報告中指出,政府今後也應瞭解涵蓋實體世界,與新興網路世界的完整民意。他認為,應該在傳統的實體世界與新興的網路世界之間建立...
                    + http://newtalk.tw/news/2014/12/12/54727.html + 2014-12-12 16:29:50 + http://newtalk.tw/news/2014/12/12/54727.html +
                    + + 新北議會朝小野大 綠籲朱立倫以市政為重 +
                    ]]>新頭殼newtalk2014.12.12 陳冠廷/新北報導 + +口口聲聲強調「市政優先」的新北市長朱立倫,在「拱朱(立倫)」聲浪的推波助瀾下,今(12)日上午7點45分在臉書PO文表態將參選國民黨主席補選;但民進黨新北議會成員普遍認為,在新北議會朝小野大的情況下,朱應扮演好新北市長的角色,不應汲汲營營於國民黨內權力。 + +民進黨新北市議會黨團說,在選民的託付下,民進黨為新北市議會第一大在野黨,朱立倫決定參選主席的決定表示尊重,但不得不提醒朱立倫,現在是新北市長,就應該扮演好新北市長的角色,不該在敗...
                    + http://newtalk.tw/news/2014/12/12/54725.html + 2014-12-12 16:14:50 + http://newtalk.tw/news/2014/12/12/54725.html +
                    + + 扁保外就醫案 毛治國:馬有放手給我做 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +前總統陳水扁的保外就醫爭議引發外界關注,行政院長毛治國今(12)天表示,據他了解法務部已在研議此案的處理方式,一切尊重法務部的意見。他也強調,做決定會把大原則跟馬英九總統報告,扁案是放手給他做,「有獲得充份授權」。而法務部長羅瑩雪則表示,何時能決定扁可否保外就醫,時間上還無法預估。 + +民進黨立委蔡其昌下午質詢提到扁保外就醫議題,毛治國表示,決定接院長時就開始關注哪些議題是各界關注的,而扁案正是大家注意的議題之一。他了解到法務部已在研議處...
                    + http://newtalk.tw/news/2014/12/12/54724.html + 2014-12-12 15:34:02 + http://newtalk.tw/news/2014/12/12/54724.html +
                    + + 貨貿服貿若硬推 民團:月亮花保證綻放 +
                    ]]>新頭殼newtalk2014.12.12 邱珮文/台北報導 + +針對中國海協會會長陳德銘日前說出「再來一個月亮花就沒意思」言論,台灣教授協會今(12)天與黑色島國青年陣線、民主鬥陣、島國前進一同召開記者會,指馬政府若繼續與中國政府相互唱和,硬推服貿、貨貿協議,他們保證「月亮花」將在黑夜中綻放。 + +陳德銘日前與台灣媒體主管舉行早餐會,引起爭議,會中,更暗示性的催促兩岸協議監督條例、貨貿協議等議題進度,並說出「如果再來一個『月亮花』就沒意思了。」 + +對此,台灣教授協會邀請多位參與太陽花運動的青年一同...
                    + http://newtalk.tw/news/2014/12/12/54723.html + 2014-12-12 15:26:17 + http://newtalk.tw/news/2014/12/12/54723.html +
                    + + 陳為廷參選 林飛帆:需體制內的國會代表 +
                    ]]>新頭殼newtalk2014.12.12 林雨佑/台北報導 + +學運領袖陳為廷日前宣布投入苗栗立委補選,陳的戰友林飛帆今(12)天表示,他會全力支持,讓陳為廷順利進入國會。至於外界質疑陳為廷參選是為了牟取個人政治利益,林飛帆說,他們需要有在體制內的國會代表,制度外則有民眾作為基礎,兩者一起配合,才能達到台灣社會的政治改革。 + +林飛帆下午2點半因為318學運的案子到台北地檢署出庭,對於陳為廷參選立委,林飛帆出庭前受訪時表示,陳為廷做了一個艱難勇敢的決定,而因為補選日期在明年2/7,陳為廷才會倉促地宣布...
                    + http://newtalk.tw/news/2014/12/12/54722.html + 2014-12-12 15:18:08 + http://newtalk.tw/news/2014/12/12/54722.html +
                    + + 昨婉拒遞補 賴香伶改口:把這條路走下去 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲拋出勞動局長開放民選,但遴選過程一波三折,柯文哲辦公室昨天公布最後5位決選人後,下午到晚上就有2人宣布退選;柯文哲今(12)日上午對此表示,會再請副市長鄧家基去詢問第6和第7名備選人,希望維持5人參選。原本昨晚在臉書上宣布會婉拒遞補的人民火大行動聯盟秘書長賴香伶,下午在臉書上再次發文表示,她會參加勞動局長選舉,「把這條路走下去!」 + +針對勞動局長遴選一事,4位勞動局長參選人謝創智、 蔡瑞麟、胡博硯、林凱衡昨天發表聯合聲明...
                    + http://newtalk.tw/news/2014/12/12/54721.html + 2014-12-12 15:08:41 + http://newtalk.tw/news/2014/12/12/54721.html +
                    + + 朱立倫主張內閣制 藍委紛紛表態力挺 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +新北市長朱立倫今(12)日除了正式宣布參選國民黨主席,更提出憲改議題,強調要以內閣制取代雙首長制,並下修投票年齡至18歲等。對此,國民黨立委多表示肯定。國民黨大黨鞭費鴻泰即表示,朱立倫提的主張正是現在很多藍委都支持的論點。 + +國民黨立委江啟臣近期提案成立「修憲委員會」,獲得朝野立委支持,通過提案門檻。而朱立倫今天表示,十多年來的憲政僵局及失能的政治體系無法解決人民的問題,唯有重建權責相符的制度,讓人民的力量進入體制內運作,才能打破憲政僵...
                    + http://newtalk.tw/news/2014/12/12/54720.html + 2014-12-12 14:14:08 + http://newtalk.tw/news/2014/12/12/54720.html +
                    + + 罷免連署破5萬 馮光遠:蔡正元人呢? +
                    ]]>新頭殼newtalk2014.12.12 邱珮文/台北報導 + +割闌尾團隊昨天宣布已收取超過5萬份國民黨立委蔡正元罷免連署書,必將邁入第3階段的罷免投票,然而,蔡正元至今已神隱2週。對此,憲法133實踐聯盟發起人馮光遠今(12)日表示,第3階段投票的高門檻,將會是個困難。他也呼籲蔡正元出來露個面,很多人都關心他的安危,想說怎麼不見了咧。 + +國民黨立委蔡正元身為台北市長候選人連勝文陣營的競選總幹事,面對連11/29慘輸20多萬票,不但缺席敗選記者會,手機也關機,之後更傳出他搭機前往中國、有意退出政壇,...
                    + http://newtalk.tw/news/2014/12/12/54718.html + 2014-12-12 14:02:03 + http://newtalk.tw/news/2014/12/12/54718.html +
                    + + 朱立倫選黨主席 王金平:尊重祝福 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +新北市長朱立倫今(12)日正式表態將參選國民黨主席,而台北市長郝龍斌、台中市長胡志強都表明放棄參選。對此,立法院長王金平中午受訪表示,他尊重朱的決定。至於朱立倫說自己不選2016,王金平說,「我沒有看法」、「我們就祝福他」。 + +對於朱立倫將爭奪黨主席一職,王金平中午在立法院受訪時仍不改低調,僅淡淡回應,「尊重他(朱)的決定」。 + +而朱立倫不選下屆總統,王金平則不表示意見,只說自己沒有看法。媒體追問,朱立倫有無可能選2020總統?王金...
                    + http://newtalk.tw/news/2014/12/12/54715.html + 2014-12-12 14:01:48 + http://newtalk.tw/news/2014/12/12/54715.html +
                    + + 誰說沒開放?首例中國來台職災死亡 +
                    ]]>新頭殼newtalk2014.12.12 林雨佑/台北報導 + +一名年僅26歲的劉姓中國籍工程技師日前以「商務履約」名義來台灣組裝測試電梯,卻不幸在建案工地墜樓身亡,成為中國籍「勞工」在台灣職災死亡首案。經濟民主連合召集人賴中強批評,因為馬政府不願意承認開放中國勞工,才導致這些有勞務之實的中國人士無法享有跟外國勞工一樣的職災保險等待遇,進而也排擠台灣勞工工作權。而移民署官員也承認,目前有大約5000名來台中國人士可能屬於「職災人球」。 + +台灣日前發生中國籍「勞工」在台灣職災死亡第一個個案。承包遠雄建...
                    + http://newtalk.tw/news/2014/12/12/54706.html + 2014-12-12 13:56:46 + http://newtalk.tw/news/2014/12/12/54706.html +
                    + + 美眾院通過1.1兆支出案 政府免於「斷炊」 +
                    ]]>新頭殼newtalk2014.12.12 周佑政/綜合報導 + +美國眾議院11日深夜以些微差距,通過1.1兆美元的政府支出法案,預估日後參議院也將通過此案,意味聯邦政府在2015年9月前可順利運作,不必面對「政府關門」窘境。不過,這項支出法案不包括國土安全部預算,換句話說,總統歐巴馬日前提出的新移民政策能否順利執行,還有變數。 + +美國聯邦政府現有的財政支出授權在當地時間11日24時(台灣時間12日13時)屆滿,如果眾議院無法通過支出法案,政府將面臨「斷炊」。所幸,眾議院在最後關頭、距離期限2小時前...
                    + http://newtalk.tw/news/2014/12/12/54719.html + 2014-12-12 13:53:09 + http://newtalk.tw/news/2014/12/12/54719.html +
                    + + 中國人權律師遭打壓 台灣成立聲援網絡 +
                    ]]>新頭殼newtalk2014.12.12 邱珮文/台北報導 + +台灣聲援中國人權律師網絡今(12)天舉辦成立記者會,發起人之一的平路表示,此刻在中國有許多維權律師遭遇執業困難,甚至被軟禁、被關押;台灣人能夠做得非常有限,關懷就是第一步。對此,香港中國維權律師關注組副主席張耀良認為,中國非常重視外頭怎麼看自己,外界聲援將轉化成很大的壓力。 + +為了喚起台灣社會對中國人權的關注,「台灣聲援中國人權律師網絡」今天正式成立。發起人包括作家平路、公民監督國會聯盟常務理事顧忠華、總統府人權諮詢委員會委員黃默以及律...
                    + http://newtalk.tw/news/2014/12/12/54714.html + 2014-12-12 13:43:35 + http://newtalk.tw/news/2014/12/12/54714.html +
                    + + 頂新101售股案 毛治國:尊重投審會決定 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +行政院長毛治國今(12)日首度到立法院進行施政報告,經過上午台聯立委的杯葛,直到中午左右,毛治國才順利上台報告並備詢。針對立委詢問頂新售台北101股權案,毛治國強調政府有行政程序要走,未表態對此事是否同意,只說「我們會非常審慎處理」,並呼籲頂新不要再做有違國人期待的事。 + +立法院原訂上午10點開始進行行政院長施政報告及總質詢,因台聯立委佔領主席台,議程只好先改為進行報告事項,直到接近中午的11點50分左右,立法院長王金平宣布施政報告開始...
                    + http://newtalk.tw/news/2014/12/12/54717.html + 2014-12-12 13:41:05 + http://newtalk.tw/news/2014/12/12/54717.html +
                    + + 2決選人退出 柯P:會依序徵詢後面2位 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲今(12)日上午公布小內閣名單,不過現在仍有財政局長、資訊局長和研考會主委等人選仍未定案,媒體也持續關注第3位副市長人選和勞動局長遴選問題。柯文哲說,昨天公布5個勞動局長決選人後,下午就2人退出,「表示政治獵殺行動太可怕了」,他個人還是認為社會風氣要改變。至於剩下3位決選人該如何處置?柯文哲說會依序徵詢第6和第7名,希望維持5人參選。 + +柯文哲上午被問到第3位副市長人選時再一次強調,還在等對方考慮;接著他說,台灣的政治,...
                    + http://newtalk.tw/news/2014/12/12/54713.html + 2014-12-12 13:31:09 + http://newtalk.tw/news/2014/12/12/54713.html +
                    + + 港被捕者陸續獲釋 何韻詩:榮幸、畢生難忘 +
                    ]]>新頭殼newtalk2014.12.12 周佑政/綜合報導 + +香港民眾「佔中」爭取普選75天後於昨天落幕,警方在清場過程中逮捕247人,被捕人士今(12)日上午陸續獲釋,包括學生領袖周永康、壹傳媒主席黎智英及藝人何韻詩。周永康表示,往後會發起更大規模的群眾運動;何韻詩則說,「非常榮幸能跟香港人雨中同行,2014畢生難忘。」 + +根據香港《蘋果日報》報導,包括周永康、何韻詩、黎智英,及較早獲釋的泛民主派人士李柱銘、梁家傑和余若薇等人,都「拒絕保釋」,最後獲得無條件釋放,但警方保留追究權。不過,周永康強...
                    + http://newtalk.tw/news/2014/12/12/54716.html + 2014-12-12 13:21:09 + http://newtalk.tw/news/2014/12/12/54716.html +
                    + + 接都發局長 林洲民要當城市設計建築師 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲今(12)日上午公布小內閣名單,在這波新人事中,來自民間的都發局長林洲民格外亮眼。柯文哲當選後曾說要提出台北2050年都市計畫與願景,林洲民在記者會上表示,2050不是要大家等35年,而是每隔幾個月,大家就會看到台北更好。他也在會後說,都發局要有一個「城市設計建築師」的概念,不要只是「轉包中心」。 + +林洲民今年59歲,曾獲國內外多項建築大獎,台灣海洋科技博物館就是其設計作品,另外,國際名導演李安也是他的好友。林洲民為哥倫...
                    + http://newtalk.tw/news/2014/12/12/54712.html + 2014-12-12 13:00:00 + http://newtalk.tw/news/2014/12/12/54712.html +
                    + + 朱立倫提憲改 民進黨:正面看待 但黨產咧 +
                    ]]>新頭殼newtalk2014.12.12 林朝億/台北報導 + +對於新北市長朱立倫宣布投入國民黨主席選舉,並提出憲改主張,民進黨發言人黃帝穎今(12)日表示,對於朱提出憲改議題,民進黨給予正面鼓勵;不過,他也要提醒朱立倫,黨產的議題要如何解決以及總統開除國會議長等嚴肅議題,朱立倫都不應該迴避。 + +朱立倫今日發表「找回創黨精神,和人民站在一起」聲明投入黨主席選舉。其中,朱立倫主張修憲公投,改成內閣制、降低投票年齡到18歲、降低政黨門檻、推動不在籍投票及檢討單一選區兩票制。 + +對於朱的修憲主張,黃帝...
                    + http://newtalk.tw/news/2014/12/12/54711.html + 2014-12-12 12:47:06 + http://newtalk.tw/news/2014/12/12/54711.html +
                    + + 國民黨主席補選起跑 周玉蔻領表遭拒 +
                    ]]>新頭殼newtalk2014.12.12 謝莉慧/台北報導 + +國民黨主席補選今(12)日開始進行領表作業,上午10時,台北市議員李新及資深媒體人周玉蔻前往國民黨中央領表,但2人都遭到一些阻礙,李新因未攜帶200萬作業費,無法完成領表程序;周玉蔻更是被認定「連領表資格都沒有」,她在現場痛批國民黨的選舉辦法非常反民主、腐敗。至於宣布參選黨主席的新北市長朱立倫,上午則委託幕僚江政彥代領表,並繳交200萬元作業費,完成領表手續,整個上午已有6人前往領表,但大都未完成領表手續,有的是未繳交作業費,有的是不具資格...
                    + http://newtalk.tw/news/2014/12/12/54710.html + 2014-12-12 12:41:00 + http://newtalk.tw/news/2014/12/12/54710.html +
                    + + 柯P小內閣名單公布 高雄借將出力多 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲今(12)早公布首波小內閣名單,其中柯向高雄市長陳菊借將,延攬高雄市政府副秘書長蘇麗瓊出任北市府秘書長:另外,民政局由競選期間替柯輔選的前台北市議員藍世聰出任,兵役局長則由近日已辦理提前退伍的陸軍副司令傅永茂中將出任。柯文哲說,目前財政局長、資訊局長以及研考會主委仍須要對外徵才或靠外界自薦。 + +柯文哲自11月29日當選後,當晚隨即開會,確定首位副市長人選,接著又陸續公布體育局長、衛生局長以及第2位副市長人選;今天上午柯文...
                    + http://newtalk.tw/news/2014/12/12/54709.html + 2014-12-12 12:34:04 + http://newtalk.tw/news/2014/12/12/54709.html +
                    + + 毛治國赴立院報告 遭台聯舉牌杯葛 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +行政院長毛治國今(12)日首度赴立法院進行施政報告及備詢,他坦承第一次參與總質詢「會緊張」。不過,台聯立委上午隨即霸佔主席台,總召賴振昌表示,若毛揆未表明簽署資訊科技協定(ITA)的態度,就不會讓毛上台報告。直到上午11點18分,會議才正式召開,但改進行報告事項,未進行施政報告。 + +毛治國今天首次以行政院長身分備詢,雖然民進黨團已表明不會杯葛,但台聯在早上9點50分左右即佔領主席台,阻止毛進行施政報告。賴振昌表示,若不能爭取面板、工具機...
                    + http://newtalk.tw/news/2014/12/12/54707.html + 2014-12-12 12:00:06 + http://newtalk.tw/news/2014/12/12/54707.html +
                    + + 前景不妙 中國首度呼籲體認經濟「新常態」 +
                    ]]>新頭殼newtalk2014.12.12 張揚/台北報導 + +中國領導階層年度經濟工作會議昨日結束,原本2天的會議延長為3天,會議在結論中首度呼籲「認識新常態,適應新常態,引領新常態,是當前和今後一個時期中國經濟發展的大邏輯。」中國領導人研判今年經濟成長率7.5%的目標應可達成,但也同意經濟下行的風險較大。 + +中央經濟工作會議12月9日至11日在北京舉行。中共中央總書記、國家主席、中央軍委主席習近平,中共中央政治局常委、國務院總理李克強,中共中央政治局常委、全國人大常委會委員長張德江,中共中央政治局...
                    + http://newtalk.tw/news/2014/12/12/54708.html + 2014-12-12 11:54:05 + http://newtalk.tw/news/2014/12/12/54708.html +
                    + + 快訊/柯P小內閣出爐 蘇麗瓊接市府秘書長 +
                    ]]>新頭殼newtalk2014.12.12 劉奕霆/台北報導 + +準台北市長柯文哲今(12)早公布首波小內閣名單,其中柯向高雄市長陳菊借將,延攬高雄市政府副秘書長蘇麗瓊出任北市府秘書長:另外,民政局由競選期間替柯輔選的前台北市議員藍世聰出任,兵役局長則由近日已辦理提前退伍的陸軍副司令傅永茂中將出任。 + +以下為今日公布的柯文哲小內閣名單: + +台北市政府副市長:鄧家基 +台北市政府副市長:林欽榮 +台北市政府秘書長:蘇麗瓊 +台北市政府民政局長:藍世聰 +台北市政府兵役局長:傅永茂 +台北市政府捷運局...
                    + http://newtalk.tw/news/2014/12/12/54705.html + 2014-12-12 11:08:12 + http://newtalk.tw/news/2014/12/12/54705.html +
                    + + 朱立倫不選2016 洪秀柱:別把話說死 +
                    ]]>新頭殼newtalk2014.12.12 翁嫆琄/台北報導 + +國民黨主席究竟由誰接任,由數十名藍委連署力挺的新北市長朱立倫今(12)日透過臉書表態參選黨主席,但不會參與2016的總統大選。對此,立法院副院長洪秀柱上午表示肯定,因現在是黨最艱困的時刻,有人願意承擔是好事一樁。但針對朱立倫表明不選下屆總統,洪秀柱則認為,事情每天都在變,不用把話說死。 + +30多名國民黨立委近日連署拱朱立倫出面競選黨主席,更強調朱立倫責無旁貸,紛紛寄望他能帶領國民黨走出低潮。原本不承認也不否認參選的朱,今天終於表態將競爭...
                    + http://newtalk.tw/news/2014/12/12/54702.html + 2014-12-12 10:40:23 + http://newtalk.tw/news/2014/12/12/54702.html +
                    + + 阿基師救了陶子姐(盧燕俐) +
                    ]]>新頭殼newtalk2014.12.12 文:盧燕俐 + +看完昨天下午阿基師的記者會,我只有兩個感想,第一,「阿基師準備從雲端摔下來了!」不僅內容疑點重重,還創造出「是巧遇非外遇」「嘴對嘴親吻也是安慰」等謬論,昔日好男人形象也毀於一旦;第二,輿論鐵定持續撻伐,正好解救了陷入代言風暴的陶子姐,讓媒體立即轉移焦點。 + +阿基師待人相當客氣,我過去參加他的節目錄影,他都會喊我一聲「盧老師」,我都回以「您太折煞我了,稱呼我燕俐就好」,他不嫌棄我不會做菜,錄影時還提醒許多細節,讓鏡頭呈現更完美。在工作上,他...
                    + http://newtalk.tw/news/2014/12/12/54703.html + 2014-12-12 10:35:10 + http://newtalk.tw/news/2014/12/12/54703.html +
                    + + 香港警戒中!擔心再佔領 逮捕247人 +
                    ]]>新頭殼newtalk2014.12.12 鄭凱榕/編譯報導 + +香港雨傘運動大規模示威抗議的最大據點──香港島上的金鐘,香港警察今(12)日為了避免昨天強制清場後的示威者再次佔據幹道,持續保持週邊的警戒狀態。 + +根據日本共同通信社12日香港報導,昨(11)日強制清場的時候,總共逮捕了247名示威者,其中一部分獲得了交保釋放。為了避免金鐘現場再度遭到佔據,香港警方持續監控維持警戒中。 + +香港島上另一個佔領現場銅鑼灣,也還殘留著示威者小規模的據點。有一部分的香港報紙報導,香港當局表示,首要目標是防止...
                    + http://newtalk.tw/news/2014/12/12/54704.html + 2014-12-12 10:33:56 + http://newtalk.tw/news/2014/12/12/54704.html +
                    + + 誤碰開關!福島核電廠冷卻池一時停止 +
                    ]]>新頭殼newtalk2014.12.12 鄭凱榕/編譯報導 + +東京電力公司11日公布,福島第一核電廠2號機11月時發生使用過後核燃料棒冷卻池一時停止的障礙,所幸燃料棒沒有發生異狀。 + +根據日本共同通信社11日晚間報導,東京電力公司表示,發生障礙的原因很可能是作業員誤碰附近機器的運轉開關。 + +根據東電表示,核燃料棒冷卻時停止運轉發生在11月27日的下午。冷卻停止的原因,是因為往控制冷卻閥運送空氣的壓縮機停止運轉,導致控制冷卻閥關閉,因此無法從冷卻池中抽取水上來。 + +大約5個小時之後,啟動另一...
                    + http://newtalk.tw/news/2014/12/12/54701.html + 2014-12-12 09:49:55 + http://newtalk.tw/news/2014/12/12/54701.html +
                    + + 懷疑諷刺畫冒瀆伊斯蘭 印尼搜查英文報 +
                    ]]>新頭殼newtalk2014.12.12 鄭凱榕/編譯報導 + +印尼警察當局11日公布,由於印尼當地英文報紙《雅加達郵報》7月時刊登了1則關於中東過度激進派「伊斯蘭國」的諷刺漫畫,有冒犯褻瀆伊斯蘭教的嫌疑,將該報總編輯當作犯罪嫌疑人進行搜查。如果之後被判有罪的話,將可能科以有期徒刑。 + +根據日本共同通信社12日雅加達報導,印尼是世界上穆斯林(伊斯蘭教信徒)最多的國家。《雅加達郵報》(the Jakarta Post)在今年7月3日刊登了1則諷刺漫畫,內容是看起來像伊斯蘭國的戰士,身上背著槍,豎起大旗...
                    + http://newtalk.tw/news/2014/12/12/54699.html + 2014-12-12 09:19:58 + http://newtalk.tw/news/2014/12/12/54699.html +
                    + + 朱立倫宣布 將參選黨主席不選2016 +
                    ]]>新頭殼newtalk2014.12.12 謝莉慧/綜合報導 + +今(12)天是國民黨黨主席補選領表的第1天,新北市長朱立倫一大早在臉書宣布,為找回創黨精神,和人民站在一起,他決定參選黨主席。朱在文中表示,「做為30幾年的資深黨員,我對國民黨有感情;生活在這塊土地上50多年,我對台灣有牽掛。即使眼前艱難重重,我們都不應退縮。我們可以輸掉一場選舉,不能輸掉一整個世代,唯有勇於承擔,大破大立,國民黨才能再起。」他同時表示,「感謝新北市民給我再一次的機會,我非常珍惜,未來4年我會做好做滿,不會參選2016的總統...
                    + http://newtalk.tw/news/2014/12/12/54698.html + 2014-12-12 09:02:30 + http://newtalk.tw/news/2014/12/12/54698.html +
                    + + 商業機密遭竊 耐吉告員工 +
                    ]]>(中央社波特蘭11日電) + +全球運動用品供應商耐吉本週稍早控告3名前任員工,指控他們涉嫌竊取重要機密,洩露給競爭對手阿迪達斯,因此求償1000萬美元。 + +企業總部設於俄勒岡州比佛頓(Beaverton)的耐吉(Nike),8日向俄州蒙諾瑪郡(Multnomah County)郡法院遞狀控告曾經擔任球鞋設計師的德寇維克(Denis Dekovic)、杜查(Marc Dolce)、邁納(Mark Miner),指控3人今年4月間密謀竊取公司重要機密,包括設計資料、研究統計及行銷計畫,洩露給耐吉的競爭對...
                    + http://newtalk.tw/news/2014/12/12/54697.html + 2014-12-12 08:55:41 + http://newtalk.tw/news/2014/12/12/54697.html +
                    + + 澳學者:九合一選後 美國未必會施壓DPP +
                    ]]>新頭殼newtalk 2014.12.12洪聖斐/編譯報導 + +九合一選舉的結果,不僅使台灣政壇驚濤駭浪,國際社會也關注後續發展。《世界政治評論》(World Politics Review)前(10)日便登出對台灣特別有研究的澳大利亞學者艾金森(Joel Atkinson)的專訪。 + +談到此次選舉結果對東亞區域的衝擊時,艾金森除了指出這對中國而言是1次挫敗之外,也認為歐巴馬政權不會無端地對民進黨施壓,要該黨朝台灣人民不想要的方向前進。而且在美中兩國轉向競爭與衝突的情況下,美國也沒理由這樣做。 + ...
                    + http://newtalk.tw/news/2014/12/12/54696.html + 2014-12-12 08:37:44 + http://newtalk.tw/news/2014/12/12/54696.html +
                    + + 不願喊卡 柯文哲:12/14辦勞動局長投票 +
                    ]]>新頭殼newtalk2014.12.12 林朝億/台北報導 + +針對台北市長當選人柯文哲以遴選委員會挑選勞工局長一事,四位勞動局長參選人謝創智、 蔡瑞麟、胡博硯、林凱衡昨(11)日發表聯合聲明批評遴選委員會代表性不足、考官沒有足夠能力;他們呼籲,為了台北市勞工權益,柯文哲應該親自去了解勞動局的各面職掌,選出最適當、熟稔職務的勞動局長。不過,柯文哲雖然承認遴選過程有缺失,但不願喊卡,還是打算於12/14進行i-voting投票作業。 + +此外,截至昨晚為止,5位入圍的勞工局長候選人已有2位宣布退出;而...
                    + http://newtalk.tw/news/2014/12/11/54695.html + 2014-12-11 23:28:22 + http://newtalk.tw/news/2014/12/11/54695.html +
                    + + 婦團批媒體:靠報導女人性愛 獲取龐大利益 +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +針對劉喬安是否涉及賣淫所引起的相關報導,婦女新知基金會今(11)日發表聲明要媒體、社會停止集體獵殺,公審女人的性與隱私。他們批評,媒體見獵心喜、將個人隱私搬上檯面公審,網友則紛紛討論、訕笑錄像中劉喬安對於價碼及身體的自述,群起獵巫的心態及行徑,對劉喬安個人隱私窮追猛打、極盡挖掘,然而,對偷拍影片、揭露個人隱私的拍攝者卻少見質疑及輿論抨擊。 + +聲明指出,當劉喬安因為外型亮麗於無意間成為眾所注目的焦點,其私生活竟也不斷遭受侵擾和傷害,在反服...
                    + http://newtalk.tw/news/2014/12/11/54694.html + 2014-12-11 21:59:03 + http://newtalk.tw/news/2014/12/11/54694.html +
                    + + 微罪讓新移民難生活 綠委民團籲修法 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +新移民只要一有刑事紀錄,就不符現行國籍法中的規劃要件「品行端正,無犯罪紀錄」,無論罪刑多輕,都無法申請身分證,造成在台生活困難。對此,民進黨立委尤美女已提案修法,今(11)天召開記者會時更呼籲法務部和內政部趕快同意修改規定,讓台灣這塊土地上的人權不會被剝奪。 + +民進黨立委尤美女、民間司法改革基金會執行長高榮志、台灣新移民勞動權益促進會理事肖小翠等人陪同越南籍新移民小燕,今天下午在立法院召開記者會。 + +南洋姐妹會執行秘書洪滿枝說,小燕...
                    + http://newtalk.tw/news/2014/12/11/54693.html + 2014-12-11 19:11:29 + http://newtalk.tw/news/2014/12/11/54693.html +
                    + + 馬英九反悔退位?國民黨:真是想太多 +
                    ]]>新頭殼newtalk2014.12.11 謝莉慧/台北報導 + +日前宣布參選國民黨主席的資深媒體人周玉蔻質疑主席選舉黨員連署的必要性,國民黨今(11)日發布新聞稿指出,就國民黨主席選舉對政黨政治的重要性而言,規定參選黨主席須達黨員3%連署門檻,絕非違反民主原則,反而是有利選民決定的制度設計,因此我國《總統副總統選舉罷免法》也有類似規定。另黨發言人陳以信也表示,一旦新的黨主席產生,前主席馬英九絕不會據黨章第17條提出訴訟,挑戰新任主席的正當性,提出這類政治陰謀的人,「真的是想太多」。 + +至於規定10天...
                    + http://newtalk.tw/news/2014/12/11/54687.html + 2014-12-11 19:03:05 + http://newtalk.tw/news/2014/12/11/54687.html +
                    + + 謝長廷玩起自拍神器 還懂得啥是GG +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +已經68歲的謝長廷真得沒上限,他曾說過,每一年都要學一樣新的事物。人在英國訪問的他,今(11)日在臉書貼出用自拍神器拍的照片說,「巨石陣,我來了!台灣的自拍神器超好用。遠古壯觀的遺跡容易令人遐想外星文明,聽說這附近有不少麥田圈,可惜凍了半天已快GG,再找機會!」 + +看到謝長廷臉書po文,網友表示,「哈哈哈~~院長也用鄉民語言了~~~GG用的好呀~~」。所謂「GG」,是英文「Good Game」的簡寫,原本是在線上遊戲對戰中,輸的一方說的...
                    + http://newtalk.tw/news/2014/12/11/54692.html + 2014-12-11 18:59:02 + http://newtalk.tw/news/2014/12/11/54692.html +
                    + + 陳德銘來台才起訴 黑島青批打小孩給外人看 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +對於檢察官今(11)日對6/26以鐵鍊綁身阻擋中國國台辦主任張志軍座車的黑色島國青年陣線總召魏揚等8人,以妨害自由等罪起訴,黑島青表示,他們坦然接受司法程序。不過他們也指出,此起訴的時間點相當耐人尋味,「恰好」是海協會會長陳德銘訪台期間。他們批評,檢方大動作掀出擱置將近半年的案件,一口氣起訴8人,「打自家孩子給外人看」的意味濃厚,這種意圖昭然若揭的行徑,他們深感可笑。 + +抗議中國國台辦主任張志軍來台,黑色島國青年陣線總召魏揚、賴品妤、激...
                    + http://newtalk.tw/news/2014/12/11/54690.html + 2014-12-11 18:57:06 + http://newtalk.tw/news/2014/12/11/54690.html +
                    + + 連署破5萬! 罷免蔡正元邁入3階投票 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/台北報導 + +割闌尾團隊今(11)日宣布,截至昨天世界人權日,割闌尾計畫收取到蔡正元罷免連署書51,594份,距離罷免第2階段的門檻38,939份超收12,655份,且尚未統計完畢。割闌尾表示,「我們一起做到了!」台灣必將出現第3階段的罷免投票。 + +割闌尾團隊今天發出聲明稿,表示將在12月15日早上前往台北市選舉委員會送件。在此之前,在早上9點30分於選委會外舉辦「罷免民主慶典」,歡迎民眾來跟5萬份的罷免連署書打卡拍照。 + +割闌尾也呼籲,戶籍位於...
                    + http://newtalk.tw/news/2014/12/11/54689.html + 2014-12-11 18:49:01 + http://newtalk.tw/news/2014/12/11/54689.html +
                    + + 拜會胡志強 林佳龍籲胡當城市大使 +
                    ]]>新頭殼newtalk2014.12.11 鄭進興/台中報導 + +台中市長當選人林佳龍今(11)日到市府拜會現任市長胡志強,胡志強表示,選舉已經結束,沒有對立和競爭,未來只有承諾和託付,如有需要他仍會全力協助台中發展。林佳龍則肯定胡志強為台中市奠定基礎的努力,表示胡志強和台中市已經分不開,拜託他繼續擔任城市大使或志工,持續行銷台中。 + +林佳龍要求市府開一個交接窗口,胡志強則指示由人事處負責。至於台中現正推行的多項重大建設,林佳龍表示,政府是延續的,依法行政,在既有基礎上邊做邊修,讓業務無縫接軌,他...
                    + http://newtalk.tw/news/2014/12/11/54691.html + 2014-12-11 18:41:08 + http://newtalk.tw/news/2014/12/11/54691.html +
                    + + 補充保費扣繳下限放寬 80萬中低收入戶受惠 +
                    ]]>新頭殼newtalk2014.12.11 翁嫆琄/台北報導 + +衛福部今(11)日宣布,自明年1月1日起,將全面放寬中低收入民眾之補充保險費扣費標準,包含利息、股利、租金及執行業務收入,單筆扣費下限一律比照兼職所得,由現在的5千元調整為基本工資19273元,預估約有80萬中低收入民眾可以適用。 + +行政院長毛治國曾於12月8日拜會立法院,會中立法院長王金平及立委提醒應檢討補充保險費,毛即指示衛福部研議檢討,適度減輕中低收入民眾負擔,最後決定放寬扣繳下限。 + +社會保險司長曲同光表示,這次放寬是繼今年...
                    + http://newtalk.tw/news/2014/12/11/54688.html + 2014-12-11 18:29:09 + http://newtalk.tw/news/2014/12/11/54688.html +
                    + + 檢翻去年舊案同318一起問 陳為廷:很誇張 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +太陽花學運領袖陳為廷今(11)日下午因為318學運案件出庭,但除了318學運部分外,檢察官還連1年前的2個舊案一起訊問,並指稱陳為廷去年10/10開宣傳車撞傷26名警察,讓陳為廷痛批不但不符合事實,把陳年舊案翻出來問也是太誇張。 + +陳為廷在下午2點50分出庭,走出北檢時卻已經是5點。陳的辯護律師邱顯智表示,除了318學運的案子外,檢方還拿出陳的其他2件案子,包括陳為廷去年7/31服貿公聽會時,陳當時站在圍牆上,而警察拿盾牌推擠他,他為了...
                    + http://newtalk.tw/news/2014/12/11/54682.html + 2014-12-11 18:24:09 + http://newtalk.tw/news/2014/12/11/54682.html +
                    + + 許信良挺雙首長制:問題在藍政黨文化 +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +9合1大選後,憲改呼聲再起,而現在的憲政體制,備受學界質疑。對此,曾與李登輝協商參與1997年修憲的前民進黨主席許信良今(11)日在臉書替雙首長制辯護,並質疑內閣制真的會比較好嗎?他認為問題出在國會多數黨國民黨少了一個民主政黨所需的文化,同時,台灣人民也不可能接受一個民選的總統卻是虛位元首的情形。 + +以下是許信良臉書全文: + +也談憲改 + +現在,有太多人夸夸而談憲改,卻太少人認真去瞭解不同的憲政體制可能產生的真正憲政意義和作用。 ...
                    + http://newtalk.tw/news/2014/12/11/54686.html + 2014-12-11 18:15:06 + http://newtalk.tw/news/2014/12/11/54686.html +
                    + + 遴選爭議 「柯P新政進度條」提2方案票選 +
                    ]]>新頭殼newtalk2014.12.11 周佑政/綜合報導 + +台北市長當選人柯文哲推出勞動局長「I-Voting」活動,昨晚公布最後5人決選名單,但卻引發外界質疑公正性。對此,日前成立的「柯P新政進度條」臉書粉絲團今(11)日推出「搶救I-Voting」活動,提出2種「補救方案」,盼透過網路投票,讓民眾重新選擇遴選方式,「讓網路聲音傳出去」。 + +新任台北市勞動局長5人決選名單包括前勞委會主任秘書賀端蕃、律師陳明正、交通大學助理教授曾芳代、台灣金融業工會聯合會資深顧問黃正道,及兆豐金控工會理事長吳世...
                    + http://newtalk.tw/news/2014/12/11/54684.html + 2014-12-11 18:10:05 + http://newtalk.tw/news/2014/12/11/54684.html +
                    + + 佔中強制清場 何韻詩、黎智英遭逮捕 +
                    ]]>新頭殼newtalk2014.12.11 周佑政/綜合報導 + +香港警方今(11)日針對港人「佔中」行動進行最後清場,下午2時許開始排除包括行人在內的「障礙物」。學生領袖周永康、20餘名泛民主派議員、壹傳媒主席黎智英及藝人何韻詩等人一早就在場靜坐「等候被捕」;下午5時許,黎智英、何韻詩等人遭逮捕,何臨走時仍帶領民眾大喊:「我要真普選!」 + +根據香港獨立媒體網報導,警方宣布全面清場後,開始強制拉人。不過,包括香港專上學生聯會(學聯)、學民思潮等學生團體主要成員,超過20名立法會泛民議員仍持續在添華道夏...
                    + http://newtalk.tw/news/2014/12/11/54685.html + 2014-12-11 17:57:04 + http://newtalk.tw/news/2014/12/11/54685.html +
                    + + 陳德銘會台媒 陸委會:意見交換 無須多臆測 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/台北報導 + +中國海協會會長陳德銘昨日邀約台灣部分媒體高層進行早餐會惹議,陸委會副主委吳美紅今(11)日在例行記者會上表示,陳德銘曾任商務部部長,對於以往工作與台灣媒體高層進行意見交換,外界不須過多臆測。 + +海協會長陳德銘在10日與台灣媒體主管早餐會,溝通亞太經濟一體化路徑、中韓FTA等議題,遭外界質疑是想介入台灣媒體報導內容。陳德銘會中更指出,中韓服貿協議「2年內」落實,這「2年」有等待台灣通過服貿之意。 + +對此,陸委會副主委吳美紅表示,這次陳...
                    + http://newtalk.tw/news/2014/12/11/54683.html + 2014-12-11 17:49:03 + http://newtalk.tw/news/2014/12/11/54683.html +
                    + + 禮讓陳為廷? 綠苗栗黨部反彈執意要推人 +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +對於清大學生陳為廷有意參選苗栗縣立委補選,而民進黨中央又有可能禮讓他。民進黨苗栗縣黨部執委會今(11)日下午以6比3通過建議黨中央,為了深耕基層,民進黨在當地應提名黨籍候選人參與立委補選。 + +民進黨中執會昨日敲定,對於明年2/7立委補選,黨中央將於今年12/24前完成提名作業。對於陳為廷參選,民進黨也預留協調空間指出,若有特殊選情地區,則由2014年選對會決定方案,提請中執會通過後執行之。而陳為廷今日受訪時,也透露出願意跟在野協調態度。...
                    + http://newtalk.tw/news/2014/12/11/54681.html + 2014-12-11 17:36:07 + http://newtalk.tw/news/2014/12/11/54681.html +
                    + + 為318出庭 陳為廷要檢察官祝他生日快樂 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +9合1選後,檢方陸續起訴、傳喚318學運相關人士,學運領袖陳為廷今(11)日也因為318案件出庭。對於很多伙伴遭秋後算帳,他痛批到現在還找不到打人的警察,並呼籲檢方不要只辦抗爭者,對於警方的加暴者一樣要嚴格偵辦。而今天剛好是他24歲生日,他還笑說,「希望檢察官祝我生日快樂」。 + +對於黑色島國青年陣線成員魏揚因為6月鐵鍊綁身阻擋中國國台辦主任張志軍座車,今天遭到檢方起訴。陳為廷下午到北檢出庭前受訪時表示,過去很多伙伴在這段時間陸續被秋後算...
                    + http://newtalk.tw/news/2014/12/11/54679.html + 2014-12-11 17:13:07 + http://newtalk.tw/news/2014/12/11/54679.html +
                    + + 郝龍斌:若沒人願選黨主席 我會慎重考慮 +
                    ]]>新頭殼newtalk2014.12.11 劉奕霆/台北報導 + +國民黨9合1選戰大敗,台北市長郝龍斌今(11)日下午在任內最後一場媒體有約中表示,他認為目前國民黨正遭遇最艱困的時刻,黨主席應有人出面角逐,若真的沒有人願意出來,「我會慎重考慮」。另外,郝龍斌也主張黨主席應與總統脫鉤,但無論如何,2016他不會角逐總統大位。 + +郝龍斌下午進行任內最後一場媒體有約,他表示,目前國民黨正遭遇最艱困的時刻,現在外界雖然覺得黨主席選舉有點混沌,沒人積極參選,但他相信現在黨最艱困的時刻,黨主席雖然是辛苦的工作,...
                    + http://newtalk.tw/news/2014/12/11/54680.html + 2014-12-11 17:08:08 + http://newtalk.tw/news/2014/12/11/54680.html +
                    + + 小心!手機正在破壞你的感情關係 +
                    ]]>新頭殼newtalk2014.12.11 張揚/綜合報導 + +生活裡Line 、Twitter、Wechat愈來愈多的即時訊息傳送工具正在破壞家人或情侶之間的互動與美好關係。許多科學家研究指出,電子科技產品固然讓人類的生活更有效率、更有樂趣〈如手機上的遊戲〉,然而,伴隨手機內附即時訊息軟體的蓬勃發展,傳統人類感情的美好經驗已經走味。 + +紐約時報報導指出,越來越多的心理研究機構正在研究科技對愛情生活和友情造成的影響,研究結果似乎傳遞出了這種信息。 + +對很多情侶來說,科技是一把雙刃劍。手機或平板電腦...
                    + http://newtalk.tw/news/2014/12/11/54677.html + 2014-12-11 17:01:05 + http://newtalk.tw/news/2014/12/11/54677.html +
                    + + 測試跑道延誤航班 葉匡時:跟國外比好很多 +
                    ]]>新頭殼newtalk2014.12.11 翁嫆琄/台北報導 + +桃園機場南跑道預計明年1月8日啟用,但民航局需進行1個月的飛航測試,造成多架航班延誤,光今(11)日就有20多航班、4、5千名旅客受到影響,引發民怨。對此,交通部長葉匡時接受媒體專訪時回應,機場航班延誤是常見的事,上海、北京甚至美國,都常會遇到班機延誤的事情,「比較之後就會知道,我們其實已經好很多了」。 + +針對南跑道的測試造成旅客困擾,桃園機場公司表示,因應桃園機場南跑道啟用,民航局從12月8日起,到明年1月7日預計進行1個月的各項安全...
                    + http://newtalk.tw/news/2014/12/11/54675.html + 2014-12-11 16:37:05 + http://newtalk.tw/news/2014/12/11/54675.html +
                    + + 選立委 陳為廷:別相信我不會變 請監督我 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +太陽花學運領袖陳為廷日前表態參加苗栗立委補選,對於有人質疑他參選是想要牟取政治利益,讓原本的運動變質,陳為廷今(11)日解釋,如果他真的要獲取政治利益的話,不用挑苗栗這麼艱困的選區,他想進入立法院,目的是讓苗栗的議題、太陽花運動的訴求落實。他說,「不要相信我不會變,不要信任我,沒有一個政治人物值得被信任,希望所有人參與一起監督我」。 + +陳為廷今天下午因為318學運案件出庭,出庭前他接受媒體訪問時說,投入補選重要目的是進入立法院,讓苗栗的...
                    + http://newtalk.tw/news/2014/12/11/54678.html + 2014-12-11 16:26:05 + http://newtalk.tw/news/2014/12/11/54678.html +
                    + + 訪慈濟未遇證嚴 陳德銘:約好台南見 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/綜合報導 + +中國海協會長陳德銘來台第3天,今(11)日上午前往花蓮慈濟志業園區參訪,由於慈濟創辦人證嚴法師已安排在歲末進行全台行腳,並不在園區內。但是,陳德銘透露,自己已安排14日在台南與證嚴見面。 + +陳德銘今天在海基會董事長林中森陪同下訪問花蓮慈濟志業園區,考察台灣的志工團體發展,由慈濟基金會副總執行長林碧玉接待。 + +林碧玉說,兩岸血濃於水,台灣的祖先過去來自中國,因此慈濟秉持「用愛搭起兩岸的橋樑」與中國交流,也以慈濟的核心價值「誠」來接待貴...
                    + http://newtalk.tw/news/2014/12/11/54676.html + 2014-12-11 16:17:05 + http://newtalk.tw/news/2014/12/11/54676.html +
                    + + 破球員兼裁判批評 吳世哲退出勞動局長決選 +
                    ]]>新頭殼newtalk2014.12.11 劉奕霆/台北報導 + +台北市長當選人柯文哲推動勞動局長由全台北市民票選,柯文哲辦公室今(11)日上午宣布經遴選委員會選出的最後5位決選人。其中一位決選人兆豐金控工會理事長吳世哲下午隨即召開記者會,宣布退出此次勞動局長遴選。吳世哲說,這全然是他自己思考所做的決定,外界對他曾任遴選委員又參加遴選,產生「球員兼裁判」的質疑,他認為柯文哲「I-voting」這麼好的理念,不能因為他個人失敗,傷害不斷擴大,所以才決定退選。 + +吳世哲在柯文哲黨政平台秘書長李應元、勞動局...
                    + http://newtalk.tw/news/2014/12/11/54673.html + 2014-12-11 15:55:08 + http://newtalk.tw/news/2014/12/11/54673.html +
                    + + 9合1檢討大會 內政部:「投負票」可討論 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/台北報導 + +立法院內政委員會今(11)日上午舉行「9合1選舉檢討暨未來公職人員選舉制度改革」公聽會,內政部次長陳純敬表示,外界有「投負票」的構想,當民眾不喜歡1號,但更恨2號,就可以投2號負票,最後開票時正負相加。他說,這是否合適,可由社會公評。 + +中選會今年首度舉辦9合1地方選舉,是台灣選舉史上最大規模,過程中也引發諸多爭議。今天公聽會邀請未來事件交易所執行長洪耀南、翻轉選舉運動發起人賴中強、國策院副研究員陳華昇等專家學者出席,會中提出許多選制改...
                    + http://newtalk.tw/news/2014/12/11/54674.html + 2014-12-11 15:24:08 + http://newtalk.tw/news/2014/12/11/54674.html +
                    + + 謝長廷:至少8年 國民黨才能復原 +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +前行政院長謝長廷今(11)日前往倫敦大學亞非學院拜訪院長Paul Webley教授,並參加2014對政局影響的座談,由Dafydd Fell博士主持。謝長廷表示,國民黨這次「災難性敗北」,失去民意支持應是個趨勢,即使恢復也要至少8年,不會有立即的鐘擺效應。 + +謝長廷表示,國民黨這次「災難性敗北」的原因在於國民黨地方縣市長的政績不良、馬英九中央執政滿意度低,以及民進黨團結等因素,選前即預測民進黨可以拿到9-10個縣市。最後民進黨贏得13縣...
                    + http://newtalk.tw/news/2014/12/11/54672.html + 2014-12-11 15:16:04 + http://newtalk.tw/news/2014/12/11/54672.html +
                    + + 拖延+關說?黃世銘可望領1200萬退休金 +
                    ]]>新頭殼newtalk2014.12.11 謝莉慧/綜合報導 + +前特偵組檢察總長黃世銘被控洩密案的原告民進黨立委柯建銘今(11)日赴高院出庭前,向媒體爆料黃世銘因為擔心提前遭到判刑定讞,會影響其1200多萬的退休金,竟以書狀向審判長「關說」。黃世銘日前已申請於明年1月6日退休獲准,但如果在此之前遭判刑定讞,恐致退休金泡湯,不過合議庭今天已諭知將於明年1月8日再開庭,等於確定只要銓敘部放行,黃世銘就可以如願領到退休金了。 + +高院今早開庭辯論前,柯建銘向媒體秀出今年9月5日黃世銘陳報審判長許宗和的上訴理...
                    + http://newtalk.tw/news/2014/12/11/54671.html + 2014-12-11 15:08:05 + http://newtalk.tw/news/2014/12/11/54671.html +
                    + + 《時代》年度風雲人物:無懼的伊波拉鬥士 +
                    ]]>新頭殼newtalk2014.12.11 周佑政/綜合報導 + +美國《時代》(TIME)雜誌2014年度風雲人物(Person of the Year)10日揭曉,由在全球各地抗伊波拉病毒的前線醫護人員獲選。《時代》指出,這群伊波拉鬥士(The Ebola Fighters)勇敢無懼,為拯救生命甘願承擔感染風險,因為他們的無私,各地的人們才有更充裕的時間對抗病毒、晚上才能睡得安穩。 + +《時代》雜誌總編輯吉布斯(Nancy Gibbs)說,「真正的戰爭靠的不是閃亮的武器,而是英雄之心。」如果伊波拉鬥士...
                    + http://newtalk.tw/news/2014/12/11/54670.html + 2014-12-11 14:09:01 + http://newtalk.tw/news/2014/12/11/54670.html +
                    + + 洪秀柱呼籲世代交替 盼黨內青壯派站出來 +
                    ]]>新頭殼newtalk2014.12.11 謝莉慧/台北報導 + +中國國民黨副主席兼代理秘書長洪秀柱今(11)日呼籲世代交替,希望黨內青壯有志之士能站出來,勇於承擔、無私奉獻,帶領全黨謙卑檢討,重新贏回社會對國民黨的信賴。 + +洪秀柱今天由組發會主委蘇俊賓陪同,主持「2015年黨主席補選有關事項」公告張貼儀式後,接受媒體訪問,做了以上表示。 + +洪秀柱說,這次9合1選舉,雖然民眾用選票教訓了國民黨,但這也是國民黨改革的契機。針對媒體詢問,有33位黨籍立委連署希望新北市長朱立倫參選黨主席,洪秀柱回應,新...
                    + http://newtalk.tw/news/2014/12/11/54666.html + 2014-12-11 14:00:04 + http://newtalk.tw/news/2014/12/11/54666.html +
                    + + 朝野連署過門檻 修憲委員會可望成立 +
                    ]]>新頭殼newtalk2014.12.11 翁嫆琄/台北報導 + +9合1選舉後,檢討修憲的聲浪四起,國民黨立委江啟臣今(11)日與朝野立委共同召開記者會,宣布成立「修憲委員會」的提案已達到連署門檻,將正式送到院會。若順利成立,未來關於修憲的提案都能在該委員會審查,例如選舉投票年齡是否該下修至18歲、該採總統制還是內閣制等。 + +江啟臣日前提案成立「修憲委員會」,目前經36位立委連署通過提案門檻,今天正式送進院會,未來可望成立修憲委員會。若委員會成立,應有39位立委可參與,各政黨將有多少人參與,將再朝野協...
                    + http://newtalk.tw/news/2014/12/11/54669.html + 2014-12-11 13:54:03 + http://newtalk.tw/news/2014/12/11/54669.html +
                    + + 馬英九:新內閣以貼近民意態度提對策 +
                    ]]>新頭殼newtalk2014.12.11 謝莉慧/台北報導 + +總統馬英九今(11)日表示,9合1選舉後,政治版圖有大變動,顯示政府還不夠努力,民眾不滿意。但是,新內閣組成後,不論是油價下降或是電價盈餘回饋等政策,以及處理頂新集團在台北101股權轉換等問題,政府都是採取貼近民意的態度來提出因應對策。 + +馬英九今天接見中華民國工業協進會理監事暨23縣市工業會理事長時,做了以上表示。 + +馬英九指出,10月國內失業率3.95%,是7年來最低數字,比他上任前還要低,經濟情況也確實在穩定復甦中,目前年輕人...
                    + http://newtalk.tw/news/2014/12/11/54668.html + 2014-12-11 13:45:04 + http://newtalk.tw/news/2014/12/11/54668.html +
                    + + 蔡壁如入市府? 柯P:只是借調當秘書 +
                    ]]>新頭殼newtalk2014.12.11 劉奕霆/台北報導 + +台北市長當選人柯文哲昨接受《蘋果》專訪時表示,他決定把老戰友、台大葉克膜小組組長蔡壁如調到台北市長辦公室,因為「要有人講實話」、「應該需要可以講實話的朋友」。柯文哲今(11)日上午被問到蔡壁如入市府的問題時表示,他會借調蔡來當秘書,畢竟是工作20年的部屬,「有些東西她(指蔡)最熟悉」,包括人脈,所以只是借調到台北市政府當秘書,不要想太多。 + +柯文哲昨接受蘋果專訪時,談到未來面臨的可能局面,除了認為自己要有哲學修養外,也說要知道自己的缺點...
                    + http://newtalk.tw/news/2014/12/11/54667.html + 2014-12-11 13:29:05 + http://newtalk.tw/news/2014/12/11/54667.html +
                    + + 立委批開票瑕疵 中選會:在座也是我們辦的 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/台北報導 + +立法院內政委員會今(11)日召開9合1選舉檢討與改革公聽會,台聯立委周倪安質疑,開票有諸多瑕疵,若不開放民眾攝錄影,如何有效監督。對此,中選會法政處處長賴錦珖為選務人員抱屈,指民眾都在一旁圍觀,並無任何舞弊的空間。他也強調,「在座委員也都是我們辦出來的。」 + +立法院內政委員會今天上午舉行「9合1選舉檢討暨未來公職人員選舉制度改革」公聽會,邀請許多專家學者表達意見,提出有關政黨補助、競選活動限制、降低投票年齡等建議。 + +其中,監票者聯...
                    + http://newtalk.tw/news/2014/12/11/54665.html + 2014-12-11 13:08:03 + http://newtalk.tw/news/2014/12/11/54665.html +
                    + + 民調:近半民眾認為國民黨將被淘汰 +
                    ]]>新頭殼newtalk2014.12.11 林朝億/台北報導 + +9合1選舉結果,民進黨贏得13個縣市、國民黨6個縣市,閣揆江宜樺辭職下台,馬總統請辭黨主席。台灣指標民調(TISR)今(11)日發布最新民調顯示,49.2%認為國民黨很難再改變甚至會被民眾淘汰,29.5%表示國民黨有能力改革成為更具競爭力的政黨,21.2%未明確表態。 + +台灣指標民調今日發布最新民調,民眾對政治面評價之總統與行政院長表現,有18.9%信任馬總統、67.1%不信任,與11月下期調查相較,正向評價減少3.0個百分點,負面評價...
                    + http://newtalk.tw/news/2014/12/11/54664.html + 2014-12-11 12:59:05 + http://newtalk.tw/news/2014/12/11/54664.html +
                    + + 遴選勞動局長屢挨批 柯P坦承制度有問題 +
                    ]]>新頭殼newtalk2014.12.11 劉奕霆/台北報導 + +台北市長當選人柯文哲新市府首位「民選」勞動局長,昨天進行遴選委員會和10位備選人的第二階段面談,柯文哲辦公室在今(11)日上午公布最後出爐的5位決選人。柯文哲也在上午的記者會上現身,他在會後坦承,這次的勞動局長遴選有幾個問題,其中在遴選辦法中,並沒有規定遴選委員不得中途退出變成候選人,未來會針對這次的制度檢討所犯的錯誤,將來若還有機會要遴選局長 會再設計,再擬一套制度。 + +在這次勞動局長的遴選過程中,第一階段共有45人完成登記程序,經過...
                    + http://newtalk.tw/news/2014/12/11/54663.html + 2014-12-11 12:40:05 + http://newtalk.tw/news/2014/12/11/54663.html +
                    + + 鐵鍊纏身擋張志軍座車 魏揚8人遭起訴 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +為了抗議中國國台辦主任張志軍來台,黑色島國青年總召魏揚、賴品妤、激進成員陳威仲等人今年6/26在烏來山區道路上,以鐵鍊綁身方式阻擋張志軍車隊經過。台北地檢署今(11)天依妨害自由、妨害公眾往來安全等罪,將魏揚等8人起訴。
 + +中國國台辦主任張志軍今年6月來台,26日下午4點到烏來參加原住民研討會,在唯一通行道路新烏路10.2K處卻遭到黑色島國青年總召魏揚、賴品妤、激進成員陳威仲等人突襲,魏揚等人突然在兩車道拉上鐵鍊封鎖道路,並將鐵鍊纏繞...
                    + http://newtalk.tw/news/2014/12/11/54662.html + 2014-12-11 12:24:05 + http://newtalk.tw/news/2014/12/11/54662.html +
                    + + 拱朱跳火坑 33藍委連署籲朱立倫選黨主席 +
                    ]]>新頭殼newtalk2014.12.11 翁嫆琄/台北報導 + +國民黨今(11)日張貼黨主席補選公告,33名國民黨立委也連署力挺新北市長朱立倫參選新任黨主席。發起連署的國民黨立委廖正井表示,朱立倫溝通能力強,是各黨派都能接受的人選,盼朱帶領國民黨走出低潮;藍委丁守中也指出,國民黨需要世代交替,希望朱立倫能「跳火坑」承擔起這個責任。 + +國民黨主席究竟會由誰接任?目前朱立倫的支持聲浪最高,連藍委都紛紛連署拱朱出來參選。廖正井表示,連署過程相當順利,立委們認為朱立倫年輕、體察民意、貼近基層又具有民意基礎,...
                    + http://newtalk.tw/news/2014/12/11/54661.html + 2014-12-11 12:12:01 + http://newtalk.tw/news/2014/12/11/54661.html +
                    + + 修房地合一稅制 巢運籲財政部履約別退縮 +
                    ]]>新頭殼newtalk2014.12.11 林雨佑/台北報導 + +「政府不能退,『利』委不要擋,建商閃邊去!」公平稅改聯盟、巢運等團體今(11)日召開記者會,要求財政部履行承諾,如期推動「房地合一,實價課稅」稅制改革,明年將法案送交立法院審議,改革長期扭曲的房地產市場。否則,巢運表示將再度動員到財政部抗議;對於反對法案的立委,巢運也揚言會公布該立委個人和家族的房地產交易,供社會檢驗。 + +財政部規劃明年要修房地合一稅制,以5%到45%等6級累進稅率、取代目前20%的單一稅率,雖然還在討論階段,卻已傳出部...
                    + http://newtalk.tw/news/2014/12/11/54641.html + 2014-12-11 12:03:05 + http://newtalk.tw/news/2014/12/11/54641.html +
                    + + 陳德銘會台媒高層 賴中強:中共宣傳部作法 +
                    ]]>新頭殼newtalk2014.12.11 邱珮文/台北報導 + +中國海協會會長陳德銘昨日與台灣部分媒體主管進行早餐會,溝通亞太經濟一體化路徑、中韓FTA等議題。經濟民主連合召集人賴中強今(11)日在臉書質疑,陳德銘希望透過媒體高層影響記者的報導,這是中國「中宣部(中共中央宣傳部)」的作法,陳把「統一媒體口徑」這一套搬到台灣,而部分媒體高層隨之起舞,令人遺憾。 + +根據《風傳媒》昨日報導,海協會長陳德銘在10日與台灣媒體主管早餐會中指出,「我們能給韓國的,都會給台灣,韓國給我們的,台灣給不給?」他也對台...
                    + http://newtalk.tw/news/2014/12/11/54660.html + 2014-12-11 11:49:06 + http://newtalk.tw/news/2014/12/11/54660.html +
                    + + 支持廢大戶條款 曾銘宗:買越多折扣越多 +
                    ]]>新頭殼newtalk2014.12.11 翁嫆琄/台北報導 + +備受爭議的證所稅「大戶條款」即將於下週三審查,這次修法決定未來交易股票超過一定門檻時是否得繳稅。財政部長張盛和日前稱此法「宜修不宜廢」,但金管會主委曾銘宗今(11)日表態支持廢除,他強調,一般買越多折扣越多,台股交易越多卻要課更多稅,不合邏輯。 + +財政部訂定「大戶條款」,要求大戶每年股市交易超過10億元就得繳稅,雖然規定還未實施,但國民黨立委羅明才已在10月時提案將10億提高至50億,目前更有許多業界人士要求廢除,爭議不斷。 + +對此...
                    + http://newtalk.tw/news/2014/12/11/54659.html + 2014-12-11 11:37:06 + http://newtalk.tw/news/2014/12/11/54659.html +
                    + + 旗津黃金海珍珠 傳來海的聲音 +
                    ]]>新頭殼newtalk2014.12.11 金名/高雄報導 + +高雄港務分公司在旗津海岸公園打造公共藝術「黃金海韻-海珍珠」,巨大的黃金貝殼迎著海面,在夕陽餘暉映照下,猶如海上明珠,閃亮發光。6具造型如耳的採集音器,散落在貝殼周邊,海風吹拂、浪濤拍岸,音效環繞,不絕於耳。 + +由藝術家林舜龍與法國聲音藝術家葉澎生(Yannick Dauby)攜手打造的「黃金海珍珠」以半圓形海貝殼為造型,並以金色為主色,展現金色蒼穹的意象,藉由不同角度的陽光照射,展現深淺不一的黃金色澤,變化萬千,風情多樣,入夜後,藉船隻...
                    + http://newtalk.tw/news/2014/12/11/54658.html + 2014-12-11 11:16:03 + http://newtalk.tw/news/2014/12/11/54658.html +
                    + + 長達2.5個月!港府今擬清場雨傘運動 +
                    ]]>新頭殼newtalk2014.12.11 鄭凱榕/編譯報導 + +香港當局11日上午著手清除以金鐘為主的禁制令範圍內的障礙物和帳篷,擬結束長達2.5個月的香港雨傘運動。學聯秘書長周永康再次呼籲,今天雖然清場,「但不是終結」,來日不合作運動會繼續。 + +根據日本共同通信社11日香港報導,香港島上的金鐘,是大規模示威抗議的最大據點,學生們在幹線道上設置障礙物和帳篷。警方投入7千名警力,宣示若有示威群眾抵抗將立即逮捕。 + +為了追求下次香港特區行政長關選舉的民主化,雨傘運動示威抗議從9月28日開始,這是19...
                    + http://newtalk.tw/news/2014/12/11/54657.html + 2014-12-11 10:51:16 + http://newtalk.tw/news/2014/12/11/54657.html +
                    + + 網路環境指數北歐佔前3 監控風險增加 + 新頭殼newtalk2014.12.11 鄭凱榕/編譯報導 + +為了促進有效利用網際網路而成立的國際組織「全球資訊網基金會」(World Wide Web Foundation) 11日公布全球網路環境指標,丹麥第1,台灣不在調查範圍內。 + +根據日本共同通信社11日倫敦報導,這項從2012年開始每年發表的網路環境指標排名,是以世界上86個國家為對象,調查網路的普及度和透明性。前3名都是北歐國家:丹麥第1、芬蘭第2、挪威第3。 + +調查對象中,有超過8成的國家在防止監視網路的法規上並不齊備,相較於去... + http://newtalk.tw/news/2014/12/11/54656.html + 2014-12-11 10:29:02 + http://newtalk.tw/news/2014/12/11/54656.html + + + 拉美專家:台灣在加勒比海節節敗退 +
                    ]]>新頭殼newtalk 2014.12.11洪聖斐/編譯報導 + +馬英九上台以來,不斷以「外交休兵」來自我肯定。然而,國際上的專家卻未必同意這樣的說法。 + +《拉丁美洲先驅論壇報》(Latin American Herald Tribune)引用西班牙埃菲通訊社(Efe)於台灣時間今(11)日上午所發出的1則電訊報導中,引述了多位拉丁美洲專家的見解,指出台灣在加勒比海地區已經隨著中國的經濟勢力擴張而節節敗退。 + +1970年代加勒比海各島國紛獨立後,台灣和中國便在此地展開外交承認的爭奪戰。台灣現存的2...
                    + http://newtalk.tw/news/2014/12/11/54655.html + 2014-12-11 10:09:05 + http://newtalk.tw/news/2014/12/11/54655.html +
                    + + 先別管摩鐵阿基師了,你知道陳德銘嗎? +
                    ]]>新頭殼newtalk2014.12.11 鄭凱榕/綜合報導 + +先別管阿基師上摩鐵了,你知道海協會會長陳德銘來台已經第3天了嗎? + +有網友諷刺台灣媒體和觀眾只追逐「性高采烈」的花邊新聞,忽略真正重要的資訊,刻意在社群網站上分享聳動的標題:「獨家!亂倫!○○○外遇的對象竟然是自己失散已久的親骨肉!」,點進去則是以「陳德銘」為關鍵字的Google新聞。 + +中國海峽兩岸關係協會會長陳德銘9日來台抵達機場開始,一路遭嗆抗議。他此行以醫療養生、農業生技、旅遊觀光、志工等項目為參訪重點。 + +陳德銘10日...
                    + http://newtalk.tw/news/2014/12/11/54654.html + 2014-12-11 09:28:00 + http://newtalk.tw/news/2014/12/11/54654.html +
                    + + 陳菊:綠南台灣合作平台 納入澎湖 +
                    ]]>新頭殼newtalk2014.12.11 金名/高雄報導 + +高雄市長陳菊昨(10)日表示,高雄、台南、屏東已建立長期合作關係,未來將結合澎湖,形成南台灣共同生活圈,在區域治理上建立共同發展的合作平臺。 + +屏東縣長當選人潘孟安昨天率幕僚團隊拜會陳菊,陳菊針對南台灣共同生活圈作此發言。潘孟安則表示,高雄發展的經驗是屏東學習的方向,為避免6都效應造成的邊緣化,將與高雄、台南攜手合作,彼此競爭與合作。 + +潘孟安指出,屏東屬於農業縣,資源較為缺乏,高雄發展的經驗是屏東學習的方向,為避免6都效應造成的邊緣...
                    + http://newtalk.tw/news/2014/12/11/54653.html + 2014-12-11 00:16:42 + http://newtalk.tw/news/2014/12/11/54653.html +
                    + + 選黨主席? 朱立倫:適當時機、場合再說 +
                    ]]>新頭殼newtalk2014.12.11 陳冠廷/新北報導 + +國民黨立委廖正井徵求黨籍立委的連署,支持新北市長朱立倫競選黨主席,目前已獲得28位立委連署的看法?新北市長朱立倫昨(10)日強調,現在是多做事、少說話,至於黨的事情,適當的時機、適當的場合會跟大家報告。 + +朱立倫昨晚在社會局長李麗圳、新聞局長林芥佑的陪同下,出席在新北市政府3樓多功能集會堂舉行的「愛‧輪轉扶輪關懷弱勢團體慈善音樂會」,這也是朱立倫今天唯一的市政行程;媒體詢問朱立倫「國民黨立委廖正井徵求黨籍立委的連署,支持新北市長朱立...
                    + http://newtalk.tw/news/2014/12/11/54652.html + 2014-12-11 00:03:52 + http://newtalk.tw/news/2014/12/11/54652.html +
                    + + 德國人權專員呼籲台灣暫停執行死刑 +
                    ]]>新頭殼newtalk2014.12.10 林育立/柏林報導 + +今(10)日是國際人權日。德國官員表示,死刑殘忍而且不人道,鼓勵台灣暫時執行死刑,朝廢除死刑的目標邁進。 + +廢除死刑是世界趨勢,全球超過三分之二的國家都不再執行死刑,歐盟國家特別是德國,反對死刑的立場尤其堅定。近年來只要日本、越南、和台灣等國執行死刑,德國政府都會透過外交部的人權專員史卓瑟(Christoph Straesser)表示譴責和遺憾。 + +台灣今年4月最後一次槍決犯人後,史卓瑟就在第一時間發表聲明「強烈譴責」,對台灣「身為...
                    + http://newtalk.tw/news/2014/12/10/54651.html + 2014-12-10 23:43:19 + http://newtalk.tw/news/2014/12/10/54651.html +
                    + + 抗爭40年 太魯閣族人拿回亞泥侵佔土地 +
                    ]]>新頭殼newtalk2014.12.10 林雨佑/台北報導 + +花蓮太魯閣族原住民與亞洲水泥糾纏40餘年的土地爭議,終於取得具體進展。花蓮縣府遵照之前原民會訴願結果,今(10)日將土地權狀交給土地被亞泥公司拿去挖礦的第一代耕作權人楊金香及徐阿金。反亞泥還我土地自救會和台灣蠻野心足生態協會表示,這是還我土地運動重大的階段性勝利,同時也呼籲亞泥公司莫再啟訴訟,妨礙太魯閣族人的權利。 + +今年3月最高行政法院判決太魯閣族人和原民會勝訴,花蓮縣府必須將土地還給太魯閣族人。土地第一代耕作權人楊金香及徐阿金今日早...
                    + http://newtalk.tw/news/2014/12/10/54650.html + 2014-12-10 23:25:42 + http://newtalk.tw/news/2014/12/10/54650.html +
                    + + 熱帶思考 曹啟鴻:歡迎馬總統到屏東療傷 +
                    ]]>新頭殼newtalk2014.12.10 張永安/台北報導 + +即將卸任的屏東縣長曹啟鴻今(10)天在台北舉行一場有關屏東生態旅遊的新書發表會上表示,台灣應該擺脫溫帶思考,避免經濟過度發展、集中在北台灣的現象,改用熱帶思考;否則不僅地球受傷,台灣受傷,連執政者也受傷,他接著說,公開歡迎馬英九總統到屏東療傷。 + +曹啟鴻在新書發表會上說,日本統治台灣時代,因為日本是溫帶國家,所以將全台資源都往北部集中發展,而國民黨時代也一樣,所以十大建設後來的結果,就是發生高雄氣爆。 + +他希望台灣可以改用熱帶思考,...
                    + http://newtalk.tw/news/2014/12/10/54649.html + 2014-12-10 18:16:39 + http://newtalk.tw/news/2014/12/10/54649.html +
                    + + 少女馬拉拉領和平獎:想當總理服務國家 + 新頭殼newtalk2014.12.10 周佑政/綜合報導 + +2014年諾貝爾和平獎共同得獎人之一、巴基斯坦婦女與兒童維權少女瑪拉拉(Malala Yousafzai)9日正式領取獎項。馬拉拉領獎前接受英國廣播公司(BBC)專訪時表示,為了讓巴基斯坦更好、兒童都能接受教育,希望自己未來能當上巴基斯坦總理,服務國家。 + +根據BBC報導,馬拉拉表示,「我想服務我的國家,我想讓巴基斯坦變成發達國家,而我的夢想就是讓國內所有的兒童都能接受教育。我認為要服務國家最好的方式是透過政治途徑,如果成為總理就可以... + http://newtalk.tw/news/2014/12/10/54644.html + 2014-12-10 17:56:05 + http://newtalk.tw/news/2014/12/10/54644.html + + + 蘇清泉扯器捐 醫全聯會:言論免責權保障 +
                    ]]>新頭殼newtalk2014.12.10 翁嫆琄/台北報導 + +國民黨立委蘇清泉日前提出的台大醫院涉違法器官捐贈,引發醫界反彈,而他擔任理事長的中華民國醫師公會全國聯合會今(10)日也召開會議,針對此事討論是否懲處,不過,會議結論指出,蘇清泉因身為立委有言論免責權,非醫師公會醫學倫理暨紀律委員會可評論,因此,蘇清泉仍保有理事長一職。 + +因醫界人士批評聲浪大,醫勞盟更遞狀要求全聯會讓蘇下台,全聯會下午2點半針對此事召開醫學倫理暨紀律委員會會議,決定是否會對蘇進行懲處。不過,委員會最後只做出3個結論,包...
                    + http://newtalk.tw/news/2014/12/10/54647.html + 2014-12-10 17:53:50 + http://newtalk.tw/news/2014/12/10/54647.html +
                    + + 挺滅火器 新頭殼召共好會員抽獎送演唱會票 +
                    ]]>新頭殼newtalk2014.12.10 周佑政/綜合報導 + +太陽花學運期間,樂團「滅火器」因創作《島嶼天光》爆紅。滅火器將於13日(週六)晚間舉辦演唱會,但票房不如預期,主唱楊大正日前在臉書發文坦承心情低落,但他也說會打起精神表演。《新頭殼》即日起推出「挺滅火器,緊急徵召共好會員」活動,凡加入新頭殼共好會員,就有機會獲得滅火器演唱會門票。 + +滅火器為學運打造的《島嶼天光》人人傳唱,日前也登上影音網站「YouTube」社會事件點閱的年度冠軍,另一首創作歌曲《晚安台灣》,更在學運期間撫慰人心。除此,...
                    + http://newtalk.tw/news/2014/12/10/54648.html + 2014-12-10 17:48:09 + http://newtalk.tw/news/2014/12/10/54648.html +
                    + + 美麗島35週年出版影像書 風雲人物重聚首 +
                    ]]>新頭殼newtalk2014.12.10 邱珮文/台北報導 + +1979年高雄美麗島事件已滿35週年,時報出版今(10)天舉行《反抗的意志》出版記者會,現場雲集70年代積極參與黨外運動的風雲人物,包括許信良、施明德、陳菊、呂秀蓮等。許信良致詞時表示,70年代經歷那麼多的犧牲,所追求的目標基本上在90年代都實現。他期盼,眼下台灣的貧富不均等問題,最終也能改變。 + +由施明德文化基金會的口述歷史小組撰寫、時報文化出版的《反抗的意志:1977-1979美麗島民主運動影像史》,集結了高雄美麗島事件許多的歷史性...
                    + http://newtalk.tw/news/2014/12/10/54645.html + 2014-12-10 17:43:15 + http://newtalk.tw/news/2014/12/10/54645.html +
                    + + 習近平打貪腐 高官劉鐵男遭判無期徒刑 +
                    ]]>新頭殼newtalk2014.12.10 周佑政/綜合報導 + +中國打貪,又有高官被判重刑。根據中國官方媒體報導,前中國國家發展和改革委員會(國家發改委)副主任、前國家能源局長劉鐵男被控涉貪,非法所得超過3558萬人民幣(近1.8億台幣),今(10)日一審遭河北省廊坊市中級人民法院判處無期徒刑,剝奪政治權利終身,並沒收個人全部財產。 + +劉鐵男案今日上午宣判時,河北省廊坊市中級人民法院也進行文字直播;法院指出,2002年至2012年,劉鐵男在國家發展計畫委員與國家發改委任職期間,利用職務之便,為民間企...
                    + http://newtalk.tw/news/2014/12/10/54640.html + 2014-12-10 17:37:05 + http://newtalk.tw/news/2014/12/10/54640.html +
                    + + 禮讓陳為廷? 由民進黨選對會決定 +
                    ]]>新頭殼newtalk2014.12.10 林朝億/台北報導 + +針對明年2月7日5位立委補選,民進黨中執會今(10)日決定將於年底12/24完成提名;對於學運領袖陳為廷將投入苗栗立委補選,黨是否將沿用柯文哲模式整合,發言人林俊憲表示,今日中執會通過的提名辦法有規定,若有特殊選情考量之選舉區,將由2014選舉對策委員會決定方案,再提請中執會通過並執行之。 + +民進黨中執會今日通過「2015年第8屆立法委員出缺補選提名之徵召辦法」。會後林俊憲轉述黨主席蔡英文談話指出,蔡英文首先感謝在場中執委與黨內幹部在這...
                    + http://newtalk.tw/news/2014/12/10/54643.html + 2014-12-10 17:29:05 + http://newtalk.tw/news/2014/12/10/54643.html +
                    + + 國民黨黨主席補選 將於明年1月17日投票 + 新頭殼newtalk2014.12.10 謝莉慧/台北報導 + +中國國民黨中常會今(10)天通過「104年黨主席補選作業細則」暨「104年黨主席補選海外地區黨員投票實施要點」,104年黨主席補選將於明(11)天張貼選舉公告,並於明年1月17日進行主席補選投開票。 + +國民黨文傳會表示,這次補選作業時程自公告日起至投開票日止,共計38天,重要作業時程包括:103年12月11日張貼選舉公告、12月12日至13日領表、12月12日至21日連署、12月21日登記、12月26日候選人資格審查暨號次抽籤、12月2... + http://newtalk.tw/news/2014/12/10/54646.html + 2014-12-10 17:24:36 + http://newtalk.tw/news/2014/12/10/54646.html + + + 阿基師澄清:沒進房間,「嘴對嘴還好」  +
                    ]]>新頭殼newtalk2014.12.10 林雨佑/台北報導 + +今(10)天出刊的《壹週刊》直擊,國宴主廚阿基師日前戴安全帽坐上轎車,與1名熟女上摩鐵。阿基師今天下午3點在三立電視台大廳召開記者會公開說明,該名陳小姐40歲,原本是他的粉絲,家裡經濟狀況不好曾想鬧自殺,後來安慰她、幫她「開悟」,2人才約見面,雖然有上摩鐵並在車上做出「嘴對嘴」動作,但沒有進去房間。他認為這是國際禮儀「嘴對嘴也還好」,且妻女都知情還支持他。 + +阿基師一開始就說,他要澄清,他和周刊拍到的陳小姐兩人認識5年多,原本陳是他的粉...
                    + http://newtalk.tw/news/2014/12/10/54642.html + 2014-12-10 17:23:07 + http://newtalk.tw/news/2014/12/10/54642.html +
                    + + 台電:最快明年 330度用電家庭退166元 +
                    ]]>新頭殼newtalk2014.12.10 謝莉慧/台北報導 + +立法院要求今年盈餘多達200億的台電公司降電價方案「有譜」!台電董事長黃重球今(10)日表示,將把燃料下跌所省下的90億元退給用電戶,並追溯至2014年,據估計,每戶每月用電330度左右的家庭約可退還至少每月14元,最低可1次退足12個月166元,最快明年元月開始退費。 + +立法院經濟委員會今天審查2015年度中央政府總預算案關於經濟部所屬單位預算。經濟部長鄧振中在會前受訪時表示,如果因燃料價格下降導致差價,經濟部一定會回饋給社會,但他也...
                    + http://newtalk.tw/news/2014/12/10/54639.html + 2014-12-10 17:06:08 + http://newtalk.tw/news/2014/12/10/54639.html +
                    + + 馬提權力讓人傲慢 台下傳出竊笑聲 +
                    ]]>新頭殼newtalk2014.12.10 謝莉慧/台北報導 + +總統馬英九今(10)日出席世界人權日紀念活動時,除了向白色恐怖受難者前輩和家屬致歉外,也期盼類似事件不要重演。他在致詞時表示,白色恐怖的政治受難者是「國共戰爭下的受難者,因為有戰爭,才有對抗的勢力,也才有後來的冤錯假案」;而「權力使人腐化,絕對的權力使人絕對腐化,一個人手上有了權力就難免會有傲慢,就會忘了人民的託付」,馬希望人權保障不只在人權日實行,而是1年365天都要確實貫徹。 + +文化部舉辦的「2014世界人權日」紀念活動10日上午在...
                    + http://newtalk.tw/news/2014/12/10/54638.html + 2014-12-10 16:45:08 + http://newtalk.tw/news/2014/12/10/54638.html +
                    + + 許信良:馬宣布特赦 是扁問題最好方法 +
                    ]]>新頭殼newtalk2014.12.10 劉奕霆/台北報導 + +針對前總統陳水扁的保外就醫議題,前民進黨主席許信良今(10)日下午出席活動前受訪表示,釋放扁已經是一個老議題,他很早就主張特赦阿扁,他認為在這個時候,馬政府實在沒有任何理由,把阿扁關在監獄裡面。許信良說,台灣社會發出一個很強烈的和諧信息,他覺得總統馬英九應該聽到這個信息,讓馬宣布對扁特赦,「是處理阿扁問題的最好方法」。 + +許信良下午出席「《反抗的意志》美麗島事件35週年影像紀實新書發表會」前受訪時,針對陳水扁的保外就醫議題指出,現在那麼...
                    + http://newtalk.tw/news/2014/12/10/54636.html + 2014-12-10 16:27:02 + http://newtalk.tw/news/2014/12/10/54636.html +
                    + + 扁哭勸呂秀蓮別絕食:我一個人死就好了 +
                    ]]>新頭殼newtalk2014.12.10 林朝億/台北報導 + +前副總統呂秀蓮今(10)日上午前往台中培德病監探視前總統陳水扁,呂秀蓮轉述,當她告知阿扁,如果馬政府不放阿扁,她就要絕食時,扁告訴她,「不要、不要」,「我一個人死就好了」。講到這裡,陳水扁與呂秀蓮都哭成一團。 + +時報出版社今日出版「反抗的意志:1977-1979美麗島民主運動影像史」一書。包括高雄市長陳菊、前民進黨主席施明德、許信良與前副總統呂秀蓮等人都先後與會。 + +對於陳水扁保外就醫議題,前監委黃煌雄受訪時說,從醫療專業角度來看,...
                    + http://newtalk.tw/news/2014/12/10/54637.html + 2014-12-10 16:10:04 + http://newtalk.tw/news/2014/12/10/54637.html +
                    + + 改變性別須摘性器官 民團會王金平籲廢除 +
                    ]]>新頭殼newtalk2014.12.10 邱珮文/台北報導 + +施明德文化基金會今(10)日陪同跨性別團體召開記者會,質疑內政部行政命令規定跨性別者在變更性別登記前,必須接受性器官摘除手術,是不人道的罪行,應立即廢止,並前往拜會立法院院長王金平。會後王金平受訪表示,立法院朝野黨團可做成決議要求內政部廢除此行政命令,再請行政部門處理。 + +針對內政部規定的變更性別要件,施明德文化基金會執行董事陳嘉君指出,內政部在2008年11月3日發布行政命令,要求變更性別者須先經過摘除性器官的程序,至今,已摘除超過4...
                    + http://newtalk.tw/news/2014/12/10/54634.html + 2014-12-10 15:55:23 + http://newtalk.tw/news/2014/12/10/54634.html +
                    + + 拱朱立倫接黨主席 20多名藍委展開連署 +
                    ]]>新頭殼newtalk2014.12.10 翁嫆琄/台北報導 + +國民黨主席一職究竟會由誰接任,目前各界說法不斷,而國民黨籍立委廖正井及蔡錦隆也發起連署,盼由新北市長朱立倫擔任黨主席,據指出,已有20幾名立委參與。藍委王廷升今(10)日坦承確有其事,他自己及江啟臣都有參與連署。藍委吳育昇則直言,他支持朱任黨主席,且國民黨立委幾乎都不反對。 + +總統馬英九因9合1選舉敗選而請辭國民黨主席,各界皆關注新主席的可能人選,而朱立倫的呼聲極高,甚至連廖正井及蔡錦隆都展開連署,支持由朱接任主席。不過,消息傳出後,發...
                    + http://newtalk.tw/news/2014/12/10/54635.html + 2014-12-10 15:08:05 + http://newtalk.tw/news/2014/12/10/54635.html +
                    + + 2016出馬?施明德:大勢所趨 從不缺席 +
                    ]]>新頭殼newtalk2014.12.10 邱珮文/台北報導 + +前民進黨主席施明德今(10)日受訪時指出,國民黨2016年已無可戰之將,若放任民進黨奪得政權,將會出現一黨獨大。因為國民黨員都是乖乖牌,難以有效監督制衡。當媒體追問是否有意參選總統,他則不願意正面表態,只說,「我一直關心國家大事,整個大勢所趨,我從來不缺席。」 + +施明德文化基金會今日陪同跨性別團體召開記者會,質疑內政部要求變更性別時必須摘除性器官的行政命令違法,並拜會立法院長王金平。會後,施明德受訪做出以上表示。 + +有關前總統陳水扁...
                    + http://newtalk.tw/news/2014/12/10/54628.html + 2014-12-10 13:55:09 + http://newtalk.tw/news/2014/12/10/54628.html +
                    + + 鄉民分析:若劉政鴻選立委 陳為廷勝率大 +
                    ]]>新頭殼newtalk2014.12.10 林雨佑/台北報導 + +太陽花學運領袖陳為廷9日晚間在臉書上宣布,將以無黨籍身分參加明年2月的苗栗第二選區(山縣)立委補選,隨即引起熱烈討論。今(10)早就有網友在PTT論壇上發分析文認為,陳為廷要贏得補選最大的機率,就是「劉政鴻跑來選山線立委」,因為陳為廷是客家人,山線的國民黨客家派系,在不想要閩南海線的劉政鴻深入客家山線的情況下,就有可能暗助陳為廷。 + +自稱為小醫師的網友eric760302今天早上在PTT八卦板上發一篇「陳為廷能否贏得苗栗立委補選之超初步...
                    + http://newtalk.tw/news/2014/12/10/54631.html + 2014-12-10 13:38:02 + http://newtalk.tw/news/2014/12/10/54631.html +
                    + + 明開全國能源會議 環團質疑護航核廠延役 +
                    ]]>新頭殼newtalk2014.12.10 林雨佑/台北報導 + +「不缺能源會議,只缺改革決心!」綠色公民行動聯盟和全國廢核平台等環團今(10)日上午到行政院前抗議,質疑明天將進入第2階段實質討論的「全國能源會議」,不但與會代表皆由官方欽定,代表性受到質疑,更可能是要替核一、二、三延役護航;而「核電主戰派」的毛治國選後竟然高升行政院長,現在還要主導全國能源會議,也讓環團質疑「馬政府真的有決心要改革嗎?」 + +攸關台灣能源與產業政策的「全國能源會議」將於明天進入第2階段實質討論,並在北中南東舉辦8場分區及...
                    + http://newtalk.tw/news/2014/12/10/54621.html + 2014-12-10 13:32:03 + http://newtalk.tw/news/2014/12/10/54621.html +
                    + + 選黨主席或2016?吳敦義和王金平齊否認 +
                    ]]>新頭殼newtalk2014.12.10 謝莉慧/台北報導 + +副總統吳敦義是否會角逐國民黨主席或2016總統大選?甚至和立法院長王金平搭配?吳敦義今(10)日表示,「外界傳王要選黨主席,我選總統,2人要密切合作,我聽都沒聽過,我和王是熟識好多年的朋友」,黨主席部分,「我說不會選就是不會選」。至於2016呢?吳敦義則回應記者「那不在約書亞的範圍之內,不要老是牽扯很廣」。 + +吳敦義今早出席「2014優秀護理人員與護理之美攝影獎表揚大會暨學術研討會」後受訪指出,他過去擔任行政院長時,與王金平有緊密的合作...
                    + http://newtalk.tw/news/2014/12/10/54633.html + 2014-12-10 13:24:03 + http://newtalk.tw/news/2014/12/10/54633.html +
                    + + 柯P勞動局長二階段面談 網路直播全公開 +
                    ]]>新頭殼newtalk2014.12.10 劉奕霆/台北報導 + +台北市長當選人柯文哲選前曾說,勞動局長將以「I-voting」方式,讓人民投票選出,在第一階段部分就有共45人完成登記程序,經過遴選委員書面審查後,選出賴香伶、林錫維、林凱衡等10人進入第二階段的備選人面談,這10人今(10)日下午將進行勞動局長遴選委員會進行面談,全程將透過網路直播。 + +柯文哲在選前曾表示,社會、勞動、文化、教育、環保等5個局處將對外公開遴選,其中勞動局長部分,將由27名遴選委員選出最後的5名決選人,再交由台北市民及在...
                    + http://newtalk.tw/news/2014/12/10/54629.html + 2014-12-10 13:13:01 + http://newtalk.tw/news/2014/12/10/54629.html +
                    + + 醫全聯會審台大器捐說 蘇清泉:可受公評 +
                    ]]>新頭殼newtalk2014.12.10 翁嫆琄/台北報導 + +國民黨立委兼中華民國醫師公會全國聯合會理事長蘇清泉日前爆料台大醫院涉違法活摘器官,引發醫界批評,向醫師公會全聯會遞狀要求蘇辭去理事長一職。對此,醫師公會全聯會今(10)日下午將針對此案召開會議,討論是否對蘇清泉懲處。而蘇清泉上午則強調,自己接獲投訴後,有徵詢專家跟官員,一切可受公評。 + +蘇清泉及藍委廖國棟在選前於立法院質詢時爆料,台大醫院執行器官移植的程序疑似違法,並指涉台北市長當選人柯文哲是主要負責人。不過,此事引發醫界反彈,許多醫師...
                    + http://newtalk.tw/news/2014/12/10/54630.html + 2014-12-10 13:05:09 + http://newtalk.tw/news/2014/12/10/54630.html +
                    + + 李登輝挺陳為廷:有需要 可幫他站台 +
                    ]]>新頭殼newtalk2014.12.10 林朝億/台北報導 + +前總統李登輝今(10)日出席台灣長老教會活動時,對於太陽花學運總指揮陳為廷決意參選苗栗縣立委補選表達肯定態度。他說,陳為廷現在要跟苗栗縣長劉政鴻競選,「拼看看」;有需要他也可以去幫忙講幾句話。 + +前總統李登輝今日上午出席長老教會活動。對於昨晚臉書發文,呼籲全民一起怒吼要馬英九辭去總統,他上午受訪時進一步說,「無能、沒見笑,這款作總統的人應該下台」。他說,馬英九6年執政,都不關心人民,也無法處理人民的困難。這次選舉,對國民黨來說是個挫敗,...
                    + http://newtalk.tw/news/2014/12/10/54632.html + 2014-12-10 12:54:02 + http://newtalk.tw/news/2014/12/10/54632.html +
                    + + 王金平黨籍案 吳敦義:由新任黨主席處理 +
                    ]]>新頭殼newtalk2014.12.10 謝莉慧/台北報導 + +副總統兼國民黨代理主席吳敦義今(10)日表示,在代理黨主席的1個多月時間,考慮到撤銷立法院長王金平黨籍案上訴,可能會根本動搖到黨紀的安定性和公信力,所以,他已請幕僚就這個議題在短期間內提出專業意見,供未來新的黨主席參考處理,至於「我作為代理黨主席,不宜做這種重大的轉變,這是我的想法」。 + +吳敦義上午出席「2014優秀護理人員與護理之美攝影獎表揚大會暨學術研討會」後,針對媒體提問,做了以上答覆。 + +吳敦義說,「王院長昨天問我,我一定要...
                    + http://newtalk.tw/news/2014/12/10/54627.html + 2014-12-10 12:43:07 + http://newtalk.tw/news/2014/12/10/54627.html +
                    + + ‎扁辦:今日上午再向法務部提出保外就醫 +
                    ]]>新頭殼newtalk2014.12.10 林朝億/台北報導 + +前總統陳水扁辦公室今(10)日早上表示,他們委請律師以台中榮總11月4日就陳水扁病情所開具之最新診斷證明書,向法務部矯正署再次提出保外醫治申請。 + +扁辦指出,根據該診斷書,陳水扁病因主要是腦部神經退化性疾病,手抖、口吃、動作失能、嚴重漏尿等相關病症皆緣自腦部病變,甚至包括發生多次嗆咳,有危及生命的危險,其結論指出,陳水扁需要全天候看護照料,離開目前監禁環境及居家療養。由此可見,病情已達「在監無法為妥適醫治」程度,若主管機關單以「作息飲食...
                    + http://newtalk.tw/news/2014/12/10/54625.html + 2014-12-10 12:33:01 + http://newtalk.tw/news/2014/12/10/54625.html +
                    + + 遴選制度挨批 柯P:總比市長關著選好 +
                    ]]>新頭殼newtalk2014.12.10 劉奕霆/台北報導 + +台北市長當選人柯文哲選前曾說,勞動局長將以「I-voting」方式,讓人民投票選出,今(10)日下午將進行勞動局長遴選委員會與進入第二階段的備選人面談,不過卻引起不少落選人對遴選制度不滿的批評,甚至有遴選委員自己報名成為備選人的事情;對此,柯文哲上午表示,「遴選委員一旦加入被遴選就要退出」,所以還是照程序跑,制度有好有壞,「不管怎樣總比市長關在裡面,點一個出來好」。 + +柯文哲在選前曾說,未來社會、勞動、文化、教育、環保等5個局處將對外公...
                    + http://newtalk.tw/news/2014/12/10/54622.html + 2014-12-10 12:28:07 + http://newtalk.tw/news/2014/12/10/54622.html +
                    + + 佔中明終極清場 學聯:不抵抗 禁區外續留 +
                    ]]>新頭殼newtalk2014.12.10 周佑政/綜合報導 + +香港「佔中」爭普選至今(10)日已持續74天,警方確定於明天針對金鐘與銅鑼灣佔領區進行清場。對此,主要發起團體香港專上學生聯會(學聯)與學民思潮都強調,會遵守非暴力原則;學聯秘書長周永康上午表示,將不會有任何抵抗,避免被政府指為「暴徒」,而清場後則會在「禁制令範圍外」繼續留守。 + +根據香港媒體報導,香港冠中巴士旗下的跨境全日通公司日前向法院聲請金鐘佔領區臨時禁制令,8日獲得批准,冠中巴士與執法人員達成協議,將在明日上午9點執行。香港警方...
                    + http://newtalk.tw/news/2014/12/10/54626.html + 2014-12-10 12:18:06 + http://newtalk.tw/news/2014/12/10/54626.html +
                    + + 長老教會150年 李登輝推崇認同住民 +
                    ]]>新頭殼newtalk2014.12.10 林朝億/台北報導 + +長老教會來台即將邁入第150周年,前總統李登輝今(10)日應邀出席紀念活動時推崇,教會引進西方的醫療與教育,同時也在台灣民主關鍵時刻,發表重要看法;他推崇長老教會已用「釘根本地、認同住民,以焚而不毀的宣教精神」,建立出一個新台灣的宣教價值。 + +1865年6月16日英國長老教會宣教師馬雅各醫師來台傳教,將基督教帶入台灣;7年後,1872年3月9日,馬偕牧師抵達淡水在北台灣展開傳教活動。為了紀念明年長老教會來台宣教150周年,台灣基督長老教...
                    + http://newtalk.tw/news/2014/12/10/54624.html + 2014-12-10 11:49:08 + http://newtalk.tw/news/2014/12/10/54624.html +
                    + + 北宜直鐵穿水庫 葉匡時:柯P有證據可討論 +
                    ]]>新頭殼newtalk2014.12.10 翁嫆琄/台北報導 + +台北市長當選人柯文哲日前提出北宜直鐵穿越翡翠水庫的主張,引發外界爭議。對此,交通部長葉匡時今(10)日在立法院表示,若柯P方面的環評專家能給「很強烈的證據」,證明通過翡翠水庫沒有什麼環境影響,就可進行開放性討論。至於高鐵可能破產一事,葉匡時重申,希望立院能在年底前通過財政改革方案。 + +針對北宜直鐵究竟能不能採取通過翡翠水庫的最短路線方案,葉匡時上午指出,此案行政院已通過可行性研究,目前是在環評跟綜合規畫中。若柯P這邊有環評專家給「很強烈...
                    + http://newtalk.tw/news/2014/12/10/54623.html + 2014-12-10 11:42:03 + http://newtalk.tw/news/2014/12/10/54623.html +
                    + + 柯P推首都生活圈平台 首案討論北宜直鐵 +
                    ]]>新頭殼newtalk2014.12.10 劉奕霆/台北報導 + +台北市長當選人柯文哲日前拜會宜蘭縣長林聰賢時,曾表達支持北宜直線鐵路走最短路線,引發外界批評不斷。柯文哲今(10)日上午受訪時再次強調,很多東西就是學術討論,如果穿過翡翠水庫會影響環境保護,那就算了;但是有沒有辦法不影響環境保護還可以達到?這個就是討論題目,不用那麼緊張,要「建立一個用數據回答問題的時代」。 + +北宜直鐵議題成為近日外界關注焦點,柯文哲日前表達北宜直線鐵路走最短路線的意見後,引發不少環團抗議,連身兼柯文哲市政顧問、環保局長...
                    + http://newtalk.tw/news/2014/12/10/54620.html + 2014-12-10 11:17:05 + http://newtalk.tw/news/2014/12/10/54620.html +
                    + + CIA刑求無效果 手法「對美國是打擊」 +
                    ]]>新頭殼newtalk2014.12.10 鄭凱榕/編譯報導 + +美國參議院情報特別委員會(Senate Select Committee on Intelligence)9日公布報告書,記錄了中央情報局(CIA)對恐怖分子嫌疑人施行過度嚴酷的刑求逼供。 + +根據日本共同通信社10日報導,報告書中最後做出了結論,對於是否得到正確有用的供詞來論,過度嚴酷的刑求是「無效的方法」。報告書對CIA提出非難指責指出,相反地,這樣的手法「帶給美國的名聲難以計數的打擊」。 + +民主黨籍情報特別委員會主席范士丹(Di...
                    + http://newtalk.tw/news/2014/12/10/54619.html + 2014-12-10 10:00:40 + http://newtalk.tw/news/2014/12/10/54619.html +
                    + + 陳為廷參選 陳威仁:個案由選委會認定 +
                    ]]>新頭殼newtalk2014.12.10 邱珮文/台北報導 + +太陽花學運領袖陳為廷昨晚宣布參與苗栗立委補選,內政部長陳威仁今(10)天上午受訪時表示,陳為廷目前因為有學籍,正在緩徵的狀況,他的參選「初步看是沒有問題」,但個案須由地方選委會認定。 + +內政部長陳威仁今天上午出席立法院內政委員會,報告政治獻金法部分條文修正草案,會前受訪時作出上述表示。 + +陳為廷昨晚在臉書上發文表示,他將以無黨籍的身分投入苗栗山線選區的立委補選。對於外界關注的兵役問題,陳表示他現在還在唸研究所碩一,有學籍仍然可以緩徵...
                    + http://newtalk.tw/news/2014/12/10/54618.html + 2014-12-10 09:41:03 + http://newtalk.tw/news/2014/12/10/54618.html +
                    + + 印度新市場!俄羅斯希望輸出液化天然氣 +
                    ]]>新頭殼newtalk2014.12.10 鄭凱榕/編譯報導 + +俄羅斯總統普亭9日表示強烈的意願,希望將液化天然氣(LNG)輸出到印度。 + +根據日本共同通信社10日報導,普亭10日起將正式訪問印度,他在接受印度最大、半官方性質的通訊社《印度報業托拉斯》(Press Trust of India,PTI)專訪時,除了表示希望將液化天然氣(Liquid Natural Gas,LNG)輸往印度外,還表示在俄羅斯武器輸出等軍事領域,希望加強資源合作,建立「特別的戰略夥伴關係」。 + +普亭指出,關於石油和...
                    + http://newtalk.tw/news/2014/12/10/54617.html + 2014-12-10 09:30:14 + http://newtalk.tw/news/2014/12/10/54617.html +
                    + + 容安瀾:台灣反而對香港局勢影響大 +
                    ]]>(中央社華盛頓9日電) + +華府兩岸學者容安瀾今天表示,香港民主示威對台灣與九合一選舉僅有極小影響,台灣反而對香港局勢的影響比較大,一國兩制根本與台灣無關,也常為台灣民眾忽視。 + +華府智庫史汀生中心(Stimson Center)東亞研究室主任容安瀾(Alan Romberg)在大西洋理事會(Atlantic Council)舉行的亞洲民主發展研討會提出上述說法。 + +容安瀾認為,香港示威對台灣僅有極小影響,包括11月29日舉行的地方選舉,影響是有,但不大。大部分台灣民眾相信香港情況與台灣無直接關...
                    + http://newtalk.tw/news/2014/12/10/54616.html + 2014-12-10 09:02:40 + http://newtalk.tw/news/2014/12/10/54616.html +
                    + + 抗恐並防伊朗 海灣6國將打造警隊與海軍 +
                    ]]>新頭殼newtalk 2014.12.10洪聖斐/編譯報導 + +海灣阿拉伯國家合作委員會(Gulf Cooperation Council,GCC)各國昨(9)日達成協議,要打造1支聯合警隊,駐紮在阿拉伯聯合大公國的首都阿布達比,並且打造1支聯合海軍艦隊,以巴林為基地。前者旨在打擊恐怖份子,後者意在防範伊朗。 + +海灣阿拉伯國家合作委員會(簡稱「海合會」)成員國包括巴林、科威特、阿曼、卡達、沙烏地阿拉伯和阿拉伯聯合大公國。這6個國家昨日在卡達舉行的高峰會結束時宣佈打造海合會警隊(GCC-POL)以及海...
                    + http://newtalk.tw/news/2014/12/10/54615.html + 2014-12-10 08:45:21 + http://newtalk.tw/news/2014/12/10/54615.html +
                    + + 為廷參選 姚人多所長:保持中立 以他為榮 + 新頭殼newtalk2014.12.10 林朝億/台北報導 + +清大學生陳為廷昨(9)晚在臉書宣布投入苗栗立委補選,不少戰友都挺身聲援。不過,一向挺學運的清大社研所所長姚人多有點搞笑說,「身為行政主管,我必須保持中立,既然不能說支持他,那只好以他為榮了。課業的事,我會公事公辦,沒有特權」。 + +而陳為廷老友林飛帆則表示,反覆討論了好幾日,看著身旁這位老戰友,時而焦慮、時而緊張嘆息,最終他還是做了艱難而且勇敢的決定,義無反顧。「這大概也是我認識的陳為廷,依舊是他」。 + +林飛帆說,「我們需要他,奮力的... + http://newtalk.tw/news/2014/12/10/54614.html + 2014-12-10 00:32:18 + http://newtalk.tw/news/2014/12/10/54614.html + + + 林智堅:318學運影響 做不好的就會被換掉 + 新頭殼newtalk2016.12.10 林朝億、林雨佑/專訪 + +全國最年輕的新竹市長當選人林智堅接受訪問時表示,318學運改變了整個大環境;選舉當天他看到許多年輕人都回來投票了;學運的影響就是做不好的,就會被換掉,因此施政上必須步步為營。他也希望這個學運的後續影響能成為台灣繼續前進的力量。 + +民進黨中執會今年8/30確定提名39歲的林智堅參選新竹市長。結果,1百天後,這位僅當過1屆市議員的新人,居然迎頭趕上,以76,578票(38.36%)擊敗現任市長許明財(75,546票,37.85%),兩人... + http://newtalk.tw/news/2014/12/10/54613.html + 2014-12-10 00:05:05 + http://newtalk.tw/news/2014/12/10/54613.html + + + 李登輝籲人民怒吼 讓馬英九辭去總統 +
                    ]]>新頭殼newtalk2014.12.09 林朝億/台北報導 + +前總統李登輝今(9)晚在臉書發文指出,現在台灣已經到了非改不可的關鍵時刻,台灣的命運掌握在人民手中,是要往進步的方向邁步還是要退步墮落?改變的時刻已經到來,讓大家一起用各種聲音,對失德無能的馬政府發出怒吼,要求馬英九立刻辭去總統,讓「台灣繼續向前行」。 + +以下是李登輝臉書全文: + +2014年11月29日地方選舉的結果,台灣人民用選票狠狠地教訓了失德無能的馬英九政權。有人說這是台灣人民的勝利,是台灣民主的勝利!但是,人民真的勝利了嗎?...
                    + http://newtalk.tw/news/2014/12/09/54612.html + 2014-12-09 22:52:25 + http://newtalk.tw/news/2014/12/09/54612.html +
                    + + 苗栗缺可信任的選擇 陳為廷將投入立委補選 +
                    ]]>新頭殼newtalk2014.12.09 林雨佑/台北報導 + +由於苗栗縣長將由現任立委徐耀昌出任,空出一席立委缺,將於明年2/7進行補選。日前傳出有意參加補選的學運領袖陳為廷,今(9)晚在臉書上發文表示,他將以無黨籍的身分投入苗栗山線選區的立委補選。 + +陳為廷說,很多人想要勸退他,但他認為眼下苗栗的艱難、與台灣的改革之勢,正當其時,當用則用。他應該盡可能地把他這些虛名,轉化成紮實的組織與運動,「讓問題得以被彰顯、讓理念得以實踐,才真正是無愧、且有益於這個社會。」 + +陳為廷說,「苗栗人不是看不見...
                    + http://newtalk.tw/news/2014/12/09/54611.html + 2014-12-09 22:36:09 + http://newtalk.tw/news/2014/12/09/54611.html +
                    + + 陳德銘:明早見台媒高層 說明中韓FTA +
                    ]]>新頭殼newtalk2014.12.09 邱珮文/台北報導 + +中國海協會會長陳德銘今(9)晚與海基會董事長林中森於圓山飯店會面,陳德銘表示,他發現台灣媒體很關心中韓FTA對台灣的影響,因此,已經約好明天早上與一些媒體的負責人見面,介紹中韓FTA、亞太自貿區等,希望台灣媒體能有更客觀如實的表述。 + +陳德銘率領的「海峽兩岸關係協會經貿交流團」今天抵台,結束下午參訪林口長庚醫院與長庚養生文化村的行程之後,來到台北圓山飯店,與海基會長林中森見面。雙方在輪流致詞後,便閉門舉行歡迎晚宴。 + +林中森致詞時表...
                    + http://newtalk.tw/news/2014/12/09/54609.html + 2014-12-09 19:47:19 + http://newtalk.tw/news/2014/12/09/54609.html +
                    + + 國民黨主席補選 12、13日開放領表 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/台北報導 + +中國國民黨明天下午將召開馬英九辭去黨主席後的首次中常會,但今(9)日以沒有安排專題報告為由,簡訊告知媒體將不開放採訪。而國民黨主席的補選作業細則將於明天提報中常會核定後實施,規劃於明年1月17日投票,今年12月12、13日領表,15至17日辦理參選人登記,相關期程將經明天中常會核定後實施。 + +代理黨主席吳敦義下午首度主持國民黨中山會報,確認明天的中常會議程,包括輔選工作檢討報告案和黨主席補選作業細則、主席補選的監察委員會委員人選案共2個...
                    + http://newtalk.tw/news/2014/12/09/54610.html + 2014-12-09 19:28:08 + http://newtalk.tw/news/2014/12/09/54610.html +
                    + + 因應限水 高市府啟動備援措施 +
                    ]]>新頭殼newtalk2014.12.09 金名/高雄報導 + +高雄水情吃緊,己實施第1階段夜間減壓供水,高雄市政府為因應缺水危機,今(9)日同時啟動備援水量措施,彙整抗旱水井並提供汙水處理廠排放水,目標明年春節前不影響整體用水,並呼籲民眾節約用水、共體時艱。 + +高雄市水利局代局長陳鴻益表示,高雄每日用水量約160萬噸,主要水源來自高屏溪川流水,目前流量為22CMS(每秒立方公尺),約每日190萬噸,較歷年同期流量55~56CMS明顯為低,部分用水供給則來自南化、阿公店、澄清湖及鳳山4座水庫,現已採蓄...
                    + http://newtalk.tw/news/2014/12/09/54608.html + 2014-12-09 18:51:01 + http://newtalk.tw/news/2014/12/09/54608.html +
                    + + 阿扁保外就醫 陳致中將再提聲請 +
                    ]]>新頭殼newtalk2014.12.09 金名/高雄報導 + +前總統陳水扁的兒子陳致中今(9)日說,他父親的病情實在不能再拖,採取地院抗告或高院異議恐緩不濟急,他表示,將以最快速度把台中榮總的最新診斷書向法務部提出保外醫治聲請,希望他們真正尊重。 + +陳致中在臉書上貼文表示,他決定用台中榮總11月4日的診斷書,馬上向法務部聲請他父親保外就醫,希望真正被尊重。陳致中並質疑說,陳水扁不能保外就醫,竟然是因為中榮診斷書過期?他要問法務部長羅瑩雪,今年6月聲請保外就醫,用5月的診斷書,有什麼問題? + +陳致...
                    + http://newtalk.tw/news/2014/12/09/54607.html + 2014-12-09 18:37:05 + http://newtalk.tw/news/2014/12/09/54607.html +
                    + + 黃敏惠:支持藍撤銷王金平黨籍案上訴 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/綜合報導 + +國民黨副主席黃敏惠今(9)日表示,她支持撤銷立法院長王金平黨籍案上訴,而且撤銷上訴是多數黨員的心聲,在民主社會中,「黨應該尊重基層的聲音」,國民黨現在需要的是團結。 + +即將卸下嘉義市長職位的黃敏惠,下午以嘉義市長身分在台北出席由遠見雜誌出版的《豐收嘉園--人文城市的隱形冠軍》新書發表會,會後她針對國民黨在這次9合1選舉中遭到挫敗提出看法。 + +黃敏惠強調,過去在中常會也有中常委多次提出,甚至包括黨代表和黨員們也都曾表達希望國民黨撤...
                    + http://newtalk.tw/news/2014/12/09/54606.html + 2014-12-09 18:24:09 + http://newtalk.tw/news/2014/12/09/54606.html +
                    + + 全國區域計畫公聽會 環團反對高汙染產業 +
                    ]]>新頭殼newtalk2014.12.09 黃博郎/台南報導 + +內政部今(9)日在台南召開全國區域計畫修正草案公聽會,台灣水資源保育聯盟、台南市環境保護聯盟等環保團體代表出面表達意見,一致反對區域計畫讓中南部繼續發展煉油、石化與燃煤發電業,也反對開發曾文越域引水及高屏大湖,要求刪除相關條文。 + +內政部表示,區域計畫法自1974年公布施行,並於2000年修正施行,對促進土地及天然資源的保育利用,人口及產業活動的合理分布助益甚大。為配合內政部於2013年公告實施「全國區域計畫」、「推動直轄市、縣(市)擬...
                    + http://newtalk.tw/news/2014/12/09/54605.html + 2014-12-09 17:41:07 + http://newtalk.tw/news/2014/12/09/54605.html +
                    + + 陳德銘訪台 台聯抗議與航警爆推擠衝突 +
                    ]]>新頭殼newtalk2014.12.09 邱珮文/綜合報導 + +中國海協會長陳德銘今(9)日中午訪台,展開長達8天的參訪行程。對此,數十位台聯青年軍與法輪功成員上午也趕至桃園機場抗議,航警動員百人警戒,並禁止抗議人士進入桃機航廈,雙方因此爆發幾度肢體推擠衝突。 + +陳德銘率「海協會經貿交流團」一行20人於今天11時40分飛抵桃園機場第二航廈,我方由海基會副董事長施惠芬負責接機。 + +台聯青年軍與法輪功成員則在上午便守候於桃園機場,準備抗議陳德銘訪台,航警事先接獲情資,出動百名警員戒備,並於航廈外頭劃...
                    + http://newtalk.tw/news/2014/12/09/54603.html + 2014-12-09 17:13:48 + http://newtalk.tw/news/2014/12/09/54603.html +
                    + + 南投區域立委補選 蔡煌瑯宣布投入參選 +
                    ]]>新頭殼newtalk2014.12.09 翁嫆琄/綜合報導 + +9合1選舉後,5名現任立委當選縣市首長,因此,明年將舉辦立委補選,而現任民進黨不分區立委的蔡煌瑯今(9)日宣布,將投入南投縣區域立委補選,希望能為綠營再搶下1席,若勝選的話,將由余天遞補他的職缺。蔡也強調,南投沒有再輸的本錢,這次提名一定要以勝選為首要考量。 + +南投縣因國民黨立委林明溱當選南投縣長,空出的立委席次吸引朝野爭奪,蔡煌瑯今天即宣布,將參與明年的南投縣立委補選。他指出,近幾年南投縣連續敗選,民進黨李文忠這次選縣長又落敗,擔心南...
                    + http://newtalk.tw/news/2014/12/09/54604.html + 2014-12-09 17:06:45 + http://newtalk.tw/news/2014/12/09/54604.html +
                    + + 紀念自焚藏人 西藏自由文學奬開跑 +
                    ]]>新頭殼newtalk2014.12.09 林雨佑/台北報導 + +西藏人以自焚方式爭取民族自由的案例雖時有所聞,卻越來越被人們所遺忘。為了紀念這些自焚的藏人,並喚起外界的關注,台灣自由圖博學會等團體現正舉辦「西藏自由第一屆文學獎」,以「我生命中的那一天」為發想主題對外徵文,作品中需提及該日自焚藏人的姓名(可不只一人)、自焚日期,以及自焚訴求。經評審團選出前3名和3位佳作後,將頒發4千元到3萬元的獎金。 + +文學獎主辦人、台灣自由圖博學會理事長奉君山表示,這個文學獎已經醞釀了3年。從3年前到今天,他們舉辦...
                    + http://newtalk.tw/news/2014/12/09/54598.html + 2014-12-09 17:06:05 + http://newtalk.tw/news/2014/12/09/54598.html +
                    + + 綠膳纖下架沒公布 食藥署:法令沒規定 +
                    ]]>新頭殼newtalk2014.12.09 翁嫆琄/台北報導 + +藝人陶晶瑩代言的「綠膳纖膠囊」雖然擁有衛福部的健康食品認證,但今(9)天遭爆料產品蘆薈素超標1770倍,吃了不但會腹瀉,還具有肝腎毒性。不過,食藥署指出,之前已接獲民眾通報,11月中旬也要業者預防性下架,卻未對外公布。 + +綠膳纖是國內第1個通過「不易形成體脂肪功能」的健康食品,擁有小綠人標章,但《蘋果日報》今天爆料指出,綠膳纖使用去皮蘆薈為原料,其蘆薈素超量,可能會導致腹瀉。 + +對此,食藥署食品組簡任技正王慧英表示,該署之前就陸續接...
                    + http://newtalk.tw/news/2014/12/09/54601.html + 2014-12-09 16:59:56 + http://newtalk.tw/news/2014/12/09/54601.html +
                    + + 撤銷黨籍案上訴 王金平:吳告知明天不處理 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/台北報導 + +明天將由國民黨代理主席吳敦義首次主持中常會,外傳中常委林榮德已提案要求國民黨撤銷立法院長王金平黨籍案上訴,對此,王金平今(9)日下午明確表示,「我剛才就這個問題請教他(吳敦義)了,他說,明天不會處理」。記者追問,「那你怎麼辦?」王金平笑著說,「我飯照吃啊」,至於會否參選黨主席?王金平和吳敦義則都否認。 + +副總統吳敦義、立法院長王金平和行政院副院長張善政下午都出席「第11屆國家創新獎頒獎典禮暨學界新創企業揭牌活動」,會後,急著趕往黨中央主...
                    + http://newtalk.tw/news/2014/12/09/54600.html + 2014-12-09 16:56:02 + http://newtalk.tw/news/2014/12/09/54600.html +
                    + + 林佳龍公布一級主管名單 打造行動市府 +
                    ]]>新頭殼newtalk2014.12.09 鄭進興/台中報導 + +台中市長當選人林佳龍今(9)日公布副市長及一級主管名單,3名副市長分別為前交通部長林陵三、國家教育研究院副院長潘文忠及從產業界網羅的台中市工業區廠商協進會理事長張光瑤。林佳龍表示,當選市長近10日來便南奔北走,積極網羅團隊人才,以能「立即上手」為團隊成員優先考量,力求打造「行動市府」,上任後可以「即刻啟動」,並讓市政無縫接軌,使人民有感。 + +市政府秘書長則由現任的內政部參事兼工程施工查核小組召集人黃景茂出任,黃曾擔任內政部營建署副署長及...
                    + http://newtalk.tw/news/2014/12/09/54602.html + 2014-12-09 16:50:06 + http://newtalk.tw/news/2014/12/09/54602.html +
                    + + 綠新北正副議長人選 12/11假投票決定 +
                    ]]>新頭殼newtalk2014.12.09 陳冠廷/新北報導 + +民進黨昨(8)日晚間在中央黨部協調新北正、副議長的人選,現場卻不時傳出激烈的爭論聲,經過新北市長候選人游錫堃呼籲團結的前提下,直至今(9)日凌晨1點左右,才勉強達成12月11日下午4點進行「假投票」的共識。 + +至於國民黨在這次的新北市議員選舉中,在應選的66席僅取得26席,將面臨正、副議長首度從「藍天變綠地」的窘境,國民黨籍議長陳幸進、議員蔣根煌則已登記爭取代表國民黨角逐議長的機會;現任副議長陳鴻源、國民黨新北市議會黨團書記長周勝考...
                    + http://newtalk.tw/news/2014/12/09/54599.html + 2014-12-09 15:44:07 + http://newtalk.tw/news/2014/12/09/54599.html +
                    + + 郝公開翡翠水庫數據 助柯團隊了解市政狀況 +
                    ]]>新頭殼newtalk2014.12.09 劉奕霆/台北報導 + +對於北宜直鐵穿越翡翠水庫集水區一事,台北市政府今(9)日上午召開市政會議討論,北市府發言人張其強會後也轉述郝龍斌談話。郝龍斌強調,他會尊重新市長和新團隊的決定,而翡翠水庫管理局已在昨天將所有相關數據公開上網,希望幫助新團隊了解市政狀況。 + +關於北宜直鐵穿越翡翠水庫集水區一事,台北市政府上午召開市政會議討論,翡管局表示,昨日已將所有相關數據、討論內容、分析報告結論,其中包括對水量、水質的影響,以及預估可能造成的淤積等等,全部公開在翡管局網...
                    + http://newtalk.tw/news/2014/12/09/54597.html + 2014-12-09 15:03:01 + http://newtalk.tw/news/2014/12/09/54597.html +
                    + + 湯志民任教育局長 全教總籲先提施政規劃 +
                    ]]>新頭殼newtalk2014.12.09 林雨佑/台北報導 + +台北市長當選人柯文哲市政團隊教育局長人選今(9)日出爐,將由政大特聘教授、教育學院院長湯志民出任。對此,全國教師工會總聯合會理事長張旭政表示,湯志民是比較保守的學者,且思維、作法都有「校長威權」,與基層教師的前瞻想法有所出入,讓他有點擔憂。全教總副秘書長羅德水則希望湯志明能先說明他對於教育短、中、長期的規畫。 + +張旭政表示,以過去教師工會與湯志民接觸的印象,湯志民是比較保守的學者,且思維、作法都有「校長威權」,與基層教師的前瞻想法有所出...
                    + http://newtalk.tw/news/2014/12/09/54592.html + 2014-12-09 14:57:08 + http://newtalk.tw/news/2014/12/09/54592.html +
                    + + 扁保外就醫 柯P:別把問題賴到醫療上 +
                    ]]>新頭殼newtalk2014.12.09 劉奕霆/台北報導 + +法務部長羅瑩雪昨日表示,前總統陳水扁提出保外就醫的聲請不符規定,但可針對被駁回的部分,再提抗告。羅瑩雪也指出,矯正署將考慮擴大鑑定小組,納入醫界和家屬推薦之專業醫師,共同評估陳水扁的健康狀況。對此,柯文哲今(9)日被問到是否會加入擴大後的鑑定小組時表示,不要在把這問題賴在醫療上,總統馬英九應發揮政治智慧,要用「怎樣處理才會對台灣社會造成最少傷害」的邏輯去思考這個問題。 + +羅瑩雪昨日說,陳前總統上次聲請保外醫治所據診斷證明,到現在已超過半...
                    + http://newtalk.tw/news/2014/12/09/54594.html + 2014-12-09 14:46:06 + http://newtalk.tw/news/2014/12/09/54594.html +
                    + + 倒數5天割闌尾再拼7千份 保證罷免蔡正元 +
                    ]]>新頭殼newtalk2014.12.09 林雨佑/台北報導 + +發起罷免蔡正元等國民黨立委的割闌尾團隊目前已經收到超過門檻的4萬多份蔡正元罷免連署書,但因第2階段無法補件,必須「一次定生死」,因此該團隊今(9)日宣布,將在期限12/15的最後5天內最後衝刺,再收集7000份達到5萬份,保證一定能對蔡正元提出罷免案。「7千份的連署書就可以保證送蔡正元委員上手術台,內湖南港人還在等什麼呢?」 + +割闌尾行動如火如荼進行至今,罷免國民黨立委蔡正元、林鴻池與吳育昇的提案皆已進行至第2階段。其中罷免蔡正元的連署...
                    + http://newtalk.tw/news/2014/12/09/54593.html + 2014-12-09 14:35:06 + http://newtalk.tw/news/2014/12/09/54593.html +
                    + + 綠引「兩公約」呼籲讓陳水扁保外就醫 +
                    ]]>新頭殼newtalk2014.12.09 林朝億/台北報導 + +針對法務部昨日指出若前總統陳水扁近半年病情確有變化,可再次提出保外就醫聲請,法務部也將擴大鑑定小組編制,評估扁的醫療狀況。民進黨發言人黃帝穎今(9)日表示,過去這段期間包括台北榮總、台中榮總,及台北地方法院委託高雄長庚醫院名譽副院長陳順勝教授等單位進行的醫療診斷與鑑定報告,均指出陳水扁的健康狀況呈現「階梯式惡化」,急需給予「居家療養」等措施,以緩減病情持續惡化。 + +黃帝穎表示,陳水扁的健康狀況,過去2年來包括台北榮總、台中榮總以及法務部...
                    + http://newtalk.tw/news/2014/12/09/54595.html + 2014-12-09 14:23:03 + http://newtalk.tw/news/2014/12/09/54595.html +
                    + + 直鐵發言引不滿 柯P:該辦大腸花論壇 +
                    ]]>新頭殼newtalk2014.12.09 劉奕霆/台北報導 + +台北市長當選人柯文哲日前拜會宜蘭縣長林聰賢,表達支持北宜直線鐵路走最短路線,也就是經過翡翠水庫集水區的路徑,引發外界批評不斷。身兼柯文哲市政顧問、環保局長遴選委員會成員的律師詹順貴不滿表示,柯該謹言慎行,若再有影響弱勢權益、環境議題的發言,他會辭去市政顧問。對此柯文哲今(9)日表示,專業問題讓專業解決,這問題應該辦一場大腸花論壇,正反意見大家來討論,他只是拋出一個議題,讓大家來考量。 + +詹順貴昨日接受媒體訪問時表示,柯文哲現在已經是準市...
                    + http://newtalk.tw/news/2014/12/09/54596.html + 2014-12-09 14:06:01 + http://newtalk.tw/news/2014/12/09/54596.html +
                    + + 柯P教育局長 拍板政大教授湯志民 +
                    ]]>新頭殼newtalk2014.12.09 劉奕霆/台北報導 + +台北市長當選人柯文哲市政團隊教育局長人選出爐,將由政大特聘教授、教育學院院長湯志民出任。柯文哲今(9)日上午拜會台聯黨主席黃昆輝,會後受訪被問到教育局長遴選過程時表示,這是經過昨晚教育局長遴選委員會以投票方式選出來,如果湯志民沒有拒絕就會任用;柯文哲說,他有參與投票過程,按照遴選流程,選出來是湯的話,還是尊重遴選委員會意見,由市長任命,就由市長負政治責任。 + +湯志民曾擔任台北市教育局科長、政大附中創校校長,專長為教育行政、國民教育、中等...
                    + http://newtalk.tw/news/2014/12/09/54590.html + 2014-12-09 13:06:01 + http://newtalk.tw/news/2014/12/09/54590.html +
                    + + 青年救扁誓師 妖西:釋扁可作國民黨處方 +
                    ]]>新頭殼newtalk2014.12.09 邱珮文/台北報導 + +臺左維新、福爾摩鯊會社、基進側翼等10多個青年團體今(9)日共同召開救扁誓師記者會,呼籲馬政府應立即回應民意訴求以及遵照專業醫療診斷結果,立刻讓前總統陳水扁居家療養。福爾摩鯊會社社長「妖西」劉敬文指出,釋扁對國民黨來說是一劑處方,能有效緩解現下這股不滿國民黨的年輕社會力量。 + +臺左維新執行長林于倫指出,救扁是整個世代不分族群、年齡的共同責任。他昨天早上與阿扁會晤,陳水扁對於自己是否能保外就醫,態度是悲觀的,還說「我知道我總有一天會出去,...
                    + http://newtalk.tw/news/2014/12/09/54591.html + 2014-12-09 12:55:02 + http://newtalk.tw/news/2014/12/09/54591.html +
                    + + 教師取得罷工權 4名勞動局長候選人支持 +
                    ]]>新頭殼newtalk2014.12.09 林雨佑/台北報導 + +台北市勞動局長採用公開遴選方式,最後共有300多人踴躍報名參加。全國教師工會總聯合會今(9)日召開「勞動局長給問嗎?」記者會,找來其中4名候選人,針對教師勞動權問題提出對策。4人都支持教師應取得罷工權,東吳大學法律系助理教授胡博硯認為,應從原本的「禁止」走向「限制」;人民火大行動聯盟秘書長賴香伶則認為,要給教師罷工權的話一定要把配套做好,才會有一定作用,否則空有罷工權會讓教師冒非常大風險。 + +全國教師工會總聯合會理事長張旭正表示,教師合...
                    + http://newtalk.tw/news/2014/12/09/54587.html + 2014-12-09 12:42:03 + http://newtalk.tw/news/2014/12/09/54587.html +
                    + + 扁漏尿嚴重 室友每次都得拍照存證 +
                    ]]>新頭殼newtalk2014.12.09 林朝億/台北報導 + +前總統陳水扁在台中培德病監健康狀況持續惡化,每日漏尿達80多次,民間醫療小組發言人陳昭姿今(9)日表示,每次扁漏尿,他的室友都得拿到燈光下照相存證;尿布要換時,也必須拿到監測器再秀給監測的人看。 + +對於陳水扁保外就醫,法務部長羅瑩雪昨天召開記者會強調,陳前總統作息規律,飲食正常,親友接見頻繁,健康狀況尚非在監內無法為適當治療之程度,似不符保外醫治的規定。 + +對此,民進黨立委陳其邁、許智傑及陳水扁民間醫療小組發言人陳昭姿與郭正典今日上...
                    + http://newtalk.tw/news/2014/12/09/54589.html + 2014-12-09 12:21:03 + http://newtalk.tw/news/2014/12/09/54589.html +
                    + + 扁保外就醫?府:總統不介入司法個案 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/台北報導 + +前總統陳水扁是否可以保外就醫?總統府發言人馬瑋國今(9)日表示,馬英九總統態度一向是「尊重主管機關依據法律及醫療專業評估所作之決定」,從不介入司法個案,立場始終如一。 + +有關陳水扁是否能保外就醫的問題,新閣揆昨天在上任首次記者會中表示,可以討論,而且法務部已在進行評估。隨後,法務部召開記者會也一改過去「扁不符保外就醫」的態度,甚至明示扁若再次聲請,矯正署擬擴大鑑定小組決定,馬政府的說法較過去鬆動許多,今天連府都主動發布新聞稿,表明馬英九...
                    + http://newtalk.tw/news/2014/12/09/54588.html + 2014-12-09 12:08:02 + http://newtalk.tw/news/2014/12/09/54588.html +
                    + + 不符保外就醫?醫師駁扁有嗆咳窒息危機 +
                    ]]>新頭殼newtalk2014.12.09 翁嫆琄/台北報導 + +法務部昨天召開記者會指出,前總統陳水扁的病情不符保外就醫規定。對此,民進黨立委陳其邁、陳水扁的民間醫療小組發言人陳昭姿、成員郭正典今(9)日召開記者會,公布台中榮總11月4日開具的診斷證明,證明扁有嗆咳現象,可能是腦神經退化引起,而且嚴重的話恐導致窒息猝死。 + +郭正典表示,11月的診斷證明書出現的症狀與之前的類似,但漏尿情況惡化,每天漏80幾次;而呼吸中止症的部分,手術後沒有改善,加上扁還有重度憂鬱症、輕度攝護腺肥大等病狀,診斷書也指出...
                    + http://newtalk.tw/news/2014/12/09/54586.html + 2014-12-09 11:59:02 + http://newtalk.tw/news/2014/12/09/54586.html +
                    + + 馬政府對扁釋善意 呂秀蓮盼勿節外生枝 +
                    ]]>新頭殼newtalk2014.12.09 邱珮文/台北報導 + +針對法務部昨日回應前總統陳水扁保外就醫一事,前副總統呂秀蓮今(9)日上午受訪時表示,馬政府已經釋出善意,她表達肯定,也希望不要再節外生枝,但是她仍然隨時做好絕食的準備。 + +行政院長毛治國昨天正式上任,就陳水扁保外就醫議題表示政府施政應考慮「人道原則」。法務部稍後更召開記者會,指陳水扁今年6月聲請保外就醫不服規定所以駁回,但是阿扁可以聲請抗告,矯正署也考慮擴大鑑定小組,納入醫界及家屬的推薦醫師。此舉被外界解讀為「指路」、「保外就醫有望」。...
                    + http://newtalk.tw/news/2014/12/09/54585.html + 2014-12-09 11:45:12 + http://newtalk.tw/news/2014/12/09/54585.html +
                    + + 扁有望保外就醫?王金平:不敢做評論 +
                    ]]>新頭殼newtalk2014.12.09 翁嫆琄/台北報導 + +前總統陳水扁的保外就醫議題近日再度浮上檯面,法務部昨天還召開記者會,雖否決扁符合保外就醫條件,但有人認為法務部的態度已鬆動。對此,立法院長王金平今(9)日表示,目前事情還未有答案,他不敢做評論。但他也重申,希望政府能依扁的病情做最寬鬆的處理。至於黨籍案,王金平仍說,自己尊重黨中央。 + +法務部昨天召開記者會指出,陳水扁今年曾聲請保外就醫,但經研判後,認為不符保外就醫的規定,法務部除強調扁可向法院提出抗告外,也提醒,若病情近半年來確有變化,...
                    + http://newtalk.tw/news/2014/12/09/54584.html + 2014-12-09 11:24:09 + http://newtalk.tw/news/2014/12/09/54584.html +
                    + + 周玉蔻宣布參選黨主席 找回國民黨良心 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/綜合報導 + +資深媒體人周玉蔻今(9)日上午11點半將在自家門口召開記者會,以「找回國民黨的良心」為名,宣布將參選國民黨主席,至於自己的資格是否符合國民黨章規定?周玉蔻表示,希望明天的國民黨中常會能討論修改黨章事宜。 + +周玉蔻批評國民黨檯面上這些人至今還在搞密室政治,為了國民黨的未來,她決定參選,找回國民黨的良心。她在記者會上表示,不能讓馬英九指定參選人,黨章也不是給馬英九用的,要開放黨員參選。 + +根據國民黨的主席選舉辦法規定,必須是曾經擔任過中...
                    + http://newtalk.tw/news/2014/12/09/54583.html + 2014-12-09 11:19:02 + http://newtalk.tw/news/2014/12/09/54583.html +
                    + + 蔡依林旋風席捲YouTube 《PLAY我呸》奪冠 + 新頭殼newtalk2014.12.09 鄭凱榕/綜合報導 + +線上影音分享平台YouTube今(9)日公布2014年度台灣「熱門音樂影片點閱排行榜」,蔡依林魅力再次席捲 YouTube,《PLAY 我呸》一曲火速竄紅稱冠,創下超過750萬的點閱次數。 + +根據Google台灣新聞稿表示,被譽「亞洲舞后」美名的蔡依林今年以超洗腦舞曲《PLAY 我呸》,批判時事的犀利歌詞及誇張的多變造型轟動全台,影片上傳 YouTube 短短1個月一舉奪下 YouTube 年度熱門音樂影片點閱排行榜冠軍。 + +此外,... + http://newtalk.tw/news/2014/12/09/54582.html + 2014-12-09 11:09:01 + http://newtalk.tw/news/2014/12/09/54582.html + + + 台中3位副市長人選出爐 林陵三擔中捷大任 +
                    ]]>新頭殼newtalk2014.12.09 謝莉慧/綜合報導 + +台中市長當選人林佳龍今(9)日上午公布3位副市長人選,包括前交通部長林陵三、台中市工業區廠協會理事長張光瑤和國立編譯館前館長、前國家教育研究院副院長潘文忠,他們分別具有交通、商業與教育背景。 + +其中,林陵三在交通部長任內曾涉高速公路ETC弊案,但未被起訴,他未來將可能負責推動林佳龍政見中有關軌道捷運橘線等重大交通建設。而張光瑤接任後要推動台中市工業區發展、會展文化、經濟發展等。至於潘文忠被認為未來肩負教育文化業務的重要角色。 + +(圖...
                    + http://newtalk.tw/news/2014/12/09/54581.html + 2014-12-09 11:04:05 + http://newtalk.tw/news/2014/12/09/54581.html +
                    + + YouTube大黑馬蕭志瑋 無厘頭喜感掃全台 + 新頭殼newtalk2014.12.09 鄭凱榕/綜合報導 + +今年YouTube「最紅創作者影片排行榜」及「爆紅 kuso 搞笑影片點閱排行榜」可謂精彩絕倫!不管是熟悉的網路名人蔡阿嘎、這群人,或一舉竄紅的素人蕭志瑋都大放異彩,成為全台最關注的焦點! + +表演張力十足的網路素人蕭志瑋,經營「Now夠了沒」頻道,模仿對反服貿群眾嗆聲所爆紅的「來來哥」而製作出的系列搞笑影片廣受好評,並以「來來哥的女朋友」影片勇奪年度爆紅 kuso 搞笑影片點閱排行榜冠軍。連同「頂尖對決之穿褲子篇 Top Battles... + http://newtalk.tw/news/2014/12/09/54580.html + 2014-12-09 10:45:50 + http://newtalk.tw/news/2014/12/09/54580.html + + + 2014 YouTube追時事跟話題 引爆選舉年 + 新頭殼newtalk2014.12.09 鄭凱榕/綜合報導 + +目前全球每月有10億名使用者的YouTube今(9)日公布2014年度「台灣熱門時事話題排行榜」和「選舉/社會事件影片點閱排行榜」。值得注意的是,網友緊跟社會議題同時不忘關切網路帶動的話題。另外,今年的選舉候選人積極並大量運用網路工具,拉高網路關注度,無論是關鍵字到網路影音都反映出網路世代的全新選舉及社會運動模式。 + +今年時事話題絕對是YouTube上最吸睛的亮點之一!根據 YouTube 年度熱門時事話題影片點閱排行榜,包括具爭議性的... + http://newtalk.tw/news/2014/12/09/54579.html + 2014-12-09 10:08:41 + http://newtalk.tw/news/2014/12/09/54579.html + + + 北宜直鐵惹批評 翡管局:應避開集水區 +
                    ]]>新頭殼newtalk2014.12.09 劉奕霆/台北報導 + +台北市長當選人柯文哲日前與宜蘭縣長林聰賢會面,達成北宜直鐵應該走最短路線興建,也就是直接穿越翡翠水庫集水區的共識,引發外界批評聲浪不斷。台北翡翠水庫管理局今(9)日表示,北宜直鐵選線為專業嚴謹之過程,北宜直鐵如直接穿越水庫集水區將對水庫水質、水量及淤積等造成不可回復之破壞;因此,為大台北水源安全與永續利用,翡管局認為北宜直鐵應避開翡翠水庫集水區。 + +繼日前拆除忠孝西路公車專用道、撤派出所議題引發外界爭議後,柯文哲日前漢林聰賢會面時,提到...
                    + http://newtalk.tw/news/2014/12/09/54578.html + 2014-12-09 09:49:20 + http://newtalk.tw/news/2014/12/09/54578.html +
                    + + 2014年YouTube台灣熱門影片排行榜出爐 + 新頭殼newtalk2014.12.09 鄭凱榕/綜合報導 + +廣受全球網友喜愛的線上影音分享平台YouTube今(9)日公布2014年度台灣熱門影片排行榜。今年在非音樂熱門影片方面,顯示出YouTube已成為網路世代參與時事和選舉議題的主要管道。 + +YouTube目前每月全球有 10 億名使用者,每分鐘上傳到YouTube影片總長度已超過100 個小時。每天在YouTube訂閱頻道的人數較去年成長超過3倍,而每天被訂閱的頻道數較去年也成長超過4倍。另外,近4成的 YouTube 影片瀏覽數來自於行... + http://newtalk.tw/news/2014/12/09/54577.html + 2014-12-09 09:06:44 + http://newtalk.tw/news/2014/12/09/54577.html + + + 彭博最新民調:希拉蕊領先共和黨群雄 +
                    ]]>新頭殼newtalk 2014.12.09洪聖斐/編譯報導 + +彭博社(Bloomberg)昨(8)日公佈最新民調,顯示民主黨籍的美國前國務卿希拉蕊(Hillary Clinton)獲得的支持,勝過共和黨籍的5位可能總統候選人。 + +這份上週三到上週五進行的民調顯示,52%的受訪者表示他們喜歡希拉蕊,至於共和黨的5位可能人選中,曾在2012年代表共和黨與歐巴馬一較高下的前麻州州長羅姆尼(Mitt Romney)得到43%的受訪者好感,36%的受訪者喜歡紐澤西州州長克里斯帝(Chris Christie...
                    + http://newtalk.tw/news/2014/12/09/54576.html + 2014-12-09 08:31:16 + http://newtalk.tw/news/2014/12/09/54576.html +
                    + + 十分搶手 新北市2015年消防月曆出爐了 +
                    ]]>新頭殼newtalk2014.12.09 陳冠廷/新北報導 + +十分搶手的新北市政府消防局2015年消防月曆出爐了!新北市消防工程器材商業同業公會為協助新北市偏遠學校及弱勢的學生順利就學,特印製1200份的消防月曆,以公益的方式販賣,從即日起至12月23日在全家便利商店FamiPort機台預購(免付費客服電話0800-071999)數量有限,預購從速。 + +消防局昨(8)日表示,今年延續去年宅男變猛男的概念,以「超勵志!弱雞也能變猛男!」為主軸,持續推動「英勇、熱情、活力」的消防新形象;此外,因應...
                    + http://newtalk.tw/news/2014/12/09/54575.html + 2014-12-09 00:25:17 + http://newtalk.tw/news/2014/12/09/54575.html +
                    + + 「皇民說」餘波 中山學生抗議郝柏村 + 新頭殼newtalk2014.12.08 金名/高雄報導 + +前行政院長郝柏村今(8)日上午到中山大學演講「八年抗戰與兩岸關係」,9名不滿郝柏村先前指日治時期台灣人是皇民的學生,手持「民主殺手」及「中華民國滅亡了?」等海報抗議,抨擊郝柏村言論是強暴了台灣人痛苦的歷史記憶。 + +郝柏村今天應中山大學中國與亞太區域研究所、天下文化之邀,前往中山大學社科院小劇場演講,主題是「八年抗戰與兩岸關係」,中山大學政治所、社會所與社會系等9名學學生則在場外持海報抗議。 + +中山大學政治所學生柯汎禧宣讀抗議聲明,強調... + http://newtalk.tw/news/2014/12/08/54574.html + 2014-12-08 23:35:30 + http://newtalk.tw/news/2014/12/08/54574.html + + + 柯文哲向宋楚瑜請益什麽?(余杰) +
                    ]]>新頭殼newtalk2014.12.08 文/余杰 + +柯文哲還沒有正式接任台北市長,就跑去向宋楚瑜「請益」了,而且兩人在密室中會談一個多小時。他們談的哪些話是不能被選民知道的呢? + +宋楚瑜是一個早已被民主潮流拋棄的舊時代的老政客。就才能而論,宋楚瑜確實比馬英九、連戰顯得才華橫溢、合縱連橫、長袖善舞。我曾經與一位美國國務院的老一輩翻譯人員談起宋楚瑜,他告訴我,當年宋楚瑜還是國民黨青年才俊的時候,美國視之為國民黨的明日之星,故而邀請他訪問美國。一番交談之下,美方卻發現,宋楚瑜雖然英文流利、侃侃而談,卻...
                    + http://newtalk.tw/news/2014/12/08/54527.html + 2014-12-08 22:54:00 + http://newtalk.tw/news/2014/12/08/54527.html +
                    + + 以色列轟炸敘利亞 俄羅斯:侵略行動 + 新頭殼newtalk 2014.12.08 洪聖斐/編譯報導 + +以色列昨(7)日空襲敘利亞大馬士革機場及周邊地區。力挺敘利亞總統阿薩德的俄羅斯當局已向聯合國指控以色列此舉為「侵略行動」,並要求以國加以解釋。 + +以色列《國土報》(Haaretz)今(8)日的1則報導引述俄羅斯外交部發言人盧卡舍維奇(Alexander Lukashevich)的談話,指出莫斯科對此危險情勢發展深感憂心,並且要求解釋。 + +敘利亞也已向聯合國提出抗議,並要求安理會嚴厲譴責以色列的攻擊行為,並針對以色列祭出制裁。 + ... + http://newtalk.tw/news/2014/12/08/54573.html + 2014-12-08 22:34:01 + http://newtalk.tw/news/2014/12/08/54573.html + + + 彰銀案 政府讓企業經營風險暴增 +
                    ]]>新頭殼newtalk2014.12.08 文/張揚 + +市場經濟的核心價值在於遵守契約與法律,透過產權機制的明確化以確保市場在透明的、可預測的規則下運行,從而促成市場的效率化。 + +令人遺憾的是,今日政府一再藉由不合理的行政權擴張與官股機構的特殊角色不斷的介入市場的經濟運作;從台新金價購彰化銀行股權案、反對頂新集團出售101大樓股權案、到政府擬將接管高鐵公司案,均可以窺見政府赤裸裸的為迎合部分民眾的好惡,刻意扭曲政府的角色,操縱市場運作規則的種種未盡合法的舉措。政府今日的作為,非但將破壞自由市場經濟的...
                    + http://newtalk.tw/news/2014/12/08/54572.html + 2014-12-08 22:16:50 + http://newtalk.tw/news/2014/12/08/54572.html +
                    + + 辜懷群挺「新舞台」 要從都姓辜的泥淖出來 +
                    ]]>新頭殼newtalk2014.12.08 林朝億/台北報導 + +針對中信集團將出售信義區松壽大樓,其中引發的「新舞台」保存議題,辜振甫長女辜懷群今(8)日表示,她不反對業主中信銀處分產業,但當年中信銀就是因為「新舞台」之故,獲得台北市政府獎勵,才能蓋到85公尺;每年幫中信銀省下1億元租金,從一個市民的角度,她認為中信銀應該讓今年5月熄燈的「新舞台」重新營業,還給市民公帑。 + +對於對「新舞台」爭議,藝文界人士今日召開記者會呼籲新當選市長柯文哲介入協調。台北新劇劇團長李寶春表示,希望「新舞台」拆掉之前不...
                    + http://newtalk.tw/news/2014/12/08/54571.html + 2014-12-08 19:45:59 + http://newtalk.tw/news/2014/12/08/54571.html +
                    + + 陳德銘明起訪台8天 晚間見林中森 +
                    ]]>新頭殼newtalk2014.12.08 邱珮文/台北報導 + +中國海協會長陳德銘將於明(9)日中午抵台,白天參訪完林口長庚醫院、長庚養生文化村後,晚間將與海基會會長林中森在台北圓山飯店會面,這也是2人在9合1選舉後的首次會面。 + +由陳德銘率領的「海協會經貿交流團」預計明天中午抵達桃園機場,將先訪問桃園、新北和台北市,10日抵達花蓮,11日訪問花蓮、台東,12日停留台東,13日訪問台東、屏東,14日從屏東回訪台北市,15日停留台北,16日訪問新竹後便直接回國。 + +海基會副董事長馬紹章日前指出,行...
                    + http://newtalk.tw/news/2014/12/08/54569.html + 2014-12-08 18:16:01 + http://newtalk.tw/news/2014/12/08/54569.html +
                    + + 胡志強稱自己的市府團隊是夢幻團隊 +
                    ]]>新頭殼newtalk2014.12.08 鄭進興/台中報導 + +台中市長胡志強今(8)日在主持市政會議時表示,現在的市府團隊是一個夢幻團隊,新任市長如果願意留任現有市府主管,他希望大家都能盡力表現留下好成績,讓台中的未來更好。 + +胡志強強調,他當然尊重新任市長的人事權,只是希望分享他用人的「白紙哲學」。他表示,過去他從民進黨手上接下台中市長的棒子,當時的主管他幾乎都沒動,只對市府所有主管說,大家從今天起都是一張白紙,不用擔心以前講的話、做的事,他都不會計較,他會從白紙上看大家的表現。 + +至...
                    + http://newtalk.tw/news/2014/12/08/54570.html + 2014-12-08 18:12:04 + http://newtalk.tw/news/2014/12/08/54570.html +
                    + + 保外就醫遭駁 羅瑩雪建議扁抗告或重聲請 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +對於前總統陳水扁保外就醫問題,法務部長羅瑩雪今(8)天下午5點於法務部召開記者會指出,矯正署檢視去年獲准保外就醫的受刑人,其病名和症狀皆與陳前總統不同,難以援引參辦;且依照台中監獄日常生活記錄觀察,目前前總統作息規律、飲食正常,似不符保外就醫的規定。她建議陳前總統有2個選擇,一個是提出抗告,另外是向正確的法院提出聲請。 + +羅瑩雪表示,陳前總統於今年6/10正式委託律師以台中榮民總醫院5/15的診斷證明書為據,提出保外就醫之聲請。法務部基...
                    + http://newtalk.tw/news/2014/12/08/54568.html + 2014-12-08 18:01:52 + http://newtalk.tw/news/2014/12/08/54568.html +
                    + + 施振榮:中信銀應提撥「新舞台」營運基金 +
                    ]]>新頭殼newtalk2014.12.08 林朝億/台北報導 + +針對位於信義區松壽大樓「新舞台」何去何從,文藝界人士今(8)日召開「文化城市向前行,給柯P的文化政策」記者會。而國家藝術基金會執行長陳錦誠則代表宏碁集團創辦人施振榮發表公開信,呼籲市府規定新買主重建時需保留原規模的「新舞台」空間;並要求中信集團因該地增值而創造的利潤,應提撥預算用於建設新「新舞台」,並成立基金會負責之後的營運。 + +「新舞台」劇場為中國信託商業銀行前榮譽董事長辜振甫與前董事長辜濂松共同決定,由中國信託出資新建,並由中國信託...
                    + http://newtalk.tw/news/2014/12/08/54566.html + 2014-12-08 17:54:08 + http://newtalk.tw/news/2014/12/08/54566.html +
                    + + 毛治國:北宜直鐵繞道雙溪 非中央說了算 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +台北市長當選人柯文哲日前與宜蘭縣長林聰賢會面,達成北宜直鐵應該走最短路線興建,也就是直接穿越翡翠水庫集水區的共識,引發環團批評,連台北市長郝龍斌今(8)日上午也在臉書表示反對。對此,新任行政院長毛治國表示,北宜直採最短路線所縮短的交通時間有限、工程費用卻很高,就其印象所及,約增100億,再加上翡翠水庫下方有很多斷層及地質環境等問題,最後才會決定繞道雙溪興建,並非「中央說了算」。 + +毛治國今天在上任首次記者會中,面對記者提問有關北宜直鐵的...
                    + http://newtalk.tw/news/2014/12/08/54567.html + 2014-12-08 17:49:04 + http://newtalk.tw/news/2014/12/08/54567.html +
                    + + 廢國宅法 立委要求林口末代國宅轉租用 +
                    ]]>新頭殼newtalk2014.12.08 邱珮文/台北報導 + +立法院內政委員會今(8)日下午通過廢止「國民住宅條例」,未來轉賣國宅將沒有設籍年限,也可以出租國宅。此外,多位立委也建議將「末代國宅」林口國宅在2017年作為世大運選手村使用後,轉作出租用的社會住宅,避免廢法後淪為炒房工具。對此,內政部表示,尚須研議相關基金的營收,不過原則上同意。 + +國民住宅條例自從1975年通過以後,至今辦理39萬餘戶、約158萬人的居住需求,內政部考量我國住宅自有率已達85%,加上因應社會情勢快速變遷,2011年制...
                    + http://newtalk.tw/news/2014/12/08/54564.html + 2014-12-08 17:45:05 + http://newtalk.tw/news/2014/12/08/54564.html +
                    + + 朴槿惠:努力促成中日韓首腦會談 +
                    ]]>新頭殼newtalk2014.12.08 柯昱安/綜合報導 + +韓國總統朴槿惠今(8)日在法國研究機構於首爾召開的國際會議上發表演說,強調中國、日本、韓國3國的通力合作很重要,未來3國將朝向類似歐洲的多邊合作體系來發展,未來韓國方面也將努力促成中、日、韓3國首腦會談。 + +朴槿惠表示,他期待韓國能與鄰近的中國、日本共同合作,發展成為類似歐洲的多邊合作體系。由於先前,中、日、韓3國就已針對促成3國外交部長會談達成基本協議,因此韓國將會努力促成,在近期內召開3國外長會談,並朝向舉辦3國首腦會談的目標邁進。...
                    + http://newtalk.tw/news/2014/12/08/54565.html + 2014-12-08 17:38:09 + http://newtalk.tw/news/2014/12/08/54565.html +
                    + + 待電價公式通過 毛揆:「追溯」反映降價 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +終結連續8年的財務虧損,台電公司今年營運轉虧為盈,可望賺超過200億元,外界要求調降電價的聲浪四起,今(8)日才上任的行政院長毛治國下午3點半在首次記者會中表示,「我給經濟部的提醒是,油價有大幅度調整,必須反映在電價上」,但因為現在送到立法院審議的浮動電價公式還未通過,因此,拜託經濟部能研擬配套措施,並和立院加強溝通達成共識,採取「追溯」的方式來反映,毛治國也說,上午拜會立法院長王金平時,也提及此事。 + +毛治國說,電價下降與否,有很重要...
                    + http://newtalk.tw/news/2014/12/08/54563.html + 2014-12-08 17:28:05 + http://newtalk.tw/news/2014/12/08/54563.html +
                    + + 快訊/陳水扁飲食正常 法務部:不符保外就醫 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +對於前總統陳水扁保外就醫問題,法務部長羅瑩雪今(8)日下午5點於法務部召開記者會表示,矯正署檢視去年獲准保外就醫的受刑人,其病名和症狀皆與陳前總統不同,難以援引參辦,且依照台中監獄日常生活記錄觀察,目前前總統作息規律、飲食正常,似不符保外就醫的規定。 + +羅瑩雪建議,陳前總統目前有2做法,一是抗告,二是向法院申請異議。 + +(圖:中央社資料照片)...
                    + http://newtalk.tw/news/2014/12/08/54562.html + 2014-12-08 17:18:12 + http://newtalk.tw/news/2014/12/08/54562.html +
                    + + 電子業表現佳 石化業衰退11月出口小成長 +
                    ]]>新頭殼newtalk2014.12.08 張揚/台北報導 + +財政部今(8)日發布11月進、出口統計速報,總體而言因半導體新關產品、液晶裝置之零件及機械業表現佳,但礦產與石化業受油價低迷之衝擊呈現衰退狀態,導致11月我國出口僅小幅成長3.7%。 + +財政部統計指出,11月出口266.8億美元,較上年同月增9.5億美元(+3.7%),其中變動較大的產業包括;電子產品出口87.9億美元,較上年同月增8.2億美元(+10.2%),其中積體電路增6.7億美元(+11.8%)、二極體(含LED)增0.3億美元(...
                    + http://newtalk.tw/news/2014/12/08/54561.html + 2014-12-08 16:49:59 + http://newtalk.tw/news/2014/12/08/54561.html +
                    + + 中職發函提醒 澳職決定不登錄曹錦輝 +
                    ]]>新頭殼newtalk2014.12.08 柯昱安/綜合報導 + +前兄弟象投手曹錦輝因於09年爆發的假球簽賭案中,坦承接受組頭性招待,遭到中華職棒永久禁賽,但澳洲職棒球隊卻不顧禁賽令,執意與曹錦輝簽約,並在近期登錄於正式名單當中。不過今(8)日澳洲職棒透過當地媒體宣布,在收到中職提供的最新資料後,他們確定取消曹錦輝的登錄,意即曹錦輝將無法出賽。 + +根據澳洲當地媒體報導,儘管澳洲職棒「阿德雷德鯊魚隊」日前簽下曹錦輝,並將曹錦輝登錄於正式名單當中,但澳洲職棒聯盟總經理佛斯特(Ben Foster)表示,因...
                    + http://newtalk.tw/news/2014/12/08/54560.html + 2014-12-08 16:31:06 + http://newtalk.tw/news/2014/12/08/54560.html +
                    + + 毛揆稱政府對網路不了解 常導致政策誤判 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +行政院長毛治國今(8)日下午主持上任後首次行政院會,他指出,今後包括自己在內,必須學習「換個位置」甚至「換個腦袋」來思考問題,尤其是政府單位許多同仁對於網路世界不夠熟悉,對於多數較年輕世代在網路世界中交換的訊息接觸不多,所以在判斷公眾意見時,因缺乏來自網路世界的意見,造成資訊不夠完整而發生誤判,政府今後應該在「傳統」的實體世界,與新興的網路世界之間建立橋樑。 + +不過,原本都會提供「直播」服務,讓網友參與討論的院會後記者會,今天政院卻以準...
                    + http://newtalk.tw/news/2014/12/08/54559.html + 2014-12-08 16:19:01 + http://newtalk.tw/news/2014/12/08/54559.html +
                    + + 禁奶粉開罐價惹議 食藥署改口暫緩施行 +
                    ]]>新頭殼newtalk2014.12.08 翁嫆琄/台北報導 + +食藥署原訂明年1月起,嬰兒配方食品將訂定「促銷」限制,其中,不能用「開罐價」促銷引發消費者爭議。在反對聲浪持續擴大下,食藥署今(8)日改口,禁止奶粉以開罐價促銷因有爭議,將暫緩實施,其他條文則照常於明年1月開始上路。 + +根據食藥署日前公告的「嬰兒與較大嬰兒配方食品廣告及促銷管理辦法」,明年1月起,嬰兒與較大嬰兒配方食品,不得為廣告,但「登載於學術性醫療刊物」或「未開放民眾取閱,僅供醫事人員使用之說明資料」不在此限,惟其仍不得「宣稱或影射...
                    + http://newtalk.tw/news/2014/12/08/54558.html + 2014-12-08 15:57:07 + http://newtalk.tw/news/2014/12/08/54558.html +
                    + + 民調:過半支持同性婚立法 女多於男 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +根據世新知識經濟發展研究院的調查,有過半(54%)民眾支持立法讓同性婚姻合法化,其中女性支持比例明顯高於男性,有6成女性支持,男性支持的卻僅有4成。而支持「投票門檻下降至18歲」有52.2%不同意,略高於同意的47.4%;「不在籍投票」則有7成民眾贊成。 + +台灣民主基金會今(8)日上午在立法院舉行2014台灣民主自由人權調查成果發表記者會,除了原本的政府保障人權各項指標外,今年也新增「不在籍民眾經申請後可在地投票」、「放寬投票年齡至18...
                    + http://newtalk.tw/news/2014/12/08/54556.html + 2014-12-08 15:34:03 + http://newtalk.tw/news/2014/12/08/54556.html +
                    + + 9合1開票問題多 民團籲攝影有必要 +
                    ]]>新頭殼newtalk2014.12.08 邱珮文/台北報導 + +監票者聯盟招募志工在9合1選舉當日前往全國各開票所監票,發起人黃聖峰今(8)日指出,這次選舉藉由公民監票,及時制止了1百多個開票所開票過程的缺失,顯示選務人員訓練不足,以及公民記錄開票狀況的必要性。他也強調,他們的攝影根本拍不到選票內容,不會有中選會擔心的「驗收賄選成果」發生。 + +監票者聯盟選前發起公民監票行動,呼籲民眾在開票過程中錄影存證,卻遭中選會禁止,認為開票過程准許民眾攝影,無異於提供賄選者檢驗買票成果機會。 + +監票者聯盟這...
                    + http://newtalk.tw/news/2014/12/08/54557.html + 2014-12-08 15:22:06 + http://newtalk.tw/news/2014/12/08/54557.html +
                    + + 葉匡時留任 收費員募鞋預告抗爭再起 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +新內閣今(8)日交接,交通部長葉匡時仍在留任名單中。國道收費員自救會成員上午到行政院門口抗議,痛批葉匡時不出面解決收費員安置等問題,回鍋代表執政黨完全不知悔改。此外,去年關廠工人連線等團體曾向社會募鞋,發起一波丟鞋潮,連國民黨全代會移師到台中也是照樣丟鞋抗議;國道收費員自救會和勞團現在也延續先前行動,向社會募集舊鞋,要在馬英九當選滿7週年的明年3月22日發起「322人民逼宮」抗爭,以人民的力量直接要求爛政權下台。 + +國道收費員自救會20...
                    + http://newtalk.tw/news/2014/12/08/54553.html + 2014-12-08 14:45:02 + http://newtalk.tw/news/2014/12/08/54553.html +
                    + + 對抗空汙 巴黎擬2020前取締柴油車 +
                    ]]>新頭殼newtalk2014.12.08 柯昱安/綜合報導 + +巴黎近年來霾害嚴重,今年3月的空氣監測數據顯示,巴黎的空氣品質創下有史以來最差紀錄,為了降低空氣汙染,巴黎女市長伊達格(Anne Hidalgo)宣示,2020年前將會在巴黎市區內取締柴油車,期許屆時在巴黎街道上,「只會看到低排放或零排放機動車輛」。 + +伊達格接受法國《星期日日報》(Le Journal du Dimanche)訪問時表示,為了解決空氣汙染問題,未來將會在巴黎市區大舉規劃人行專用道,並加倍設立自行車道。她也在專訪中表態,...
                    + http://newtalk.tw/news/2014/12/08/54554.html + 2014-12-08 14:36:05 + http://newtalk.tw/news/2014/12/08/54554.html +
                    + + 朱立倫:國民黨上下 多做事少說話 +
                    ]]>新頭殼newtalk2014.12.08 陳冠廷/新北報導 + +新北市長朱立倫今(8)日在經濟發展局長葉惠青的陪同下,出席美商祥茂光電科技(AOI)台灣分公司林口新廠的落成啟用;朱立倫強調,經濟發展的果實,並沒有讓民眾享受、讓年輕人感受及創造更多的就業機會,所以要調整方向。 + +朱立倫認為,台灣過去一直只重視經濟的發展,但經濟發展的果實,並沒有讓民眾享受到、沒有創造更多的就業機會,沒有讓年輕人感受到希望,所以要調整方向,這幾年新北市政府特別重視新的就業機會,新的、好的年輕人希望;AOI只是個例子,...
                    + http://newtalk.tw/news/2014/12/08/54555.html + 2014-12-08 14:27:03 + http://newtalk.tw/news/2014/12/08/54555.html +
                    + + 2014台灣民主人權調查 司法、清廉滿意度低 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +2014台灣民主自由人權指標調查結果今(8)日出爐,民眾對政府整體人權評價雖仍為偏向不滿意的2.9分,但今年各項人權指標評價多有進步。其中,在「無選舉買票」及「無選舉暴力恐嚇」指標的評價達6年來新高;不過,在「司法獨立審判」、「無貪污腐敗」或「回應人民需求」則都只有2分左右的低滿意度,而「無違反公正審判」指標則是今年唯一退步的項目。 + +在12月10日世界人權日的前夕,台灣民主基金會今日上午在立法院公布「2014台灣民主人權自由指標調查」...
                    + http://newtalk.tw/news/2014/12/08/54549.html + 2014-12-08 14:06:06 + http://newtalk.tw/news/2014/12/08/54549.html +
                    + + 頂新售101股權賺190億 恐只能課稅10億 +
                    ]]>新頭殼newtalk2014.12.08 翁嫆琄/台北報導 + +頂新日前出售台北101股權給馬來西亞商IOI集團,估計至少可賺190億元,至於政府能課到多少稅,民進黨立委吳秉叡今(8)日批評,頂新只有約0.43%的股權在台灣,根本課不了什麼稅。財政部長張盛和也坦承,實際課稅可能只有10億元左右。 + +頂新預計以251.4億元售出手中37.17%的101股權給馬來西亞商,由於馬商可能藉此取得101經營權,張盛和上午在立法院表態指出,因101是台灣地標,反對外資取得經營權,最好還是由國人掌握。 + +不過...
                    + http://newtalk.tw/news/2014/12/08/54552.html + 2014-12-08 13:22:05 + http://newtalk.tw/news/2014/12/08/54552.html +
                    + + 傳週三清場 黃之鋒:不放棄與港府對話 +
                    ]]>新頭殼newtalk2014.12.08 柯昱安/綜合報導 + +外傳警方可能於週三(10日)執行禁制令清場,先前絕食超過100小時的學民思潮召集人黃之鋒今(8)日表示,他們仍不放棄與政府對話的機會,沒有提前退場的打算,但若警方使用暴力手段清場,他們會優先讓場內的中學生與老人家疏散到安全地區。 + +黃之鋒今天上午接受電台訪問,談到先前絕食超過100小時,黃之鋒表示,他的身體狀況已經恢復正常,另一名參與絕食的成員黃子悅仍留院觀察。 + +根據《明報》報導,警方可能於週三協助執行部分金鐘佔領區的禁制令,黃之...
                    + http://newtalk.tw/news/2014/12/08/54551.html + 2014-12-08 13:09:07 + http://newtalk.tw/news/2014/12/08/54551.html +
                    + + 感謝馬英九為我們準備好了冰櫃(管仁健) +
                    ]]>新頭殼newtalk2014.12.08 文/管仁健 + +沒有最爛,只有更爛。九合一大選國民黨不但慘敗,而且差距的懸殊,讓最會酸人的鄉民們都難以想像。選後第一時間閣揆江宜樺辭職了,黨秘書長曾永權也辭了,但棄了兩車仍無法保帥,惹出天怒人怨的馬英九,終於不甘不願地辭了黨主席。然而搞了好幾天,最後整個內閣總辭卻變成了內閣總留,只走了江宜樺與龍應台,這種敗選後不但不換藥,連湯都懶得換的總統,實在也無藥可救了。 + +當年在倒扁活動時,馬英九曾說:「一個總統,施政滿意度只剩十八趴就可以下台了,不下台就是沒有羞恥心...
                    + http://newtalk.tw/news/2014/12/08/54548.html + 2014-12-08 12:54:25 + http://newtalk.tw/news/2014/12/08/54548.html +
                    + + 宋楚瑜引毛詩談兩岸 要柯文哲「人間正道」 +
                    ]]>新頭殼newtalk2014.12.08 林朝億/台北報導 + +台北市長當選人柯文哲今(8)日上午拜會親民黨主席宋楚瑜;宋楚瑜除了贈送「如瑜得水」一書外,也接受柯文哲邀請擔任台北市政府首席顧問。同時,對於兩岸議題,宋楚瑜也引用毛澤東《七律•人民解放軍佔領南京》裡「人間正道是滄桑」一語,勉勵兩岸要「正道而行,不要像刺蝟一樣」。 + +宋楚瑜、柯文哲會晤今日上午登場,兩人在台北長榮桂冠酒店閉門會談1小時20分鐘。會後,宋楚瑜向媒體表示,他恭賀柯文哲打了一場非常漂亮的選戰,中間選民用選票指出來台灣真正追求的是...
                    + http://newtalk.tw/news/2014/12/08/54550.html + 2014-12-08 12:52:02 + http://newtalk.tw/news/2014/12/08/54550.html +
                    + + 民進黨團要「鹿茸內閣」 解決高失業高物價 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +新任閣揆毛治國在今(8)日就任,立院民進黨團要求毛內閣應優先解決高物價、高失業、低薪3大問題,並呼籲毛不要當馬總統耳裡的「鹿茸」,要傾聽民意,否則人民的憤怒不會停止。此外,由於毛治國在拜會立法院長王金平前先到國民黨黨團去,而遭到民進黨立委黃偉哲批評仍是以黨意為優先。不過,王金平也替毛治國緩頰,是因為他自己的行程有延誤,毛院長才會利用這個空擋,且拜會執政黨的國民黨團相當合理。 + +立法院民進黨團幹事長蔡其昌和立委黃偉哲上午召開記者會表示,現...
                    + http://newtalk.tw/news/2014/12/08/54542.html + 2014-12-08 12:25:06 + http://newtalk.tw/news/2014/12/08/54542.html +
                    + + 投審會:將嚴審頂新賣101股權案 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +經濟部投審會今(8)日上午10點針對頂新集團台北101股權轉讓案,正式對外做出說明指出,迄今尚未接獲相關股權轉受讓申請,該案一旦提出,經濟部將儘速依公共利益、社會觀感及民眾期待等因素為依歸,予以嚴審。另外,因該案涉及之不動產業尚未開放中資投資,將請陸委會、外交部、國安局查核馬來西亞商IOI集團是否具中資背景,因此,投資人若具中資背景,將不予核准。 + +投審會表示,有關立法委員孫大千、林國正、謝國樑及王廷升等4位委員於昨日發表聲明,針對頂新...
                    + http://newtalk.tw/news/2014/12/08/54547.html + 2014-12-08 12:14:10 + http://newtalk.tw/news/2014/12/08/54547.html +
                    + + 網軍、媒體讓藍敗選? 王金平:佔份量不少 +
                    ]]>新頭殼newtalk2014.12.08 林雨佑/台北報導 + +國民黨將9合1選舉敗選原因歸咎於網軍和媒體,立法院長王金平今(8)日表示,媒體跟網軍有影響到民意,影響人民想法及投票決定,這是有影響的因素之二,不能完全歸諸這2個因素,「但這2個因素所佔的份量是不少。」 + +王金平上午在立法院受訪,媒體提問國民黨檢討9合1敗選原因,認為是媒體不友善和網軍造謠抹黑,他有何看法時,王金平做了上述表示。 + +媒體另提問,立法院交通委員會將在14日至18日赴日本考察,參訪京都及大阪車站,但台灣高鐵財務問題還沒有...
                    + http://newtalk.tw/news/2014/12/08/54546.html + 2014-12-08 12:00:06 + http://newtalk.tw/news/2014/12/08/54546.html +
                    + + 江宜樺:「鞠躬盡瘁」的過程並非沒意義 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +行政院今(8)日舉行新舊閣揆交接典禮,缷任的江宜樺以「前仆後繼,無怨無悔」為過去6年半的公職生涯寫下註腳,江在致詞時,並2度引述政治哲學家漢娜.鄂蘭的話,強調「鞠躬盡瘁」的過程並不是沒有意義,而「前仆後繼」讓國家重大施政得以綿延不絕,仆倒後,有人接棒再跑,不達終點,絕不放棄。他在交接典禮後,巡視政院一周,並和同仁一一握手後,自己開車離開。 + +江宜樺在致詞時指出,民眾的評價可能會讓同仁感到挫折或委屈,甚至懷疑自己參與政治生活是否值得。但...
                    + http://newtalk.tw/news/2014/12/08/54545.html + 2014-12-08 11:51:01 + http://newtalk.tw/news/2014/12/08/54545.html +
                    + + 遭諷看守內閣 綠委:毛做3件事就能逆轉勝 +
                    ]]>新頭殼newtalk2014.12.08 翁嫆琄/台北報導 + +新任行政院長毛治國今(8)日正式交接,雖然朝野立委對此都不甚期待,但民進黨立委蔡煌瑯上午仍呼籲毛治國,若能做到調降油電價格、讓前總統陳水扁保外就醫、否決頂新售101股權案,就能獲得社會掌聲。 + +蔡煌瑯指出,目前國際油價已大跌38%,天然氣價格也降了2成多,因此毛內閣若能調降油電價格,就能展現苦民所苦的誠意。 + +而最近再度浮上檯面的陳水扁保外就醫議題,蔡煌瑯認為,扁的身體狀況不佳是事實,醫療團隊也建議應讓扁居家療養,如果新內閣能促成此...
                    + http://newtalk.tw/news/2014/12/08/54544.html + 2014-12-08 11:39:08 + http://newtalk.tw/news/2014/12/08/54544.html +
                    + + 頂新賣101持股 毛治國籲勿違反國人期待 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +頂新集團擬將所持有的台北101大樓37%股權以27.4億馬幣(新台幣251.4億元)賣給馬來西亞房地產集團IOI,今(8)日新上任的行政院長毛治國對此表示,已要求經濟部、財政部密切注意此案處理過程,也呼籲頂新不要做出違反國人期待的事情。 + +毛治國表示,頂新退出101經營與轉換股權符合社會期待,但101股權移轉不同於一般商業財產處分,必須符合法令、顧及公共利益、社會觀感和人民期待;因此,他已要求經濟部、財政部關注此案發展,並呼籲頂新不要做...
                    + http://newtalk.tw/news/2014/12/08/54543.html + 2014-12-08 11:30:08 + http://newtalk.tw/news/2014/12/08/54543.html +
                    + + 頂新賣101 財政部反對外資取得經營權 +
                    ]]>新頭殼newtalk2014.12.08 翁嫆琄/台北報導 + +頂新將台北101股權賣給馬來西亞地產商IOI集團,對此,財政部長張盛和今(8)日在立法院表示,台北101是台灣的地標及精神象徵,不適合由外資經營,投審會須考量適不適合,財政部也會表達反對立場。 + +張盛和今赴立法院財政委員會進行專案報告,針對頂新售出101股權一事,張盛和指出,馬來西亞商IOI集團應該是要取得經營權的,但101是台灣的地標,也是精神象徵,不應由外國人來經營,還是由國人掌握較佳。 + +至於公股有無可能買下101股權,張盛和...
                    + http://newtalk.tw/news/2014/12/08/54541.html + 2014-12-08 11:22:04 + http://newtalk.tw/news/2014/12/08/54541.html +
                    + + 毛治國:以更謙卑態度 促成跨世代合作 +
                    ]]>新頭殼newtalk2014.12.08 謝莉慧/台北報導 + +行政院今(8)日舉辦所屬各主管機關卸、新任首長聯合交接典禮。新任閣揆毛治國表示,他將在前院長江宜樺所建立的基礎上,以更謙卑的態度,主動理解民眾的期盼與需求,積極進行溝通。尤其必須了解網路族群的需求,促成跨世代的合作,並協助年輕世代完成夢想。 + +毛治國上午在新舊任行政院長交接典禮上表示,為了維持國家穩定運作,為民服務的工作不能有空窗期,幾經思考後,才決定接下馬英九總統交付的任務。而在他的公務生涯中,多次臨危受命,但這次所面對的挑戰,遠超過...
                    + http://newtalk.tw/news/2014/12/08/54540.html + 2014-12-08 11:13:03 + http://newtalk.tw/news/2014/12/08/54540.html +
                    + + 珍珠港事件73週年紀念 夏威夷3千人默禱 +
                    ]]>新頭殼newtalk2014.12.08 鄭凱榕/編譯報導 + +1941年12月舊日本軍於當地時間7日(台灣時間8日)攻擊美國夏威夷的珍珠港至今已經73年了,追悼戰爭犧牲者的儀式在面向珍珠港的公園舉行。 + +根據日本共同通信社8日報導,當地時間7日上午7時55分,日本偷襲珍珠港攻擊發動的時間,約有3千人參加儀式進行默禱致意。 + +儀式中,有一半日本血統的美國太平洋艦隊司令官的哈里斯(Harry B Harris Jr.)表示:「我們不可忘記珍珠港(的教訓),要經常性地準備因應非常事態。為了不發生非常...
                    + http://newtalk.tw/news/2014/12/08/54539.html + 2014-12-08 09:43:57 + http://newtalk.tw/news/2014/12/08/54539.html +
                    + + 中印支援馬爾地夫 火災導致淡水不足 +
                    ]]>新頭殼newtalk2014.12.08 鄭凱榕/編譯報導 + +印度洋上的島嶼國家馬爾地夫(Maldives)首都馬列(Male),由於將海水淡水化的設備發生火災,導致嚴重缺水,印度和中國到8日為止,持續緊急支援馬爾地夫的生活用水。 + +根據日本共同通信社8日報導,印度洋這個區域的大國印度,以及希望能和位處海上絲路要衝位置的馬爾地夫強化關係的中國,藉由支援馬爾地夫生活用水,正在此進行「支援戰」的角力布局。 + +根據馬爾地夫地方媒體報導,該國淡水化設備於4日因為發生火災而故障。修復的作業目前陷入困難,...
                    + http://newtalk.tw/news/2014/12/08/54538.html + 2014-12-08 09:11:19 + http://newtalk.tw/news/2014/12/08/54538.html +
                    + + 昭和時代的象徵:映像管電視 明年掰掰 +
                    ]]>新頭殼newtalk2014.12.08 鄭凱榕/編譯報導 + +根據日本《讀賣新聞》8日報導,全世界映像管電視預計明年正式停產。 + +由於高畫質的液晶電視普及,目前還在製造映像管電視的夏普(Sharp)和印度2家公司決定停產,映像管電視時代正式終結,在日本可以說是象徵著「昭和」時代的映像管,也將在市場上消失。 + +電視的螢幕,除了液晶和映像管以外,雖然有畫質優良的有機EL(Organic Electro-Luminescence,有機電激發光)電視,但是有機EL應用在大型化量產上仍有困難,仍然停留在...
                    + http://newtalk.tw/news/2014/12/08/54533.html + 2014-12-08 09:05:19 + http://newtalk.tw/news/2014/12/08/54533.html +
                    + + 東北季風增強水氣多 北台灣轉涼有短暫雨 +
                    ]]>新頭殼newtalk2014.12.08 鄭凱榕/綜合報導 + +中央氣象局於今(8)日凌晨2時50分對北北基發布大雨特報,受到東北季風增強,今日基隆北海岸及大台北山區有局部大雨發生的機率,請注意瞬間大雨及強陣風。 + +同日4時10分,除了南投縣、嘉義市以外,中央氣象局對全台灣發布陸上強風特報,東北風增強,今日台灣沿海空曠地區及蘭嶼、綠島、澎湖、金門、馬祖將有9至11級強陣風出現,請注意。 + +根據中央氣象局預報,今日東北季風將增強,水氣也逐漸增多,北部、東半部地區及中南部山區將轉為有短暫雨的天氣,其...
                    + http://newtalk.tw/news/2014/12/08/54537.html + 2014-12-08 08:45:23 + http://newtalk.tw/news/2014/12/08/54537.html +
                    + + 李新、李全教表態參選國民黨主席 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +馬英九辭去中國國民黨主席一職後,即將改選,就在各界觀望之際,目前已有台北市議員李新和甫當選台南市議員的李全教均表態將參選國民黨主席;李新並將於明天上午10時舉行記者會說明。李新辦公室主任楊立說,李新參選絕對「玩真的」,「打死不退」。 + +李全教則表示,為了黨內團結,將在10日中常會中向代理主席吳敦義提出放棄立法院長王金平黨籍上訴案,讓國民黨和解。 + +國民黨在上個月底的九合一選舉遭逢重大挫敗,李新辦公室今天表示,國民黨遭逢空前慘敗,救亡...
                    + http://newtalk.tw/news/2014/12/07/54536.html + 2014-12-07 23:55:11 + http://newtalk.tw/news/2014/12/07/54536.html +
                    + + 龍應台感性談話 江宜樺拭淚 +
                    ]]>(中央社台北7日電) + +行政院長江宜樺明天卸任,今(7)晚宴請閣員感謝過去協助時,聽到將卸任的文化部長龍應台感性談話,拿出手帕拭淚。江宜樺妻子李淑珍說,家裡很高興江宜樺未來可加入輪流洗碗行列;她透露,總統馬英九有次致電江宜樺,被女兒接到,女兒撒嬌向馬總統說,「你把我爸爸還給我」。 + +江宜樺晚間與李淑珍宴請閣員,內政部長陳威仁、交通部長葉匡時、行政院農業委員會主任委員陳保基、行政院副秘書長蕭家淇及即將卸任的行政院海岸巡防署長王進旺等受邀閣員都攜伴參加。 + +龍應台穿白上衣、黑長裙,圍紅色...
                    + http://newtalk.tw/news/2014/12/07/54535.html + 2014-12-07 23:40:55 + http://newtalk.tw/news/2014/12/07/54535.html +
                    + + 「新地平線」甦醒 開始回傳冥王星資料 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +美國太空船「新地平線」(New Horizons)花了9年航行後,已結束冬眠,今天從沉睡中甦醒,將首度探索遙遠的主要由岩石和冰組成的冥王星,以及環繞冥王星的最大衛星。「新地平線」太空船的電腦持續每週傳送訊息,經過4小時傳輸後抵達地球。 + +「新地平線」自2006年1月發射,後來冬眠1873天,大約2/3的旅程都在睡,以保存太空船電力,並將監控所需資源降到最小。在這趟旅程中,美國國家航空暨太空總署(NASA)工程師每隔幾個月就會喚醒「新地平...
                    + http://newtalk.tw/news/2014/12/07/54534.html + 2014-12-07 23:22:19 + http://newtalk.tw/news/2014/12/07/54534.html +
                    + + 蔡英文謝游錫堃:新北出現強勢黨團 +
                    ]]>新頭殼newtalk2014.12.07 陳冠廷/新北報導 + +民進黨主席蔡英文今(7)日晚間出席新北市長候選人游錫堃的感恩餐會,這也是民進黨在9合1的勝選後,蔡英文首度的造訪新北市。蔡英文說,游錫堃選完後,在網路上爆紅,也顯示全台灣包括網路上這些網友,對游錫堃在這次的選戰表現,都給予肯定。她相信,新北市議員在游錫堃的領軍下,議員的成長,在這次議長選舉裡面有一個優勢,將來在議會的運作上,民進黨團一定是一個強勢的黨團。 + +蔡英文表示,新北市長選舉的這場選戰打得非常漂亮,這本來就是非常、非常困難的選...
                    + http://newtalk.tw/news/2014/12/07/54532.html + 2014-12-07 22:47:00 + http://newtalk.tw/news/2014/12/07/54532.html +
                    + + 柯文哲:扁醫療沒爭議 只剩政治問題 +
                    ]]>新頭殼newtalk20014.12.07 張永安/台北報導 + +台北市長當選人柯文哲今(7)天表示,前總統陳水扁的問題在醫學上已經不需要討論了,目前的照護醫療團隊對於他的醫學問題我們完全都有共識,所以他以後有沒有當醫療小組召集人不是那麼重要,因為剩下的只是政治上要怎麼解決的問題。 + +柯文哲今天是接受媒體詢問是否確定23日會去看前總統陳水扁時作以上表示。柯文哲表示,他本來是排23日,但也要看陳前總統時間,也要他方便。 + +媒體詢問是否就任市長之後也不會辭去陳水扁前總統醫療小組召集人,柯文哲表示,當...
                    + http://newtalk.tw/news/2014/12/07/54531.html + 2014-12-07 19:36:03 + http://newtalk.tw/news/2014/12/07/54531.html +
                    + + 中資禁入101 買方創辦人資金將嚴查 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +頂新昨天出售101股權給馬來西亞的IOI集團,由於此舉政府事先不知情,引起各界震驚。經濟部今(7)天表示,買方必須具結沒有中資,即使是IOI集團創辦人個人資金也會加以嚴審。不過經濟部官員也強調,審理台北101股權交易案過程,會考慮避免對台灣招商引資形象造成負面影響。 + +此外,官員也指出,主管機關准駁,更是上市公司股權轉售是否通過的關鍵,當年AIG出售南山予博智案未通過金管會這關即是一例。至於投資審查委員會部分,參與成員包含20個相關部會...
                    + http://newtalk.tw/news/2014/12/07/54530.html + 2014-12-07 19:17:10 + http://newtalk.tw/news/2014/12/07/54530.html +
                    + + 從此拒絕真護航的假監督(王乾任) +
                    ]]>新頭殼newtalk20014.12.07 文/王乾任 + +九合一大選結束後,宣告將繼續監督當選人的聲音,前所未有的強大。 + +雖說民主本來就不是四年投票一次,最好的民主應該是自己支持的候選人自己監督,然而,實際上過去的台灣,人心常常因為護短的緣故,對於自己支持而當選的人,常常是護短更多於監督。 + +說到監督,更多的意思是監督我不支持的敵對對手,而非自己支持的對手。 + +於是這些年間,出現了很有趣的「監督」,完全執政的執政黨做錯事時,部分輿論認為是前朝執政者的錯,是前朝任內發生的錯誤,還好現任執政...
                    + http://newtalk.tw/news/2014/12/07/54529.html + 2014-12-07 18:37:05 + http://newtalk.tw/news/2014/12/07/54529.html +
                    + + 北宜鐵案引批評 柯文哲:寧可再討論一遍 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +台北市市長當選人柯文哲主張北宜直線鐵路採取最短路線,如此將穿越翡翠水庫集水區,引發環保團體批評。柯文哲下午對此回應指出,他並不是說就這樣定案,但北宜直鐵路線也應考量人民時間成本,環保問題可以再討論,而一條鐵路影響50年,寧可再討論一遍。 + +不過,多個反對北宜直鐵的環保團體已經表示,此次交通議題,影響水源、水質、水量之潔淨與安全,事涉廣大,為強力監督「超越藍綠」的台北市政府,環團近日將拜會柯文哲先生,提出環保建議,以避免新市長落入經濟迷失...
                    + http://newtalk.tw/news/2014/12/07/54528.html + 2014-12-07 18:23:12 + http://newtalk.tw/news/2014/12/07/54528.html +
                    + + 中共打貪最大隻 周永康被開除黨籍法辦 +
                    ]]>新頭殼newtalk2014.12.07 李雲深/綜合報導 + +新華社6日凌晨發初公告,宣布前中國國家安全首領周永康已因包括受賄、協助親友侵吞國家財產及洩露官方機密等理由被開除黨籍並批捕。72歲的周永康成為中共政治局常委會退休及在任委員中第一個面臨腐敗案刑事調查的官員。這項公告,被認為是習近平兩年來在黨統治集團內打擊貪污和瀆職運動迄今為止的最大動作。 + +曾代理因腐敗指控受審官員的律師李肖霖稍早說:「現在他已經成為了法治缺乏的受害者,因為他的案子也在經由他自己一手建立起來的法律體系處理。」 + +中共...
                    + http://newtalk.tw/news/2014/12/07/54526.html + 2014-12-07 17:36:05 + http://newtalk.tw/news/2014/12/07/54526.html +
                    + + 水庫路線環評早被否決 北宜直鐵難最短 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +台北市當選人柯文哲今天拜會宜蘭縣長林聰賢後表示,雙方對於北宜直鐵案達成路線最短共識。但最早北宜直鐵方案因為太靠近翡翠水庫集水區,早於2006年5月19日進行環保署環境影響評估時,便遭到否決,才會出現目前的第二方案。如今柯主張的最短路線,是直接穿過大台北水源的翡翠水庫集水區,要通過的難度顯然更高。 + +此外,許多環保團體認為,根本不應該興建北宜直線鐵路,看守台灣協會祕書長謝和霖即認為,台北到宜蘭有雪山隧道,搭客運已相當快捷,不應再建鐵路破壞...
                    + http://newtalk.tw/news/2014/12/07/54525.html + 2014-12-07 16:39:57 + http://newtalk.tw/news/2014/12/07/54525.html +
                    + + 北宜鐵路怎麼開?柯林共識:最短路線 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +無黨籍台北市長當選人柯文哲今(7)早前往宜蘭拜會宜蘭縣長林聰賢,針對北宜直線鐵路的路線問題,柯文哲表示,從台北市政府至宜蘭縣政府開車僅須一小時,所以宜蘭縣也算在首都生活圈中,目前雙方的共識是走最短的路線;若怕會影響翡翠水庫環保,就應該提出數據,讓大家在數據上攻防,若翡翠水庫的環保問題是可以解決的,那當然選擇最短路線。 + +宜蘭縣副縣長吳澤成也表示,要爭取最快的才會達到基本的效益,路線上的初步決定是第一方案是最短的路線,但目前在總合規劃中,...
                    + http://newtalk.tw/news/2014/12/07/54524.html + 2014-12-07 15:01:08 + http://newtalk.tw/news/2014/12/07/54524.html +
                    + + 錯覺藝術大師來了 艾雪魔界高雄展出 +
                    ]]>新頭殼newtalk2014.12.07 金名/高雄報導 + +「錯覺藝術大師-艾雪的魔幻世界畫展」即日起到明年1月11日在高雄市立美術館展出。這位國際知名的荷蘭版畫藝術家,作品中充滿秩序又混亂的奇特畫面,隱含數學、科學、物理學與哲學等概念,連他自己對這些作品到底是數學或藝術,也充滿疑問,讓觀眾穿梭於真實與虛擬的空間中,挑戰視覺感官及邏輯思維。 + +摩利茲‧柯尼利斯‧艾雪1972年過世,被視為20世紀藝壇上的一株奇異花朵。宇宙、白日夢、無限、幾何、規律、魔術師、感知、鏡子、遊戲等都是艾雪的代名詞。他獨樹...
                    + http://newtalk.tw/news/2014/12/07/54523.html + 2014-12-07 14:39:51 + http://newtalk.tw/news/2014/12/07/54523.html +
                    + + 明天柯宋會 劉文雄盼柯不要常親上媒體 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +親民黨副秘書長劉文雄今(7)天證實,台北市長當選人柯文哲明天將拜會親民黨主席宋楚瑜,兩人會面不預設議題。但劉文雄也指柯文哲最近的發言不恰當,他認為柯作為首都市長,不要急著每天對媒體放話,不要自己每天上媒體。 + +劉文雄表示,選前曾建議柯營總幹事姚立明,選後柯文哲可拜會歷任的台北市長,汲取首都施政經驗,柯營也規劃拜會宋楚瑜,兩人會面不預設議題,但宋楚瑜可提供執政的經驗。 + +他說,宋楚瑜已請幹部們把明天時間空出來,詳細會面的時間與地點會在...
                    + http://newtalk.tw/news/2014/12/07/54522.html + 2014-12-07 14:13:07 + http://newtalk.tw/news/2014/12/07/54522.html +
                    + + 柯文哲:從頭到尾我的兩岸主張都一致 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +台北市長當選人柯文哲今(7)天拜會宜蘭縣長林聰賢後接受媒體訪問時表示,將拜會親民黨主席宋楚瑜,向他請益有關行政效率問題,做為未來施政參考。對於選前宋楚瑜曾要求柯文哲應表態兩岸關係。柯文哲說:「這方面我從頭到尾的態度與立場都很一致,也說過很多次,沒有什麼要特別著墨的地方」。 + +親民黨副秘書長劉文雄上午受訪證實,柯文哲預計明天拜會親民黨主席宋楚瑜。 + +台北市長當選人柯文哲今天到宜蘭拜會縣長林聰賢,隨即進行近1個小時的閉門會議,會再接受媒...
                    + http://newtalk.tw/news/2014/12/07/54521.html + 2014-12-07 13:45:20 + http://newtalk.tw/news/2014/12/07/54521.html +
                    + + 美軍營救失敗 2人質遭蓋達組織殺害 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +美國國防部長黑格(Chuck Hagel)6日證實,美國記者索默斯(Luke Somers)及另一名南非人質已在美軍特種部隊從葉門蓋達組織綁匪手中營救的行動中遇害。他說:「在營救進行時,索默斯與另1名非美籍人質遭到阿拉伯半島蓋達組織恐怖分子殺害。」 + +阿拉伯半島蓋達組織4日揚言,將處死33歲的索默斯。索默斯是1年多前在葉門首都沙那(Sanaa)遭到綁架。南非人質科爾奇(Pierre Korkie)也在突擊行動中遭到殺害。贈物者組織(G...
                    + http://newtalk.tw/news/2014/12/07/54520.html + 2014-12-07 10:52:17 + http://newtalk.tw/news/2014/12/07/54520.html +
                    + + 胡志強:選輸很傷心,我的心碎了 +
                    ]]>新頭殼newtalk2014.12.07 張永安/綜合報導 + +台中市長胡志強尋求連任失利,敗選後一周終於在昨(6)天展開謝票行程,媒體報導,胡志強坦承選輸後很傷心,「我的心碎了」,但不要給別人知道;他也表示,只輸這一次,將來一定要贏下去。 + +國民黨台中市黨部昨天起連續2天分區舉辦「胡志強感恩茶會」,第一場在台中市黨部舉辦首場茶會,受到很多支持者的熱烈歡迎,許多人激動地大哭,還搶著擁抱胡市長大喊「我愛你」,加油聲不斷。還有忠誠老黨員高呼「選總統、選黨主席」,支持「老市長」前進中央。 + +根據聯合報...
                    + http://newtalk.tw/news/2014/12/07/54519.html + 2014-12-07 09:54:31 + http://newtalk.tw/news/2014/12/07/54519.html +
                    + + 報導台灣選舉 日媒打破慣例(野島剛) +
                    ]]>新頭殼newtalk2014.12.07 文/野島剛 + +這次台灣的地方選舉結果出爐,執政黨的國民黨面臨了前所未有的重大挫敗,而日本媒體又是如何報導的呢?我試著比較日本5大報社的相關新聞,在標題和篇幅上分別反映出了各家報社的關注焦點,而在內容上因為著重在「日本人想知道的台灣選舉」,所以和台灣媒體的觀點有些許差異。 + +日本媒體本身很重視的就是「新聞價值」,並且依此來安排版面。日本報紙的首先是「綜合版」,共有三面來刊登國內外的各種新聞,通常最重要的新聞是放在第一面,次要的就放在第二、三面,接著是依照新聞...
                    + http://newtalk.tw/news/2014/12/07/54518.html + 2014-12-07 09:04:42 + http://newtalk.tw/news/2014/12/07/54518.html +
                    + + 談台灣亞洲角色 藍綠和解意外成話題 +
                    ]]>新頭殼newtalk2014.12.06 鄭方行/台北報導 + +在馬英九重兩岸、輕外交的執政主軸下,近年來談台灣國際角色的夠份量的研討會已經少見,今(6)日由新台灣國策智庫以及華府智庫「Project 2049」共同擧辨的「2014年亞洲新態勢與台灣角色國際研討會」是個例外,來自美、日、韓、印度、澳洲以及台灣本地的重量級與會者,讓這場研討會更受到注目。 + +當然兩位美國前國務院亞太事務助卿薛瑞福及坎貝爾的參加是矚目的焦點。薛瑞福主張美國政府應公開表達立場,准許美國工業協助台灣建造柴油潛艇,以及將級軍官...
                    + http://newtalk.tw/news/2014/12/06/54517.html + 2014-12-06 22:58:03 + http://newtalk.tw/news/2014/12/06/54517.html +
                    + + 學民思潮黃子悅停止絕食 送醫檢查 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +香港學民思潮成員黃子悅在絕食118小時後,體重暴跌至36.8公斤,因出現脫水症狀和懷疑電解質不足,今(6)晚已停止絕食,並經現場醫生的勸告下,由救護車送往律敦治醫院檢查。 + +參與「佔中」行動的學生組織學民思潮召集人黃之鋒和2名學民思潮成員,從1日晚間開始絕食,要求港府與學生重啟政改對話。3日起,又有2名學生加入絕食行列。 + +不過,絕食學生的健康最近都出現狀況,香港浸會大學生盧彥慧5日出現發燒、頭暈、心跳太快等症狀,當天晚間結束94個...
                    + http://newtalk.tw/news/2014/12/06/54516.html + 2014-12-06 22:43:52 + http://newtalk.tw/news/2014/12/06/54516.html +
                    + + 美前官員:台應與中國之外國家密切來往 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +美國國務院前亞太事務助理國務卿坎貝爾(Kurt Campbell)今(6)日表示,亞洲國家應強化彼此的交流,日韓雙邊關係的改善,有助於建立美日韓三邊同盟關係的發展。台灣也應該分散其對外交往,與中國之外的國家建立更密切的關係。 + +新台灣國策智庫與美國華府智庫「2049計畫研究室」(Project 2049 Institute)今天舉行「2014年亞洲新態勢與台灣角色」國際研討會,前東亞和太平洋地區事務助理國務卿、亞太地區戰略諮詢公司「亞洲...
                    + http://newtalk.tw/news/2014/12/06/54515.html + 2014-12-06 22:14:03 + http://newtalk.tw/news/2014/12/06/54515.html +
                    + + 香港能不揭竿而起嗎?(二火) +
                    ]]>新頭殼newtalk2014.12.06 文/二火 + +香港陷入膠著已經很久了,鷹派一直想攻政府總部,鴿派反對。鷹派自己當然也知道,這個政府只是個幌子,說好聽點是執行單位,攻下這個政府,並不能傷到背後真正的主子。 + +這主子,很多人以為是中南海。當然北京是這一切民權收網的發動者,但背後的主子並非指這些人,並非指共產黨或中國,我指的是香港的本地的統治力量,也就是財團、富人、1%的主宰者。 + +這些人當然不關心民權問題,事實上就是這些人將香港人民的民權收歸己有,將之拿來當作聚積財富的工具。權力即是財富,...
                    + http://newtalk.tw/news/2014/12/06/54514.html + 2014-12-06 19:14:12 + http://newtalk.tw/news/2014/12/06/54514.html +
                    + + 101易主 柯P:別幻想我什麼題目都會 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/台北報導 + +無黨籍台北市長當選人柯文哲今(6)日下午前往競選總部向附近商家及志工道謝,並在總部為多尊達摩點上眼睛。對於媒體詢問台北101將變成外商入主一事,柯文哲表示,不要幻想他什麼題目都會,他只是保證會組織一個什麼都會的團隊,但不是他一個人什麼都會,像這種題目他一定問財政局長,整體討論後再回應。 + +柯文哲下午前往競選總部向附近商家及志工道謝,柯文哲表示,包括總部成立、選前之夜還有勝選等活動都沒有去租大型場地,只有封街,影響到隔壁商家的生意,現在總...
                    + http://newtalk.tw/news/2014/12/06/54513.html + 2014-12-06 19:04:03 + http://newtalk.tw/news/2014/12/06/54513.html +
                    + + 絕食108小時 黃之鋒停止絕食返家休息 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +為爭取香港真普選,學民思潮召集人黃之鋒等成員發起絕食行動,不過,卻在絕食108小時後,學民思潮今(6)日下午宣布,黃之鋒從中午12時停止絕食,已經回家休息。黃之鋒則在下午4點多在臉書po文指出,因為身體極度不適,頭暈、四肢乏力,在加上血糖長期處於低水平的2.7,在醫生的強烈要求下,他停止絕食了。 + +根據香港《明報》報導,一直監測絕食成員身體狀況的醫生陳淑櫻說,黃之鋒絕食期間血糖長時間低過4,一度還跌破3,雖然今早喝了寶礦力,讓血糖回升至...
                    + http://newtalk.tw/news/2014/12/06/54512.html + 2014-12-06 18:41:08 + http://newtalk.tw/news/2014/12/06/54512.html +
                    + + 頂新101股權閃賣大馬地產商IOI 賺190億 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +頂新集團正式退出台北101!持有台北101國際金融大樓37.1%股權的頂新,昨日以250多億台幣出售給馬來西亞地產商IOI集團,根據IOI集團所發出的公告,這筆交易將在明年第1季完成,而預估頂新出售股權獲利達190億元。頂新集團發言人賈先德今(6)日已證實相關訊息。 + +根據《彭博社》報導,吉隆坡證交所公告,馬來西亞IOI房地產集團(IOI Properties)已出價251.4億新台幣(約8.07億美元),從4位賣家手中購買台北101金...
                    + http://newtalk.tw/news/2014/12/06/54511.html + 2014-12-06 18:06:05 + http://newtalk.tw/news/2014/12/06/54511.html +
                    + + 王金平黨籍案 郝龍斌支持國民黨撤告 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +國民黨在9合1選舉中慘敗後,黨內出現不少的檢討聲浪,部分藍委建議國民黨內部要團結,須先撤銷對立法院長王金平的黨籍存續訴訟。對此,身兼國民黨副主席的台北市長郝龍斌今(6)日表示,國民黨面臨很嚴峻的挑戰,黨內團結、共體時艱是基本的共識,他個人支持國民黨對王金平黨籍訴訟案撤告。 + +郝龍斌上午出席「花蓮、東港、琉球漁產新鮮直送,琉球區漁會邀台北民眾免費品嚐」活動,會後接受聯訪時,媒體提問關於王金平黨籍案以及上午為何未出席國家祈禱早餐會。 + +...
                    + http://newtalk.tw/news/2014/12/06/54510.html + 2014-12-06 16:43:05 + http://newtalk.tw/news/2014/12/06/54510.html +
                    + + 台南清燙牛肉節登場 千人共享牛肉湯 +
                    ]]>新頭殼newtalk2014.12.06 黃博郎/台南報導 + +台南清燙牛肉節今(6)日在永康區大橋夜市熱鬧展開,一早天色未亮時,許多知名店家即到場熬煮湯頭料理,香氣四溢,吸引上千民眾聞香而來,爭相排隊品嚐,一同見證台南好味道,享用最新鮮的牛肉湯。 + +活動由台南市副市長顏純左、農委會副主委王政騰等人敲鐘揭幕。顏純左表示,製作清燙牛肉的過程,做工簡單,滋味絕佳,使用溫體牛肉來烹調,加上熬煮的高湯,讓台南清燙牛肉的特殊性,成為全台獨一無二的佳餚。王政騰強調,台南清燙牛肉節活動由農業局和觀光局一同舉辦,...
                    + http://newtalk.tw/news/2014/12/06/54509.html + 2014-12-06 16:13:02 + http://newtalk.tw/news/2014/12/06/54509.html +
                    + + 沒護照沒出國 高榮伊波拉疑例陰性未感染 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +高雄榮總醫院昨晚通報疑似感染伊波拉的19歲個案,醫院緊急採集該男子血液檢體送驗,檢驗結果今(6)日下午出爐,檢驗結果呈陰性,排除感染。疾管署副署長莊人祥表示,疑似個案男子自述曾到奈及利亞旅遊,但依男子提供的身分證字號查詢出入境紀錄,男子沒有辦過護照,更沒有出國。若調查發現男子說謊,不排除依違反《傳染病防治法》開罰,最高可處15萬元罰鍰。 + +高榮昨晚收治的這名19歲休學的台灣男子,患者自述有發燒且上吐下瀉症狀,剛從非洲奈及利亞旅遊回台,且...
                    + http://newtalk.tw/news/2014/12/06/54508.html + 2014-12-06 15:45:04 + http://newtalk.tw/news/2014/12/06/54508.html +
                    + + 馬英九:盼像摩西交棒年輕人完成使命 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +總統馬英九今(6)日上午出席國家祈禱早餐會,他在致詞時表示,9合1選舉剛過去,政治版圖也出現很大變動,對執政黨來講,確實是前所未有的挫敗;這次的選舉,人民用選票清楚地告訴政府,改革還不夠快,政府還不能夠符合人民的期待。馬也舉聖經故事為例,期許自己能像摩西一樣,交棒讓年輕人完成使命。 + +馬英九上午出席第14屆國家祈禱早餐會,新北市長朱立倫、桃園縣長吳志揚、台東縣長黃健庭、國民黨籍立法委員簡東明、賴士葆等人也都出席。原定出席的台北市長郝龍斌...
                    + http://newtalk.tw/news/2014/12/06/54507.html + 2014-12-06 14:41:08 + http://newtalk.tw/news/2014/12/06/54507.html +
                    + + 高榮伊波拉疑例 疾管署:查無出境紀錄 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +高雄榮總昨晚通報疑似感染伊波拉的19歲個案,在引起社會高度關注後,今(6)日上午卻出現大逆轉。據疾管署副署長莊人祥表示,依該名男子提供的身分證字號查詢出入境紀錄,並未發現男子有出國紀錄。 + +高榮昨晚收治的這名19歲男子,患者自述有發燒且上吐下瀉症狀,剛從非洲奈及利亞回台,且在當地有食用「蝙蝠餐」。高榮擔心有感染伊波拉病毒的疑慮,將男子收治到負壓隔離病房。據高榮上午表示,該名男子自述3日有發燒情形,但仍從南投到高雄,準備到高雄求職,沿路搭...
                    + http://newtalk.tw/news/2014/12/06/54506.html + 2014-12-06 13:35:03 + http://newtalk.tw/news/2014/12/06/54506.html +
                    + + 陳為廷託人送親筆信 要黃之鋒保重撐住 +
                    ]]>新頭殼newtalk2014.12..06 林禾寧/綜合報導 + +香港學民思潮召集人黃之鋒等5名成員,為爭取香港普選進行絕食抗議,黃之鋒今(6)日上午在臉書po文說,「絕食106小時,好累好累,好辛苦,還要凍醒了」。而台灣太陽花學運領袖陳為廷則託人帶來親筆信,給黃之鋒打氣,希望「港人也可以有這天,落實我們的共同理想!保重!撐住!」 + +據香港《明報》報導,黃之鋒和另一名同時開始絕食的學民成員黃子悅,昨晚在醫護人員的勸告下,喝了電解質飲品。今天上午9時,兩人的血糖值回升,分別為4.1及4.5。而另外2名...
                    + http://newtalk.tw/news/2014/12/06/54505.html + 2014-12-06 12:40:03 + http://newtalk.tw/news/2014/12/06/54505.html +
                    + + 伊波拉疑例已退燒 檢驗結果下午公布 +
                    ]]>新頭殼newtalk2014.12.06 林禾寧/綜合報導 + +高雄榮民總醫院5日晚間8點左右,收了一名疑似感染伊波拉病毒的19歲左右男子,緊急送進負壓隔離病房。據高榮內科部主任陳垚生今(6)日表示,自被送進負壓病房到目前為止,患者已無發燒,研判感染伊波拉可能性低。而患者檢體今送疾管署檢驗,檢驗結果下午將公布。 + +高榮昨晚收治的這名19歲男子,有發燒且上吐下瀉症狀,因患者剛從非洲奈及利亞回台,且在當地有食用「蝙蝠餐」,高榮擔心有感染伊波拉病毒的疑慮,將男子收治到負壓隔離病房。 + +高榮內科部主任、...
                    + http://newtalk.tw/news/2014/12/06/54504.html + 2014-12-06 11:48:06 + http://newtalk.tw/news/2014/12/06/54504.html +
                    + + 日本學者觀察台灣地方選舉(小笠原欣幸) +
                    ]]>新頭殼newtalk2014.12.06 文/小笠原欣幸 + +關於2014年台灣地方選舉,出現令人驚訝的結果。國民黨超乎預期地全面敗北。 + +國民黨一口氣失去了台北市、台中市、桃園市、基隆市等執政縣市,從選舉前執政的15縣市激減至6席,民進黨則從原本6縣市倍增到13席,無黨籍則從1席增加到3席。 + +從得票率來看,國民黨40.7%,民進黨47.55%,無黨籍11.74%。單從數據上來看,已可說民進黨取得了壓倒性的勝利,但如果將民進黨支持的台北市無黨籍候選人柯文哲得票的8成算給民進黨的話,民進黨的領先...
                    + http://newtalk.tw/news/2014/12/06/54502.html + 2014-12-06 11:09:01 + http://newtalk.tw/news/2014/12/06/54502.html +
                    + + 林右昌搬石頭論 創造基隆市長史上最高票 + 新頭殼newtalk2014.12.06 林朝億、劉奕霆/專訪 + +9合1大選結束,民進黨拿下亮麗的13個地方首長成績。其中,5位2009年也參選縣市長的人,有林右昌、鄭文燦、涂醒哲等3個人順利一雪前恥,順利當選。而基隆市長當選人林右昌的得票從2009年的65,673票(42.08%)成長到101,010票(53.15%),創下基隆市長選舉得票最高的紀錄。對此,林右昌有一套搬石頭理論,整地時先搬大石頭、中石頭、小石頭,把土壤發出來,條件成熟後,就會開花結果。 + +這次市長選舉,是林右昌第3次在當地選舉... + http://newtalk.tw/news/2014/12/06/54499.html + 2014-12-06 10:48:09 + http://newtalk.tw/news/2014/12/06/54499.html + + + 高盛:2016年印度經濟成長率將趕過中國 +
                    ]]>新頭殼newtalk2014.12.06 洪聖斐/編譯報導 + +晚近幾年中國經濟成長率持續向下修,很可能會在2年後與印度發生黃金交叉。根據高盛集團(Goldman Sachs)最新的1份報告預測,2016年印度將以6.8%的GDP成長率贏過中國的6.7%,並且在2017年和2018年拉大贏過中國的比例。 + +《華爾街日報》(The Wall Street Journal)的「印度實時報」(India Realtime)5日的報導引述高盛集團的首席印度經濟分析師波達(Tushar Poddar)的見解,...
                    + http://newtalk.tw/news/2014/12/06/54503.html + 2014-12-06 10:25:01 + http://newtalk.tw/news/2014/12/06/54503.html +
                    +
                    \ No newline at end of file diff --git a/tests/models/Crawler/Newtalk/data/listing.json b/tests/models/Crawler/Newtalk/data/listing.json new file mode 100644 index 0000000..177dc0c --- /dev/null +++ b/tests/models/Crawler/Newtalk/data/listing.json @@ -0,0 +1,286 @@ +[ + "http://newtalk.tw/news/2014/10/24/52850.html", + "http://newtalk.tw/news/2014/10/31/53081.html", + "http://newtalk.tw/news/2014/11/03/53147.html", + "http://newtalk.tw/news/2014/11/06/53281.html", + "http://newtalk.tw/news/2014/11/09/53383.html", + "http://newtalk.tw/news/2014/11/13/53564.html", + "http://newtalk.tw/news/2014/11/13/53585.html", + "http://newtalk.tw/news/2014/11/13/53592.html", + "http://newtalk.tw/news/2014/11/14/53637.html", + "http://newtalk.tw/news/2014/11/15/53647.html", + "http://newtalk.tw/news/2014/11/17/53718.html", + "http://newtalk.tw/news/2014/11/18/53775.html", + "http://newtalk.tw/news/2014/11/21/53876.html", + "http://newtalk.tw/news/2014/11/25/54032.html", + "http://newtalk.tw/news/2014/11/28/54150.html", + "http://newtalk.tw/news/2014/11/28/54167.html", + "http://newtalk.tw/news/2014/11/28/54169.html", + "http://newtalk.tw/news/2014/11/28/54192.html", + "http://newtalk.tw/news/2014/11/29/54202.html", + "http://newtalk.tw/news/2014/12/01/54304.html", + "http://newtalk.tw/news/2014/12/01/54316.html", + "http://newtalk.tw/news/2014/12/01/54325.html", + "http://newtalk.tw/news/2014/12/01/54327.html", + "http://newtalk.tw/news/2014/12/02/54368.html", + "http://newtalk.tw/news/2014/12/02/54377.html", + "http://newtalk.tw/news/2014/12/03/54400.html", + "http://newtalk.tw/news/2014/12/04/54449.html", + "http://newtalk.tw/news/2014/12/05/54501.html", + "http://newtalk.tw/news/2014/12/06/54499.html", + "http://newtalk.tw/news/2014/12/06/54502.html", + "http://newtalk.tw/news/2014/12/06/54503.html", + "http://newtalk.tw/news/2014/12/06/54504.html", + "http://newtalk.tw/news/2014/12/06/54505.html", + "http://newtalk.tw/news/2014/12/06/54506.html", + "http://newtalk.tw/news/2014/12/06/54507.html", + "http://newtalk.tw/news/2014/12/06/54508.html", + "http://newtalk.tw/news/2014/12/06/54509.html", + "http://newtalk.tw/news/2014/12/06/54510.html", + "http://newtalk.tw/news/2014/12/06/54511.html", + "http://newtalk.tw/news/2014/12/06/54512.html", + "http://newtalk.tw/news/2014/12/06/54513.html", + "http://newtalk.tw/news/2014/12/06/54514.html", + "http://newtalk.tw/news/2014/12/06/54515.html", + "http://newtalk.tw/news/2014/12/06/54516.html", + "http://newtalk.tw/news/2014/12/06/54517.html", + "http://newtalk.tw/news/2014/12/07/54518.html", + "http://newtalk.tw/news/2014/12/07/54519.html", + "http://newtalk.tw/news/2014/12/07/54520.html", + "http://newtalk.tw/news/2014/12/07/54521.html", + "http://newtalk.tw/news/2014/12/07/54522.html", + "http://newtalk.tw/news/2014/12/07/54523.html", + "http://newtalk.tw/news/2014/12/07/54524.html", + "http://newtalk.tw/news/2014/12/07/54525.html", + "http://newtalk.tw/news/2014/12/07/54526.html", + "http://newtalk.tw/news/2014/12/07/54528.html", + "http://newtalk.tw/news/2014/12/07/54529.html", + "http://newtalk.tw/news/2014/12/07/54530.html", + "http://newtalk.tw/news/2014/12/07/54531.html", + "http://newtalk.tw/news/2014/12/07/54532.html", + "http://newtalk.tw/news/2014/12/07/54534.html", + "http://newtalk.tw/news/2014/12/07/54535.html", + "http://newtalk.tw/news/2014/12/07/54536.html", + "http://newtalk.tw/news/2014/12/08/54527.html", + "http://newtalk.tw/news/2014/12/08/54533.html", + "http://newtalk.tw/news/2014/12/08/54537.html", + "http://newtalk.tw/news/2014/12/08/54538.html", + "http://newtalk.tw/news/2014/12/08/54539.html", + "http://newtalk.tw/news/2014/12/08/54540.html", + "http://newtalk.tw/news/2014/12/08/54541.html", + "http://newtalk.tw/news/2014/12/08/54542.html", + "http://newtalk.tw/news/2014/12/08/54543.html", + "http://newtalk.tw/news/2014/12/08/54544.html", + "http://newtalk.tw/news/2014/12/08/54545.html", + "http://newtalk.tw/news/2014/12/08/54546.html", + "http://newtalk.tw/news/2014/12/08/54547.html", + "http://newtalk.tw/news/2014/12/08/54548.html", + "http://newtalk.tw/news/2014/12/08/54549.html", + "http://newtalk.tw/news/2014/12/08/54550.html", + "http://newtalk.tw/news/2014/12/08/54551.html", + "http://newtalk.tw/news/2014/12/08/54552.html", + "http://newtalk.tw/news/2014/12/08/54553.html", + "http://newtalk.tw/news/2014/12/08/54554.html", + "http://newtalk.tw/news/2014/12/08/54555.html", + "http://newtalk.tw/news/2014/12/08/54556.html", + "http://newtalk.tw/news/2014/12/08/54557.html", + "http://newtalk.tw/news/2014/12/08/54558.html", + "http://newtalk.tw/news/2014/12/08/54559.html", + "http://newtalk.tw/news/2014/12/08/54560.html", + "http://newtalk.tw/news/2014/12/08/54561.html", + "http://newtalk.tw/news/2014/12/08/54562.html", + "http://newtalk.tw/news/2014/12/08/54563.html", + "http://newtalk.tw/news/2014/12/08/54564.html", + "http://newtalk.tw/news/2014/12/08/54565.html", + "http://newtalk.tw/news/2014/12/08/54566.html", + "http://newtalk.tw/news/2014/12/08/54567.html", + "http://newtalk.tw/news/2014/12/08/54568.html", + "http://newtalk.tw/news/2014/12/08/54569.html", + "http://newtalk.tw/news/2014/12/08/54570.html", + "http://newtalk.tw/news/2014/12/08/54571.html", + "http://newtalk.tw/news/2014/12/08/54572.html", + "http://newtalk.tw/news/2014/12/08/54573.html", + "http://newtalk.tw/news/2014/12/08/54574.html", + "http://newtalk.tw/news/2014/12/09/54575.html", + "http://newtalk.tw/news/2014/12/09/54576.html", + "http://newtalk.tw/news/2014/12/09/54577.html", + "http://newtalk.tw/news/2014/12/09/54578.html", + "http://newtalk.tw/news/2014/12/09/54579.html", + "http://newtalk.tw/news/2014/12/09/54580.html", + "http://newtalk.tw/news/2014/12/09/54581.html", + "http://newtalk.tw/news/2014/12/09/54582.html", + "http://newtalk.tw/news/2014/12/09/54583.html", + "http://newtalk.tw/news/2014/12/09/54584.html", + "http://newtalk.tw/news/2014/12/09/54585.html", + "http://newtalk.tw/news/2014/12/09/54586.html", + "http://newtalk.tw/news/2014/12/09/54587.html", + "http://newtalk.tw/news/2014/12/09/54588.html", + "http://newtalk.tw/news/2014/12/09/54589.html", + "http://newtalk.tw/news/2014/12/09/54590.html", + "http://newtalk.tw/news/2014/12/09/54591.html", + "http://newtalk.tw/news/2014/12/09/54592.html", + "http://newtalk.tw/news/2014/12/09/54593.html", + "http://newtalk.tw/news/2014/12/09/54594.html", + "http://newtalk.tw/news/2014/12/09/54595.html", + "http://newtalk.tw/news/2014/12/09/54596.html", + "http://newtalk.tw/news/2014/12/09/54597.html", + "http://newtalk.tw/news/2014/12/09/54598.html", + "http://newtalk.tw/news/2014/12/09/54599.html", + "http://newtalk.tw/news/2014/12/09/54600.html", + "http://newtalk.tw/news/2014/12/09/54601.html", + "http://newtalk.tw/news/2014/12/09/54602.html", + "http://newtalk.tw/news/2014/12/09/54603.html", + "http://newtalk.tw/news/2014/12/09/54604.html", + "http://newtalk.tw/news/2014/12/09/54605.html", + "http://newtalk.tw/news/2014/12/09/54606.html", + "http://newtalk.tw/news/2014/12/09/54607.html", + "http://newtalk.tw/news/2014/12/09/54608.html", + "http://newtalk.tw/news/2014/12/09/54609.html", + "http://newtalk.tw/news/2014/12/09/54610.html", + "http://newtalk.tw/news/2014/12/09/54611.html", + "http://newtalk.tw/news/2014/12/09/54612.html", + "http://newtalk.tw/news/2014/12/10/54613.html", + "http://newtalk.tw/news/2014/12/10/54614.html", + "http://newtalk.tw/news/2014/12/10/54615.html", + "http://newtalk.tw/news/2014/12/10/54616.html", + "http://newtalk.tw/news/2014/12/10/54617.html", + "http://newtalk.tw/news/2014/12/10/54618.html", + "http://newtalk.tw/news/2014/12/10/54619.html", + "http://newtalk.tw/news/2014/12/10/54620.html", + "http://newtalk.tw/news/2014/12/10/54621.html", + "http://newtalk.tw/news/2014/12/10/54622.html", + "http://newtalk.tw/news/2014/12/10/54623.html", + "http://newtalk.tw/news/2014/12/10/54624.html", + "http://newtalk.tw/news/2014/12/10/54625.html", + "http://newtalk.tw/news/2014/12/10/54626.html", + "http://newtalk.tw/news/2014/12/10/54627.html", + "http://newtalk.tw/news/2014/12/10/54628.html", + "http://newtalk.tw/news/2014/12/10/54629.html", + "http://newtalk.tw/news/2014/12/10/54630.html", + "http://newtalk.tw/news/2014/12/10/54631.html", + "http://newtalk.tw/news/2014/12/10/54632.html", + "http://newtalk.tw/news/2014/12/10/54633.html", + "http://newtalk.tw/news/2014/12/10/54634.html", + "http://newtalk.tw/news/2014/12/10/54635.html", + "http://newtalk.tw/news/2014/12/10/54636.html", + "http://newtalk.tw/news/2014/12/10/54637.html", + "http://newtalk.tw/news/2014/12/10/54638.html", + "http://newtalk.tw/news/2014/12/10/54639.html", + "http://newtalk.tw/news/2014/12/10/54640.html", + "http://newtalk.tw/news/2014/12/10/54642.html", + "http://newtalk.tw/news/2014/12/10/54643.html", + "http://newtalk.tw/news/2014/12/10/54644.html", + "http://newtalk.tw/news/2014/12/10/54645.html", + "http://newtalk.tw/news/2014/12/10/54646.html", + "http://newtalk.tw/news/2014/12/10/54647.html", + "http://newtalk.tw/news/2014/12/10/54648.html", + "http://newtalk.tw/news/2014/12/10/54649.html", + "http://newtalk.tw/news/2014/12/10/54650.html", + "http://newtalk.tw/news/2014/12/10/54651.html", + "http://newtalk.tw/news/2014/12/11/54641.html", + "http://newtalk.tw/news/2014/12/11/54652.html", + "http://newtalk.tw/news/2014/12/11/54653.html", + "http://newtalk.tw/news/2014/12/11/54654.html", + "http://newtalk.tw/news/2014/12/11/54655.html", + "http://newtalk.tw/news/2014/12/11/54656.html", + "http://newtalk.tw/news/2014/12/11/54657.html", + "http://newtalk.tw/news/2014/12/11/54658.html", + "http://newtalk.tw/news/2014/12/11/54659.html", + "http://newtalk.tw/news/2014/12/11/54660.html", + "http://newtalk.tw/news/2014/12/11/54661.html", + "http://newtalk.tw/news/2014/12/11/54662.html", + "http://newtalk.tw/news/2014/12/11/54663.html", + "http://newtalk.tw/news/2014/12/11/54664.html", + "http://newtalk.tw/news/2014/12/11/54665.html", + "http://newtalk.tw/news/2014/12/11/54666.html", + "http://newtalk.tw/news/2014/12/11/54667.html", + "http://newtalk.tw/news/2014/12/11/54668.html", + "http://newtalk.tw/news/2014/12/11/54669.html", + "http://newtalk.tw/news/2014/12/11/54670.html", + "http://newtalk.tw/news/2014/12/11/54671.html", + "http://newtalk.tw/news/2014/12/11/54672.html", + "http://newtalk.tw/news/2014/12/11/54673.html", + "http://newtalk.tw/news/2014/12/11/54674.html", + "http://newtalk.tw/news/2014/12/11/54675.html", + "http://newtalk.tw/news/2014/12/11/54676.html", + "http://newtalk.tw/news/2014/12/11/54677.html", + "http://newtalk.tw/news/2014/12/11/54678.html", + "http://newtalk.tw/news/2014/12/11/54679.html", + "http://newtalk.tw/news/2014/12/11/54680.html", + "http://newtalk.tw/news/2014/12/11/54681.html", + "http://newtalk.tw/news/2014/12/11/54682.html", + "http://newtalk.tw/news/2014/12/11/54683.html", + "http://newtalk.tw/news/2014/12/11/54684.html", + "http://newtalk.tw/news/2014/12/11/54685.html", + "http://newtalk.tw/news/2014/12/11/54686.html", + "http://newtalk.tw/news/2014/12/11/54687.html", + "http://newtalk.tw/news/2014/12/11/54688.html", + "http://newtalk.tw/news/2014/12/11/54689.html", + "http://newtalk.tw/news/2014/12/11/54690.html", + "http://newtalk.tw/news/2014/12/11/54691.html", + "http://newtalk.tw/news/2014/12/11/54692.html", + "http://newtalk.tw/news/2014/12/11/54693.html", + "http://newtalk.tw/news/2014/12/11/54694.html", + "http://newtalk.tw/news/2014/12/11/54695.html", + "http://newtalk.tw/news/2014/12/12/54696.html", + "http://newtalk.tw/news/2014/12/12/54697.html", + "http://newtalk.tw/news/2014/12/12/54698.html", + "http://newtalk.tw/news/2014/12/12/54699.html", + "http://newtalk.tw/news/2014/12/12/54701.html", + "http://newtalk.tw/news/2014/12/12/54702.html", + "http://newtalk.tw/news/2014/12/12/54703.html", + "http://newtalk.tw/news/2014/12/12/54704.html", + "http://newtalk.tw/news/2014/12/12/54705.html", + "http://newtalk.tw/news/2014/12/12/54706.html", + "http://newtalk.tw/news/2014/12/12/54707.html", + "http://newtalk.tw/news/2014/12/12/54708.html", + "http://newtalk.tw/news/2014/12/12/54709.html", + "http://newtalk.tw/news/2014/12/12/54710.html", + "http://newtalk.tw/news/2014/12/12/54711.html", + "http://newtalk.tw/news/2014/12/12/54712.html", + "http://newtalk.tw/news/2014/12/12/54713.html", + "http://newtalk.tw/news/2014/12/12/54714.html", + "http://newtalk.tw/news/2014/12/12/54715.html", + "http://newtalk.tw/news/2014/12/12/54716.html", + "http://newtalk.tw/news/2014/12/12/54717.html", + "http://newtalk.tw/news/2014/12/12/54718.html", + "http://newtalk.tw/news/2014/12/12/54719.html", + "http://newtalk.tw/news/2014/12/12/54720.html", + "http://newtalk.tw/news/2014/12/12/54721.html", + "http://newtalk.tw/news/2014/12/12/54722.html", + "http://newtalk.tw/news/2014/12/12/54723.html", + "http://newtalk.tw/news/2014/12/12/54724.html", + "http://newtalk.tw/news/2014/12/12/54725.html", + "http://newtalk.tw/news/2014/12/12/54726.html", + "http://newtalk.tw/news/2014/12/12/54727.html", + "http://newtalk.tw/news/2014/12/12/54728.html", + "http://newtalk.tw/news/2014/12/12/54729.html", + "http://newtalk.tw/news/2014/12/12/54730.html", + "http://newtalk.tw/news/2014/12/12/54731.html", + "http://newtalk.tw/news/2014/12/12/54732.html", + "http://newtalk.tw/news/2014/12/12/54733.html", + "http://newtalk.tw/news/2014/12/12/54734.html", + "http://newtalk.tw/news/2014/12/12/54735.html", + "http://newtalk.tw/news/2014/12/12/54736.html", + "http://newtalk.tw/news/2014/12/12/54737.html", + "http://newtalk.tw/news/2014/12/12/54738.html", + "http://newtalk.tw/news/2014/12/12/54739.html", + "http://newtalk.tw/news/2014/12/12/54740.html", + "http://newtalk.tw/news/2014/12/12/54741.html", + "http://newtalk.tw/news/2014/12/12/54742.html", + "http://newtalk.tw/news/2014/12/12/54743.html", + "http://newtalk.tw/news/2014/12/12/54744.html", + "http://newtalk.tw/news/2014/12/13/54745.html", + "http://newtalk.tw/news/2014/12/13/54746.html", + "http://newtalk.tw/news/2014/12/13/54747.html", + "http://newtalk.tw/news/2014/12/13/54748.html", + "http://newtalk.tw/news/2014/12/13/54749.html", + "http://newtalk.tw/news/2014/12/13/54750.html", + "http://newtalk.tw/news/2014/12/13/54751.html", + "http://newtalk.tw/news/2014/12/13/54752.html", + "http://newtalk.tw/news/2014/12/13/54753.html", + "http://newtalk.tw/news/2014/12/13/54754.html", + "http://newtalk.tw/news/2014/12/13/54755.html", + "http://newtalk.tw/news/2014/12/13/54756.html", + "http://newtalk.tw/news/2014/12/13/54758.html" +] \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/Crawl.test b/tests/models/Crawler/Nownews/Crawl.test new file mode 100644 index 0000000..2e32b6c --- /dev/null +++ b/tests/models/Crawler/Nownews/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_Nownews::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_Nownews::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/Parse.test b/tests/models/Crawler/Nownews/Parse.test new file mode 100644 index 0000000..7f110af --- /dev/null +++ b/tests/models/Crawler/Nownews/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_Nownews::parse (1529819.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/1529819.html'); + $result = Crawler_Nownews::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/1529819.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/data/1529819.html b/tests/models/Crawler/Nownews/data/1529819.html new file mode 100644 index 0000000..8af15bb --- /dev/null +++ b/tests/models/Crawler/Nownews/data/1529819.html @@ -0,0 +1,2198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 歷史探密/揭! 康熙皇帝與侍女蘇麻喇姑的真正關係? | NOWnews 今日新聞 + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + + + + +
                    +
                    + + + + + +
                    + +
                    + +
                    + + + + + +
                    + +
                    + + + +
                    + +
                    + + +
                    +
                    + + +
                    +
                    + + + +
                    + + + +
                    + + +
                    +

                    歷史探密/揭! 康熙皇帝與侍女蘇麻喇姑的真正關係?

                    +
                    + + +

                    NOWnews.com 今日新聞網

                    + +

                    + 2014年 + 12月 + 05日  + 19:21 +

                    +
                    +
                    + +
                    +
                    +
                      + +
                    • + + +
                      蘇麻喇姑。
                      +
                      + +

                      蘇麻喇姑。

                      +
                    • + +
                    +
                    +
                    +
                    + +
                    + +

                    大陸新聞中心/綜合報導

                    + +

                    蘇麻喇姑與康熙到底是什麼關係?這一點已經被電視劇以及史評人說了N遍了。其實蘇麻喇姑和康熙的關係很簡單,就是老侍女與皇帝的關係,再有就是啟蒙老師與學生的關係。

                    +

                    根據第九文化報導,蘇麻喇姑叫蘇茉兒。歷史上的蘇茉兒的確是一位頗具傳奇色彩的人物。她是蒙古族人,生年大約在明萬歷四十年(1612年)前后。最初名字叫蘇茉兒,或蘇墨爾,為蒙語的音譯,意思是毛製的長口袋。順治晚期或康熙年間改稱滿名蘇麻喇,意思是『半大口袋』。她病逝后,宮中上下都尊稱她為蘇麻喇姑。

                    +

                    由於蘇麻喇姑天生美麗聰慧,遠近皆知,被科爾沁貝勒府看中,讓她進府當上了貝勒寨桑的二女兒本布泰的貼身侍女。這位二小姐就是后來大名鼎鼎的孝莊文皇后。后金天命十年,本布泰雖然只有13歲,但已出落得像一個大姑娘了,明眸皓齒,嬌美動人。就在這一年,本布泰在其兄長吳克善的護送下,長途跋涉到了后金都城盛京,與后金汗努爾哈赤的第八子皇太極成婚,當時皇太極34歲。蘇麻喇姑作為本布泰的貼身侍女,也隨主人陪嫁到了盛京。順治元年(1644年)清軍入關,蘇麻喇姑隨已被尊為皇太后的本布泰到達北京,住進了金碧輝煌的紫禁城。

                    +

                    蘇麻喇姑跟她的主人孝莊文皇后一樣,在清宮經歷了四朝。八十多年的漫長歲月裡,蘇麻喇姑從一個地位卑微的侍女逐漸成為倍受皇帝及其家人尊重的老人。剛入宮時,蘇麻喇姑和她的主人孝莊都不懂滿語不識滿文,後來她陪伴孝莊學習滿文滿語,很快就出色地掌握了滿語,並且能寫一手漂亮的滿文。蘇麻喇姑生性聰穎,十分喜歡服裝設計,據《清史稿》和《嘯亭雜錄》記載,清崇德元年(1636年),她曾參與設計製做清朝開國冠服。

                    +

                    蘇麻喇姑是孝莊文皇后喜愛和寵愛的侍女,那她自然就有了很多接觸康熙的機會,孝莊文皇后從小看著康熙長大,康熙的執政、生活和學業她都有干涉。作為皇帝,啟蒙教育很重要,但這一切都需要一位老師,因此孝莊文皇后就讓蘇麻喇姑來做。康熙的一手好字、滿文滿語,蒙古語都是蘇麻喇姑教授的。由於蘇麻喇姑年長且在宮中多年,經驗十足,人品又好,心地善良,因此康熙也很喜歡這位老師,但蘇麻喇姑畢竟比他大40歲,所以康熙的喜歡也只能是喜歡,是一個弟弟對姐姐的那種依賴的喜歡或者是愛。

                    +

                    蘇麻喇姑一身未嫁,晚年有一個養子(雖沒有過任何的過繼儀式,但從實際來看就是養子)。孝莊文皇后於康熙二十六年逝世,生前將自己的曾孫允祹(康熙第十二子)托付給蘇麻喇姑撫養教育。蘇麻喇姑沒有辜負孝莊文皇后的厚望,二十年間,她以自己優秀的品質、良好的性格、廣博的見識和卓越的交際藝術,時時對允祹言傳身教,使允祹很快成長起來。他曾多次遵照父親的旨意處理重大政務,均辦得很出色。康熙晚年,諸皇子圍繞繼位這個問題展開明爭暗鬥,唯獨允祹沒有參與。

                    +

                    允祹與蘇麻喇姑感情十分深厚,他像對待自己的祖母一樣尊敬和愛戴這位老人。蘇麻喇姑晚年患病,牽動了康熙皇帝和允祹的心,康熙當時正在塞外巡視,特意派人為蘇麻喇姑送來草藥,並指示允祹好生照料。允祹和他的妻子心焦如焚,日夜守在蘇麻喇姑的身邊。一個侍女有一個皇帝的兒子當養子,這是莫大的榮譽。假如康熙與蘇麻喇姑真有情人關係,那蘇麻喇姑估計也會有個親生孩子。

                    +

                    大多數人認為跟皇帝關係好的下人就是情人關係,但這也不一定,康熙好色,但絕對不會與一個比自己大40歲的女人同床。就算非要扯上什麼特別的關係,那也只有一種可能,就是康熙的性啟蒙教育是她來完成的。再說一下伍次友,康熙的老師很多,但沒有一個叫伍次友的,歷史上也沒有伍次友,這個人事小說杜撰的。這一點讀者應該都知道!

                    +

                    + + + +

                    + + + + + + +

                    關鍵字: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                    + +
                    +
                    + +
                    + +
                    + + +
                    + + +
                    + + + + + + + + + + + + + +
                    + + + +
                    + + 最新 +
                    + + +
                    +
                    + + + + +
                    + + +
                    + + + + + + +
                    + +
                    + + + + + +
                    + +
                    + + + + + + + + + + + +
                    + +
                    + + + + + + + + + + + +
                    +
                    + + + +
                    + + + + + +
                    + + + + +
                    +

                    網友回應

                    +
                    + +
                    +
                    +
                    +

                    大陸最多瀏覽

                    + + +
                    + +
                    + +
                    +

                    NOWnews 推薦

                    +
                    +
                      + +
                    +
                    + +
                    + + +
                    +
                    + +
                    + + +
                    + +
                    + + + +
                    + +
                    + + +
                    +
                    + + + +
                    + + + + +
                    +
                    + + +
                    +

                    NOWnews 精選

                    +
                    +
                    +
                    +
                    +
                    +
                    +
                    +

                    優質頻道

                    +
                    +
                      +
                    • +
                    • +
                    • +
                    • +
                    • +
                    +
                    +
                    +
                    +
                    + + + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/data/1529819.json b/tests/models/Crawler/Nownews/data/1529819.json new file mode 100644 index 0000000..b2cded7 --- /dev/null +++ b/tests/models/Crawler/Nownews/data/1529819.json @@ -0,0 +1,4 @@ +{ + "title": "歷史探密/揭! 康熙皇帝與侍女蘇麻喇姑的真正關係?", + "body": "大陸新聞中心/綜合報導\n\r\n \r\n 蘇麻喇姑與康熙到底是什麼關係?這一點已經被電視劇以及史評人說了N遍了。其實蘇麻喇姑和康熙的關係很簡單,就是老侍女與皇帝的關係,再有就是啟蒙老師與學生的關係。\n\r\n根據第九文化報導,蘇麻喇姑叫蘇茉兒。歷史上的蘇茉兒的確是一位頗具傳奇色彩的人物。她是蒙古族人,生年大約在明萬歷四十年(1612年)前后。最初名字叫蘇茉兒,或蘇墨爾,為蒙語的音譯,意思是毛製的長口袋。順治晚期或康熙年間改稱滿名蘇麻喇,意思是『半大口袋』。她病逝后,宮中上下都尊稱她為蘇麻喇姑。\n\r\n由於蘇麻喇姑天生美麗聰慧,遠近皆知,被科爾沁貝勒府看中,讓她進府當上了貝勒寨桑的二女兒本布泰的貼身侍女。這位二小姐就是后來大名鼎鼎的孝莊文皇后。后金天命十年,本布泰雖然只有13歲,但已出落得像一個大姑娘了,明眸皓齒,嬌美動人。就在這一年,本布泰在其兄長吳克善的護送下,長途跋涉到了后金都城盛京,與后金汗努爾哈赤的第八子皇太極成婚,當時皇太極34歲。蘇麻喇姑作為本布泰的貼身侍女,也隨主人陪嫁到了盛京。順治元年(1644年)清軍入關,蘇麻喇姑隨已被尊為皇太后的本布泰到達北京,住進了金碧輝煌的紫禁城。\n\r\n蘇麻喇姑跟她的主人孝莊文皇后一樣,在清宮經歷了四朝。八十多年的漫長歲月裡,蘇麻喇姑從一個地位卑微的侍女逐漸成為倍受皇帝及其家人尊重的老人。剛入宮時,蘇麻喇姑和她的主人孝莊都不懂滿語不識滿文,後來她陪伴孝莊學習滿文滿語,很快就出色地掌握了滿語,並且能寫一手漂亮的滿文。蘇麻喇姑生性聰穎,十分喜歡服裝設計,據《清史稿》和《嘯亭雜錄》記載,清崇德元年(1636年),她曾參與設計製做清朝開國冠服。\n\r\n蘇麻喇姑是孝莊文皇后喜愛和寵愛的侍女,那她自然就有了很多接觸康熙的機會,孝莊文皇后從小看著康熙長大,康熙的執政、生活和學業她都有干涉。作為皇帝,啟蒙教育很重要,但這一切都需要一位老師,因此孝莊文皇后就讓蘇麻喇姑來做。康熙的一手好字、滿文滿語,蒙古語都是蘇麻喇姑教授的。由於蘇麻喇姑年長且在宮中多年,經驗十足,人品又好,心地善良,因此康熙也很喜歡這位老師,但蘇麻喇姑畢竟比他大40歲,所以康熙的喜歡也只能是喜歡,是一個弟弟對姐姐的那種依賴的喜歡或者是愛。\n\r\n蘇麻喇姑一身未嫁,晚年有一個養子(雖沒有過任何的過繼儀式,但從實際來看就是養子)。孝莊文皇后於康熙二十六年逝世,生前將自己的曾孫允祹(康熙第十二子)托付給蘇麻喇姑撫養教育。蘇麻喇姑沒有辜負孝莊文皇后的厚望,二十年間,她以自己優秀的品質、良好的性格、廣博的見識和卓越的交際藝術,時時對允祹言傳身教,使允祹很快成長起來。他曾多次遵照父親的旨意處理重大政務,均辦得很出色。康熙晚年,諸皇子圍繞繼位這個問題展開明爭暗鬥,唯獨允祹沒有參與。\n\r\n允祹與蘇麻喇姑感情十分深厚,他像對待自己的祖母一樣尊敬和愛戴這位老人。蘇麻喇姑晚年患病,牽動了康熙皇帝和允祹的心,康熙當時正在塞外巡視,特意派人為蘇麻喇姑送來草藥,並指示允祹好生照料。允祹和他的妻子心焦如焚,日夜守在蘇麻喇姑的身邊。一個侍女有一個皇帝的兒子當養子,這是莫大的榮譽。假如康熙與蘇麻喇姑真有情人關係,那蘇麻喇姑估計也會有個親生孩子。\n\r\n大多數人認為跟皇帝關係好的下人就是情人關係,但這也不一定,康熙好色,但絕對不會與一個比自己大40歲的女人同床。就算非要扯上什麼特別的關係,那也只有一種可能,就是康熙的性啟蒙教育是她來完成的。再說一下伍次友,康熙的老師很多,但沒有一個叫伍次友的,歷史上也沒有伍次友,這個人事小說杜撰的。這一點讀者應該都知道!\n\r\n\n1\n \n \n \n 2\n \n \n \n >" +} \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/data/README.md b/tests/models/Crawler/Nownews/data/README.md new file mode 100644 index 0000000..02b7098 --- /dev/null +++ b/tests/models/Crawler/Nownews/data/README.md @@ -0,0 +1,14 @@ +Nownews data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `1529819.html` + From: http://www.nownews.com/n/2014/12/05/1529819 \ No newline at end of file diff --git a/tests/models/Crawler/Nownews/data/listing.html b/tests/models/Crawler/Nownews/data/listing.html new file mode 100644 index 0000000..3263bde --- /dev/null +++ b/tests/models/Crawler/Nownews/data/listing.html @@ -0,0 +1,6301 @@ + + + + + + + + + + + + + + + + + + + + + NOWnews 今日新聞 + + + + + + + + + + + + + + + + + + + + + + + +
                    + + + +
                    + + + +
                    + +
                    + + + +
                    + +
                    + +
                    +
                    + + + + + +
                    + +
                    + + + + +
                    +
                    + + +
                    +
                    + + + +
                    + + +
                    + + +
                    +
                    +
                    + + +
                    +
                    新寵兒人氣高
                    + +
                    + 新寵兒人氣高 +
                    +
                    +
                    + + +
                    +
                    戀愛煩惱請找我
                    + +
                    + 戀愛煩惱請找我 +
                    +
                    +
                    + + +
                    +
                    逆齡瑜珈天后
                    + +
                    + 逆齡瑜珈天后 +
                    +
                    +
                    + + +
                    +
                    六月剖腹產
                    + +
                    + 六月剖腹產 +
                    +
                    +
                    + + +
                    +
                    聖誕紅女郎
                    + +
                    + 聖誕紅女郎 +
                    +
                    +
                    + +
                    + + +
                    + + +

                    +

                    + +
                    + + + +
                    +
                    +
                      + + + + +
                    • +

                      + + 綠營幕僚研判 朱立倫提憲改議題作為瞄準2016起手式 + +

                      + + 王鼎鈞 + +

                      + 〔記者王鼎鈞/台北報導〕新北市長朱立倫12日宣布參選國民黨主席,同時提出憲改主張,並..(12/13 13:32) +

                      +
                    • + + + + + +
                    • +

                      + + 終於!臉書將設計「不讚」 讓用戶表達不滿的情緒 + +

                      + + NOWnews.com 今日新聞網 + +

                      + 〔國際中心/綜合報導〕 為什麼臉書沒有「不讚」可以按?臉書創辦人薩克伯(Mark ..(12/13 12:08) +

                      +
                    • + + + + + +
                    • +

                      + + 聲請保外醫治遭駁 陳水扁成「人球」? + +

                      + + NOWnews.com 今日新聞網 + +

                      + 〔政治中心/綜合報導〕前總統陳水扁申請保外就醫遭駁,昨向台灣高等法院聲明異議,但法..(12/13 10:40) +

                      +
                    • + + + + + + + + + + + + + + +
                    + +
                    +
                      +
                    1. 1
                    2. +
                    3. 2
                    4. +
                    5. 3
                    6. +
                    +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                    + .男子撿屍性侵 路人誤認情侶在做愛 + (12/13 15:24) +

                    + + + + + + + + + +

                    + .一片霧濛濛 金門空污嚴重 + (12/13 15:02) +

                    + + + + + + + +

                    + .湖人練球風暴 其實沒有那麼嚴重 + (12/13 15:15) +

                    + + + + + + + + + +

                    + .砍人案互踢皮球 高市警懲處 + (12/13 15:02) +

                    + + + + + + + +

                    + .柯第三副手 傳內定廣告女王莊淑芬 + (12/13 09:17) +

                    + + + + + + + + + +

                    + .世代正義 電價公式擬明年上路 + (12/13 12:44) +

                    + + + +
                    + + +
                    + + + + + +
                    + + + +
                    + + + +
                    + + + + + +
                    +
                    新聞任意門
                    +
                    +
                      + +
                      +
                      + + + + + + + + + +
                      +
                      + +

                      今日整點報

                      +
                      + +
                      + + + + + + + + + + +
                      + + 入口網站蕃薯藤票選2014十大火鍋,超過3萬人次的網友參與投票,台電勵進酸菜白肉鍋獲選第一、詹記麻辣火鍋獲選第二、第三名則是這一鍋皇室祕藏鍋物獲得。(圖/業者提供) + +
                      + + + +
                      +

                      + 天冷吃鍋吧!2014十大火鍋出爐 台電酸菜白肉鍋第一 +

                      + + + + + + + 彭夢竺 + + + +

                      + 〔記者彭夢竺/台北報導〕根據中央氣象局預報,大陸冷氣團南下,今明兩天低溫下探11度,甚至有極地低溫的出現.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      老K拚黨魁

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲新北市長朱立倫12日以「找回創黨精神 和人民站在一起」為題發表聲明,宣布參選國民黨主席,並提出憲改主張,表明不選2016。(資料照片/朱立倫辦公室提供) + +
                      + + + +
                      +

                      + 綠營幕僚研判 朱立倫提憲改議題作為瞄準2016起手式 +

                      + + + + + + + 王鼎鈞 + + + +

                      + 〔記者王鼎鈞/台北報導〕新北市長朱立倫12日宣布參選國民黨主席,同時提出憲改主張,並表示不選2016總統.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + + + +
                      +
                      + +

                      柯P新政

                      +
                      + +
                      + + + + + + + + +
                      + + ▲台北市長當選人柯文哲12日到翠山莊拜會前總統李登輝。(圖/柯文哲辦公室提供) + +
                      + + + +
                      +

                      + 柯文哲第三位副手 傳內定廣告女王莊淑芬 +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔政治中心/綜合報導〕台北市長當選人柯文哲日前說,第三位副市長是「報紙頭版會報的女企業家」,今(13).. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      歷史探密

                      +
                      + +
                      + + + + + + + + + + +
                      + + 項羽(影視資料圖)。 + +
                      + + + + + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      基情過後

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲陳致遠(左)與秀琴歷經風雨,情感更加堅定。(資料圖/記者朱家彥攝影) + +
                      + + + +
                      +

                      + 他派外遇妻上場救援 讚阿基師「很勇敢」 +

                      + + + + + + + NOW娛樂 + + + +

                      + 〔娛樂中心/綜合報導〕 阿基師(鄭衍基)偷腥上摩鐵被直擊,10日下午3點主動召開記者會說明,但愈描愈黑.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      今日正妹

                      +
                      + +
                      + + + + + + + + + + +
                      + + 美國著名體育雜誌《體育畫報》上周末刊出了主題為七大洲的泳裝照。 + +
                      + + + + + + + +
                      + +
                      + + + +
                      + + + + + + + +
                      +
                      + +

                      名家觀點

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲台北市長當選人柯文哲9日拜會台聯黨主席黃昆輝,會前媒體搶先報導,攸關北市12年國教政策的台北市教育局長人選,經遴選委員會大致底定,將由政大附中創校校長湯志民出任。(圖/林靖堂攝) + +
                      + + + + + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      NBA季賽

                      +
                      + +
                      + + + + + + + + + + +
                      + + Young飆進神奇逆轉三分球。(圖/美聯社資料照/達志影像) + +
                      + + + +
                      +

                      + NBA/林書豪醒了!楊恩致勝三分 湖人扳倒馬刺 +

                      + + + + + + + 沈明璁 + + + +

                      + 〔記者沈明璁/綜合報導〕洛杉磯湖人13日客場挑戰聖安東尼奧馬刺,Kobe Bryant雖然沒能一舉超越「.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      政治現場

                      +
                      + +
                      + + + + + + + + + + +
                      + + 向英雄致敬 桃猿贈球國防部 「Nice play-向英雄致敬」活動28日在桃園棒球場舉行,由中華職棒義大犀牛對戰Lamigo桃猿;桃猿總教練洪一中(左)致贈國防部副部長夏立言(右)紀念球。中央社記者施宗暉攝 103年8月28日 + +
                      + + + +
                      +

                      + 夜宴共軍導彈前軍官? 夏立言斥:張冠李戴 +

                      + + + + + + + 王鼎鈞 + + + +

                      + 〔記者王鼎鈞/台北報導〕外傳國防部副部長夏立言夜宴共軍導彈前軍官,夏立言13日鄭重澄清說,他的大陸籍遠房.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      財經錢線

                      +
                      + +
                      + + + + + + + + + + +
                      + + ITA擴大 台廠關稅省8億美元 傳出美國與中國已就資訊科技協定(ITA)擴大納入近200項產品清單達成共識,經濟部次長卓士昭11日說,我國相關廠商出口可望節省關稅金額約8.16億美元。中央社記者黃巧雯攝 103年11月11日 + +
                      + + + +
                      +

                      + 資訊科技協定擴大談判未達成協議 經濟部深表遺憾 +

                      + + + + + + + 曹逸雯 + + + +

                      + 〔記者曹逸雯/台北報導〕包括美國、歐盟、日本、韓國、台灣與中國大陸在內的27個世界貿易組織(WTO)會員.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      大運動場

                      +
                      + +
                      + + + + + + + + +
                      + + ▲陳晨威從宋文華手中敲出3支安打。(圖/王真魚攝影) + +
                      + + + +
                      +

                      + 黑豹旗/棒打宋文華 陳晨威敲3安作生日禮 +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔記者王真魚/台中報導〕宋文華對美和先發8局僅被敲5支安打,不過特別對第2棒陳晨威沒輒,其中3支安打都是.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      娛樂星聞

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲F奶「胸奴」優香。(圖/翻攝自網路) + +
                      + + + +
                      +

                      + F奶「胸奴」戀上年下男 急甩志村健 +

                      + + + + + + + NOW娛樂 + + + +

                      + 〔娛樂中心/綜合報導〕 現年34歲,擁有F罩杯的巨乳女星優香,斬斷與64歲「搞笑天王」志村健的「父女戀.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + +
                      + + + + + + + +
                      +
                      + +

                      生活大小事

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲台灣蠻野心足生態協會、反亞泥還我土地自救會、地球公民基金會、台灣原住民族太魯閣族學生青年會等於太魯閣馬拉松現場拉起布條,疾呼捍衛太魯閣,其中並有逾百名跑者身戴「反亞泥 保山林」布條上陣。 + +
                      + + + +
                      +

                      + 除了路跑之外 太魯閣馬拉松現聲浪 +

                      + + + + + + + Linda Linda + + + +

                      + 〔記者簡怡欣/綜合報導〕 2014太魯閣峽谷馬拉松今(13)早開跑,亞泥冠名爭議引發民眾到場抗爭,疾呼捍.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      吃喝玩樂

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲配合兒童新樂園開園,北捷找來百人工作團隊打造首波宣傳短片,60秒內容夢幻感十足,讓人一秒遠離低頭族,馳騁在旋轉小木馬上、徜徉在轉轉咖啡杯中,或是和水果摩天輪一起「飛高高」。 + +
                      + + + +
                      +

                      + 萌妹揪團!兒童新樂園首波短片 「讓我們一起來玩~」 +

                      + + + + + + + Linda Linda + + + +

                      + 〔旅遊中心/台北報導〕 台北圓山兒童育樂中心明(14)日為最後一天開放日,接續台北兒童新樂園將於16日.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      科技快遞

                      +
                      + +
                      + + + + + + + + + + +
                      + + 《LINE騎馬打仗》,在今(12)日首度釋出遊戲宣傳影片,玩家們可從超級卡哇伊的影片中,了解遊戲故事、三大職業角色以及刺激有趣的特色玩法。(圖/翻攝自網路) + +
                      + + + +
                      +

                      + 三國武將塔防手機萌爆登場 LINE騎馬打仗影片曝光 +

                      + + + + + + + NOWnews科技中心 + + + +

                      + 〔記者李鴻典/台北報導〕 晶綺科技首度與 LINE GAME平台合作推出的3D 武將塔防手機遊戲《LIN.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      社會大現場

                      +
                      + +
                      + + + + + + + + + + + + +
                      +

                      + 悲劇!警察不理失智男搭錯車回不了家 6天後凍死街頭  +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔社會中心/綜合報導〕 台北市1名62歲輕微失智男子,日前搭錯公車迷路,公車駕駛將他載到警局,警察卻只.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      新奇趣聞

                      +
                      + +
                      + + + + + + + + +
                      + + ▲男子當街撿屍性侵,路人以為是不要臉情侶當街做愛。(圖/翻攝《鏡報》) + +
                      + + + +
                      +

                      + 這不是做愛!男子當街撿屍性侵 路人誤認為情侶在做愛 +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔國際中心/綜合報導〕 英國1名牙買加裔男子,日前光天化日下把1名女子灌醉,被拖到繁忙街道旁的草地性侵.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      地方大小事

                      +
                      + +
                      + + + + + + + + + + +
                      + + 雲管處轄區內的七股區頂山棲息處鳥類生態豐富。 + +
                      + + + +
                      +

                      + 鳥況豐富 七股頂山棲地有近400隻黑面琵鷺 +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔記者李文生/台南報導〕 雲管處轄區內的七股區頂山棲息處鳥類生態豐富,雲管處長鄭榮峰由台南市生態保育學會.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + +
                      + + + + + + + +
                      +
                      + +

                      花生來報報

                      +
                      + +
                      + + + + + + + + + + +
                      + + 聖誕泳裝狂跑活動。 + +
                      + + + +
                      +

                      + 世界萬象/波士頓慈善「聖誕泳裝」狂跑活動 美麗凍人! +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔大陸新聞中心/綜合報導〕美國波士頓一年一度的慈善聖誕泳裝狂跑活動近日在市中心上演。參與者不懼嚴寒,身著泳.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + + + + + +
                      +
                      + +

                      理財金管家

                      +
                      + +
                      + + + + + + + + + + +
                      + + ▲復華數位經濟基金經理人吳英鎮分析,從技術面觀察,台股正處於中期修正的階段,等到股市恢復信心,年線會持續往上走,在蘋果iPhone 6推出後,第四季持續看好相關供應鏈廠商的營運表現,操作布局上可留意科技產業。(圖/資料照片) + +
                      + + + +
                      +

                      + 台股震盪!閒錢從基金開始 逢低加碼找對好標的 +

                      + + + + + + + NOWnews.com 今日新聞網 + + + +

                      + 〔記者彭夢竺/台北報導〕台股10月到現在幾度大漲大跌,9,000點得而復失,就連年線也失守,雖然金管會射.. + 更多>> +

                      + +
                      + + + +
                      + +
                      + + + + + +
                      + +
                      +

                      命理大街

                      +
                      + + +

                      冬日浪漫愛之旅~終點站幸福!

                      + +

                      出發總要有個方向,走~朝幸福前進吧!一人也行,兩人更好,享受愛情旅程,寫下甜美記憶。

                      + +
                      +
                      + + + + + + + +
                      + + + + +
                      +
                      +

                      WEnews 精選

                      +
                      +
                      + + + + + + + + +
                      + [電影亂哈拉]五星主廚快餐車...樂在其中的重要 +
                      + +
                      +

                      [電影亂哈拉]五星主廚快餐車...樂在其中的重要

                      +

                      〔WEnews不營養大雞排/綜合報導〕曾執導【鋼鐵人】前兩集的強法洛,自編自導又自演,這回更當起男主角,其他主要演員還有..更多>>

                      + +
                      + + + +
                      + +
                      + + + +
                      +
                      +

                      美人幫推薦

                      +
                      +
                      + + + + + + + + +
                      + 徵求很敢秀敢演的你來拍攝 【五秒霜,馬上妝】的影片 +
                      + + + + + +
                      + +
                      + + + +
                      +
                      +

                      命理‧雜誌櫃精選

                      +
                      +
                      + + + + + + + + +
                      + 台積電董事長張忠謀:時間和人生的主導權,絕對在自己手上 +
                      + +
                      +

                      台積電董事長張忠謀:時間和人生的主導權,絕對在自己手上

                      +

                      〔文/Cheers〕從台積電董事長張忠謀接受《Cheers》雜誌專訪,暢談後他精彩的「下班後」這件事情當中,我們隱約可在..更多>>

                      + +
                      + + + +
                      + +
                      + + + + + +
                      +
                      +

                      房情搶鮮報

                      +
                      +
                      + + + + + + + + +
                      + 先求有再求好!租屋首重安全性 欲買屋需量力而為 +
                      + +
                      +

                      先求有再求好!租屋首重安全性 欲買屋需量力而為

                      +

                      提到新竹,不少人的印象,除了有「風城」之稱以外,更多人想到的就是竹科園區。這裡是不少所謂科技新貴的聚集地,也因為不少人來到這裡工作..更多>>

                      + +
                      + + + +
                      + +
                      + + + +
                      + + + + +
                      +
                      + + +
                      +

                      NOWnews 精選

                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +

                      優質頻道

                      +
                      +
                        +
                      • +
                      • +
                      • +
                      • +
                      • +
                      +
                      +
                      +
                      +
                      + + + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <![CDATA[NOWnews sD]]> + http://www.nownews.com + + Fri,14 Sep 2012 14:10:54 +0800 + 2010 NOWnews.com. All Rights Reserved. + NOWnews Network Co., Ltd. + zhnownews/realtimehttps://feedburner.google.comSubscribe with My Yahoo!Subscribe with NewsGatorSubscribe with My AOLSubscribe with NetvibesSubscribe with GoogleSubscribe with PageflakesSubscribe with PlusmoSubscribe with Live.com + <![CDATA[йvĪͧĩʲǤߡ@ƾǪvO]]> + eͬߢXɡf͸OH̱`wAHWAS]gA{ɤWCw̡AbTEɤwߴALkNvCs|ݵĤ츭|vܡAߴ͸v覡jPiйvvPƾǪvĄëDAӬOۻۦAYϬOeuйvĪͧĩʫAƾǪvivAUsC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/nGCw1hw1XHc" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/nGCw1hw1XHc/11662-2851941.htm + http://www.nownews.com/2012/09/14/11662-2851941.htm + Fri, 14 Sep 2012 13:50:31 +0800 + http://www.nownews.com/2012/09/14/11662-2851941.htm + <![CDATA[QE3EgٿEy@xѦLW159.25IBW7700I]]> + eO̱hx_ɡfpdzƲzƷ|]Fed^ťX3qƼePF]QE3^vTAѥjAEy]14^x_ѥ}A׳[vѻƥH7738.05I@AW159.25IAƦ\W7700IjC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/Wp-dOHMQkJ8" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/Wp-dOHMQkJ8/11490-2854320.htm + http://www.nownews.com/2012/09/14/11490-2854320.htm + Fri, 14 Sep 2012 13:45:08 +0800 + http://www.nownews.com/2012/09/14/11490-2854320.htm + <![CDATA[JT}ߥX@I@s{v]߲KsB]]> + ejsDߢXɡfs{v]S{ߨơATQ}ߥXATaڲKWsBCFT__vA]b@ɸ̳W]m@ӡuT__|vAOKC[pTL{C<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/21nJBC0vHE0" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/21nJBC0vHE0/11731-2854238.htm + http://www.nownews.com/2012/09/14/11731-2854238.htm + Fri, 14 Sep 2012 13:44:08 +0800 + http://www.nownews.com/2012/09/14/11731-2854238.htm + <![CDATA[۬ݭIH믫gSx@_xBLW]]> + eO̳v͢x_ɡfAw믫gvhjHCYAݬݤ۴NDIaåͬs|@ꤺso{Aֺ믫gw̳@PSxA_xBjYBeZBpW¥Aרkʱw̪LW󴶹Mn񭹫A׬OvTgtΪ]APɴxfBֽB~[Bo|Auݤۡv]@sfIC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/SpfUI7UMdBc" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/SpfUI7UMdBc/11490-2854317.htm + http://www.nownews.com/2012/09/14/11490-2854317.htm + Fri, 14 Sep 2012 13:43:01 +0800 + http://www.nownews.com/2012/09/14/11490-2854317.htm + <![CDATA[ȥ~yPLޱإ\@3Ayut@B]]> + eO̤西FXɡf3A Pawtucket Red Soxbp`axALޱbx_ɶ14骺3ԡA{A31wA1IAU3AH41ѥ3AAZ30ѡA`axut@BFC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/-SYm9_BhZHQ" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/-SYm9_BhZHQ/11490-2854318.htm + http://www.nownews.com/2012/09/14/11490-2854318.htm + Fri, 14 Sep 2012 13:40:47 +0800 + http://www.nownews.com/2012/09/14/11490-2854318.htm + <![CDATA[ְTjֺϦ@ˬd@]]> + eO̪Lץcx_ɡfe_L]14^餤ȦbyѳzSAe`γ󤵦jֺϦ@ˬdGAҹ`ΪgoͤC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/u9w14jT-Lec" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/u9w14jT-Lec/11490-2854319.htm + http://www.nownews.com/2012/09/14/11490-2854319.htm + Fri, 14 Sep 2012 13:39:56 +0800 + http://www.nownews.com/2012/09/14/11490-2854319.htm + <![CDATA[NBAT-MacQy@N차BJ]]> + eO̿ǢXɡf b~ۥѲyA\hj@ۥѲywg츨}BɭԡA\hy٦bMU@iXAbo]AFhJNBAPɪTracy McGradyAثe]٨SsFaAӮھReal GMɡAMcGradyN차붤MJiաC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/48Jy0dYyXus" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/48Jy0dYyXus/11490-2854313.htm + http://www.nownews.com/2012/09/14/11490-2854313.htm + Fri, 14 Sep 2012 13:37:02 +0800 + http://www.nownews.com/2012/09/14/11490-2854313.htm + <![CDATA[ϤjuHסvQI@LդkeaQue֡v]]> + ejsDߢXɡf@bLդWjqBNBPe¤jvˤʪukeavAޱokͪYLBe§ܷRC_äߪͳvhoe֡GӤOPBe@OOHBsun͡v]OWӪӭӡC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/X23HgSEZ_Pw" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/X23HgSEZ_Pw/11800-2854236.htm + http://www.nownews.com/2012/09/14/11800-2854236.htm + Fri, 14 Sep 2012 13:32:45 +0800 + http://www.nownews.com/2012/09/14/11800-2854236.htm + <![CDATA[DuګqGڭ̬Oxҡ@@ɳOĤH]]> + eO̳仨x_ɡfMjͬFHͪĤ@AܭuDuxҡv@AӤ޵oͼPQסCo˨סA֤]bauxWC~ıoAo˪ήeuǸرiBǨIvC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/WPn0_V3fdrg" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/WPn0_V3fdrg/11490-2854311.htm + http://www.nownews.com/2012/09/14/11490-2854311.htm + Fri, 14 Sep 2012 13:31:42 +0800 + http://www.nownews.com/2012/09/14/11490-2854311.htm + <![CDATA[sALKKaI@A_S_WS]]> + eO̾Géx_ɡf۫HU@wٰOo2009~KKAԧJ䭷ɭЫnAysLж鷴lγ\h~yҡA䤤ASHtBZLaϳ̬YFnAgLFUAذϪAA_SlAXS״IA~Aé15B16B2223o|ѡAx_ioǯѯЪGC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/4WsMIDnH-2A" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/4WsMIDnH-2A/11870-2854310.htm + http://www.nownews.com/2012/09/14/11870-2854310.htm + Fri, 14 Sep 2012 13:30:26 +0800 + http://www.nownews.com/2012/09/14/11870-2854310.htm + <![CDATA[௫ޡH@PZzGzL|mФpx]]> + e]gߢXɡfFqy@۰{AezL]ΪkHФثHR|WqAmжm8~le`νgG~uCJҡvC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/Mnxg_-5g-tQ" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/Mnxg_-5g-tQ/11490-2854307.htm + http://www.nownews.com/2012/09/14/11490-2854307.htm + Fri, 14 Sep 2012 13:29:30 +0800 + http://www.nownews.com/2012/09/14/11490-2854307.htm + <![CDATA[sw簨H@C|GĬծcߡB|C~]]> + eO̤vx_ɡfC|~׽sCwzuC~S߭pevA¿uqC~iJu`ΩߡvAGDiҥߩeLsuաBAWvC惡AC|DI14ܡAӭpeĬծcߩ`Ω92~ߤC~u@μҦ]pAUC~FѦۨO_XAqƤȩʽu@AH|ӫC~SH~Fثe|wסAӸ`ݰQסC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/_J_ZB2MIdgY" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/_J_ZB2MIdgY/11490-2854189.htm + http://www.nownews.com/2012/09/14/11490-2854189.htm + Fri, 14 Sep 2012 13:23:32 +0800 + http://www.nownews.com/2012/09/14/11490-2854189.htm + <![CDATA[NBA_ӤΡ@]~NʮuueVm]]> + eO̿ǢXɡfbQ]NH]~Dwight HowardAѩb~4ɰʤFINYAѩ_ӤΡA]HyΦbťHowardN|ʮu102}lueVmAӴHɬOb107i}NWwihAɲygLkظ@]~C<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/j2ssosgUWAg" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/j2ssosgUWAg/11490-2854306.htm + http://www.nownews.com/2012/09/14/11490-2854306.htm + Fri, 14 Sep 2012 13:21:31 +0800 + http://www.nownews.com/2012/09/14/11490-2854306.htm + <![CDATA[T֩j袬kCܤjTHYDtܤjI]]> + ]T֤ߢXɡ^ROkHѩʡAƧhO׹nuCLåeg˲vkuvkkv̡AYOCܤHAٯutZC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/pS5uqHP75uU" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/pS5uqHP75uU/11836-2854305.htm + http://www.nownews.com/2012/09/14/11836-2854305.htm + Fri, 14 Sep 2012 13:21:22 +0800 + http://www.nownews.com/2012/09/14/11836-2854305.htm + <![CDATA[MLBvԪp!!@SUPT^o]]> + eO̿ǢXɡfaĹyOAثevMaæCpFsYAoɭԬv]MwvWbuɮ̦hӪoAndy Pettitte^oȷAھڬQCESPNɡAPettitteӤHwgܥLHɷdzƦn^oȤAӤ(14)vNXFL^ȪMwC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/_qQZLicG3eE" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/_qQZLicG3eE/11423-2854301.htm + http://www.nownews.com/2012/09/14/11423-2854301.htm + Fri, 14 Sep 2012 13:16:33 +0800 + http://www.nownews.com/2012/09/14/11423-2854301.htm + <![CDATA[uKvvk}I@hHQЪvv]]> + ejsDߢXɡf񿤤HPΤ@YuKvv԰ʤF@8.28ؤjڨA}Feѭ^HOh~@ɬCHۤqxujvعo@ǩ_{APaWHCT~LhALͬˤFH<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/WXg_b238_ko" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/WXg_b238_ko/11800-2854220.htm + http://www.nownews.com/2012/09/14/11800-2854220.htm + Fri, 14 Sep 2012 13:04:20 +0800 + http://www.nownews.com/2012/09/14/11800-2854220.htm + <![CDATA[añpuַݱڡv@9멳e}VaݹDp]]> + e|ߢɡfb4]sr`3RuַݡvaAezLǦҭ^ǥͥͬAN촿NLhǪMK޳Nǰ|NŪg٨tCդwLqUaڡA13鸭ַݻP˳PAñpѨêܷ|uC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/PDzd1jxPkT4" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/PDzd1jxPkT4/11490-2854295.htm + http://www.nownews.com/2012/09/14/11490-2854295.htm + Fri, 14 Sep 2012 12:56:50 +0800 + http://www.nownews.com/2012/09/14/11490-2854295.htm + <![CDATA[ȷRӥxPXH@Ȧqu[jžɡv]]> + eO̳仨x_ɡfȨӥxȹCAxWg٪`JA]޵oְDCڤFѡA֩ӿ쳰ȷ~ȪȦ~̡A[ӨAnD[jȫȪužɡvA]OֹCȨӥxaPXAo˪|ʡAܥi޵onĬC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/xznTJ8_evd8" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/xznTJ8_evd8/10844-2854304.htm + http://www.nownews.com/2012/09/14/10844-2854304.htm + Fri, 14 Sep 2012 12:55:35 +0800 + http://www.nownews.com/2012/09/14/10844-2854304.htm + <![CDATA[߭JupTv@ogHuGkv]]> + eT֤ߢXɡfu߱ХDv٪߭A~5QzXJũMEʱAQ~ɻ{O}aHPupTvCޤ߭X_{JA]]oƷPˡC߭7QMEæu±_UvAgH_{Τ^F5躡30߭AQM@WuGkvbͤw˱KʡANʤH@몺eAӳoWuGkvNOogHC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/wT3dpb-0mqI" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/wT3dpb-0mqI/11836-2854303.htm + http://www.nownews.com/2012/09/14/11836-2854303.htm + Fri, 14 Sep 2012 12:54:45 +0800 + http://www.nownews.com/2012/09/14/11836-2854303.htm + <![CDATA[yATPקWh@oyjLn@]]> + eO̬xXɡfATPɳWhʡAoyoAoyjWL25NQ@AsWwwpb~_IC<img src="//feeds.feedburner.com/~r/nownews/realtime/~4/obwhrbAaar8" height="1" width="1" alt=""/> + http://feedproxy.google.com/~r/nownews/realtime/~3/obwhrbAaar8/10847-2854302.htm + http://www.nownews.com/2012/09/14/10847-2854302.htm + Fri, 14 Sep 2012 12:49:46 +0800 + http://www.nownews.com/2012/09/14/10847-2854302.htm + diff --git a/tests/models/Crawler/Nownews/data/listing.json b/tests/models/Crawler/Nownews/data/listing.json new file mode 100644 index 0000000..ab72eaf --- /dev/null +++ b/tests/models/Crawler/Nownews/data/listing.json @@ -0,0 +1,201 @@ +[ + "http://www.nownews.com/n/2012/10/19/379791", + "http://www.nownews.com/n/2012/12/28/322849", + "http://www.nownews.com/n/2014/10/07/1445618", + "http://www.nownews.com/n/2014/10/07/1445651", + "http://www.nownews.com/n/2014/10/07/1445751", + "http://www.nownews.com/n/2014/10/09/1448820", + "http://www.nownews.com/n/2014/10/15/1456866", + "http://www.nownews.com/n/2014/10/16/1456059", + "http://www.nownews.com/n/2014/10/17/1460748", + "http://www.nownews.com/n/2014/10/20/1465310", + "http://www.nownews.com/n/2014/10/22/1470012", + "http://www.nownews.com/n/2014/10/23/1460790", + "http://www.nownews.com/n/2014/10/24/1472847", + "http://www.nownews.com/n/2014/11/04/1488200", + "http://www.nownews.com/n/2014/11/10/1492053", + "http://www.nownews.com/n/2014/11/17/1492062", + "http://www.nownews.com/n/2014/11/29/1525749", + "http://www.nownews.com/n/2014/12/03/1519036", + "http://www.nownews.com/n/2014/12/03/1530099", + "http://www.nownews.com/n/2014/12/04/1528545", + "http://www.nownews.com/n/2014/12/05/1529819", + "http://www.nownews.com/n/2014/12/05/1531268", + "http://www.nownews.com/n/2014/12/06/1522638", + "http://www.nownews.com/n/2014/12/06/1523750", + "http://www.nownews.com/n/2014/12/06/1525443", + "http://www.nownews.com/n/2014/12/07/1528614", + "http://www.nownews.com/n/2014/12/07/1529495", + "http://www.nownews.com/n/2014/12/08/1536360", + "http://www.nownews.com/n/2014/12/09/1537841", + "http://www.nownews.com/n/2014/12/09/1538427", + "http://www.nownews.com/n/2014/12/09/1538491", + "http://www.nownews.com/n/2014/12/09/1538492", + "http://www.nownews.com/n/2014/12/09/1538568", + "http://www.nownews.com/n/2014/12/10/1514363", + "http://www.nownews.com/n/2014/12/10/1536052", + "http://www.nownews.com/n/2014/12/10/1536184", + "http://www.nownews.com/n/2014/12/10/1538677", + "http://www.nownews.com/n/2014/12/10/1538875", + "http://www.nownews.com/n/2014/12/10/1538998", + "http://www.nownews.com/n/2014/12/10/1539021", + "http://www.nownews.com/n/2014/12/10/1539111", + "http://www.nownews.com/n/2014/12/10/1539318", + "http://www.nownews.com/n/2014/12/10/1539411", + "http://www.nownews.com/n/2014/12/11/1539859", + "http://www.nownews.com/n/2014/12/11/1539906", + "http://www.nownews.com/n/2014/12/11/1539909", + "http://www.nownews.com/n/2014/12/11/1539953", + "http://www.nownews.com/n/2014/12/11/1540013", + "http://www.nownews.com/n/2014/12/11/1540016", + "http://www.nownews.com/n/2014/12/11/1540034", + "http://www.nownews.com/n/2014/12/11/1540296", + "http://www.nownews.com/n/2014/12/11/1540382", + "http://www.nownews.com/n/2014/12/11/1540519", + "http://www.nownews.com/n/2014/12/11/1540792", + "http://www.nownews.com/n/2014/12/11/1540823", + "http://www.nownews.com/n/2014/12/11/1540893", + "http://www.nownews.com/n/2014/12/11/1540899", + "http://www.nownews.com/n/2014/12/11/1540933", + "http://www.nownews.com/n/2014/12/11/1541162", + "http://www.nownews.com/n/2014/12/11/1541230", + "http://www.nownews.com/n/2014/12/11/1541397", + "http://www.nownews.com/n/2014/12/12/1529410", + "http://www.nownews.com/n/2014/12/12/1531392", + "http://www.nownews.com/n/2014/12/12/1540376", + "http://www.nownews.com/n/2014/12/12/1541235", + "http://www.nownews.com/n/2014/12/12/1541284", + "http://www.nownews.com/n/2014/12/12/1541510", + "http://www.nownews.com/n/2014/12/12/1541522", + "http://www.nownews.com/n/2014/12/12/1541533", + "http://www.nownews.com/n/2014/12/12/1541543", + "http://www.nownews.com/n/2014/12/12/1541546", + "http://www.nownews.com/n/2014/12/12/1541575", + "http://www.nownews.com/n/2014/12/12/1541577", + "http://www.nownews.com/n/2014/12/12/1541579", + "http://www.nownews.com/n/2014/12/12/1541639", + "http://www.nownews.com/n/2014/12/12/1541657", + "http://www.nownews.com/n/2014/12/12/1541729", + "http://www.nownews.com/n/2014/12/12/1541769", + "http://www.nownews.com/n/2014/12/12/1541770", + "http://www.nownews.com/n/2014/12/12/1541777", + "http://www.nownews.com/n/2014/12/12/1541791", + "http://www.nownews.com/n/2014/12/12/1541794", + "http://www.nownews.com/n/2014/12/12/1541806", + "http://www.nownews.com/n/2014/12/12/1541831", + "http://www.nownews.com/n/2014/12/12/1541833", + "http://www.nownews.com/n/2014/12/12/1541834", + "http://www.nownews.com/n/2014/12/12/1541845", + "http://www.nownews.com/n/2014/12/12/1541876", + "http://www.nownews.com/n/2014/12/12/1541878", + "http://www.nownews.com/n/2014/12/12/1541880", + "http://www.nownews.com/n/2014/12/12/1541911", + "http://www.nownews.com/n/2014/12/12/1541912", + "http://www.nownews.com/n/2014/12/12/1541917", + "http://www.nownews.com/n/2014/12/12/1541946", + "http://www.nownews.com/n/2014/12/12/1541967", + "http://www.nownews.com/n/2014/12/12/1541971", + "http://www.nownews.com/n/2014/12/12/1541976", + "http://www.nownews.com/n/2014/12/12/1542001", + "http://www.nownews.com/n/2014/12/12/1542085", + "http://www.nownews.com/n/2014/12/12/1542087", + "http://www.nownews.com/n/2014/12/12/1542140", + "http://www.nownews.com/n/2014/12/12/1542168", + "http://www.nownews.com/n/2014/12/12/1542183", + "http://www.nownews.com/n/2014/12/12/1542194", + "http://www.nownews.com/n/2014/12/12/1542205", + "http://www.nownews.com/n/2014/12/12/1542238", + "http://www.nownews.com/n/2014/12/12/1542278", + "http://www.nownews.com/n/2014/12/12/1542282", + "http://www.nownews.com/n/2014/12/12/1542285", + "http://www.nownews.com/n/2014/12/12/1542296", + "http://www.nownews.com/n/2014/12/12/1542307", + "http://www.nownews.com/n/2014/12/12/1542319", + "http://www.nownews.com/n/2014/12/12/1542335", + "http://www.nownews.com/n/2014/12/12/1542340", + "http://www.nownews.com/n/2014/12/12/1542342", + "http://www.nownews.com/n/2014/12/12/1542353", + "http://www.nownews.com/n/2014/12/12/1542364", + "http://www.nownews.com/n/2014/12/12/1542368", + "http://www.nownews.com/n/2014/12/12/1542371", + "http://www.nownews.com/n/2014/12/12/1542377", + "http://www.nownews.com/n/2014/12/12/1542379", + "http://www.nownews.com/n/2014/12/12/1542403", + "http://www.nownews.com/n/2014/12/12/1542407", + "http://www.nownews.com/n/2014/12/12/1542409", + "http://www.nownews.com/n/2014/12/12/1542418", + "http://www.nownews.com/n/2014/12/12/1542432", + "http://www.nownews.com/n/2014/12/12/1542446", + "http://www.nownews.com/n/2014/12/12/1542468", + "http://www.nownews.com/n/2014/12/12/1542473", + "http://www.nownews.com/n/2014/12/12/1542475", + "http://www.nownews.com/n/2014/12/12/1542481", + "http://www.nownews.com/n/2014/12/12/1542496", + "http://www.nownews.com/n/2014/12/12/1542500", + "http://www.nownews.com/n/2014/12/12/1542549", + "http://www.nownews.com/n/2014/12/12/1542556", + "http://www.nownews.com/n/2014/12/12/1542582", + "http://www.nownews.com/n/2014/12/12/1542584", + "http://www.nownews.com/n/2014/12/12/1542589", + "http://www.nownews.com/n/2014/12/12/1542591", + "http://www.nownews.com/n/2014/12/12/1542606", + "http://www.nownews.com/n/2014/12/12/1542639", + "http://www.nownews.com/n/2014/12/12/1542659", + "http://www.nownews.com/n/2014/12/12/1542668", + "http://www.nownews.com/n/2014/12/12/1542670", + "http://www.nownews.com/n/2014/12/12/1542699", + "http://www.nownews.com/n/2014/12/13/1539006", + "http://www.nownews.com/n/2014/12/13/1539048", + "http://www.nownews.com/n/2014/12/13/1539153", + "http://www.nownews.com/n/2014/12/13/1539889", + "http://www.nownews.com/n/2014/12/13/1540380", + "http://www.nownews.com/n/2014/12/13/1541668", + "http://www.nownews.com/n/2014/12/13/1542124", + "http://www.nownews.com/n/2014/12/13/1542207", + "http://www.nownews.com/n/2014/12/13/1542366", + "http://www.nownews.com/n/2014/12/13/1542470", + "http://www.nownews.com/n/2014/12/13/1542554", + "http://www.nownews.com/n/2014/12/13/1542677", + "http://www.nownews.com/n/2014/12/13/1542694", + "http://www.nownews.com/n/2014/12/13/1542697", + "http://www.nownews.com/n/2014/12/13/1542700", + "http://www.nownews.com/n/2014/12/13/1542709", + "http://www.nownews.com/n/2014/12/13/1542723", + "http://www.nownews.com/n/2014/12/13/1542790", + "http://www.nownews.com/n/2014/12/13/1542836", + "http://www.nownews.com/n/2014/12/13/1542838", + "http://www.nownews.com/n/2014/12/13/1542839", + "http://www.nownews.com/n/2014/12/13/1542852", + "http://www.nownews.com/n/2014/12/13/1542853", + "http://www.nownews.com/n/2014/12/13/1542859", + "http://www.nownews.com/n/2014/12/13/1542862", + "http://www.nownews.com/n/2014/12/13/1542879", + "http://www.nownews.com/n/2014/12/13/1542885", + "http://www.nownews.com/n/2014/12/13/1542887", + "http://www.nownews.com/n/2014/12/13/1542889", + "http://www.nownews.com/n/2014/12/13/1542893", + "http://www.nownews.com/n/2014/12/13/1542895", + "http://www.nownews.com/n/2014/12/13/1542897", + "http://www.nownews.com/n/2014/12/13/1542909", + "http://www.nownews.com/n/2014/12/13/1542914", + "http://www.nownews.com/n/2014/12/13/1542915", + "http://www.nownews.com/n/2014/12/13/1542916", + "http://www.nownews.com/n/2014/12/13/1542925", + "http://www.nownews.com/n/2014/12/13/1542936", + "http://www.nownews.com/n/2014/12/13/1542938", + "http://www.nownews.com/n/2014/12/13/1542958", + "http://www.nownews.com/n/2014/12/13/1542964", + "http://www.nownews.com/n/2014/12/13/1542968", + "http://www.nownews.com/n/2014/12/13/1542972", + "http://www.nownews.com/n/2014/12/13/1542988", + "http://www.nownews.com/n/2014/12/13/1542989", + "http://www.nownews.com/n/2014/12/13/1543003", + "http://www.nownews.com/n/2014/12/13/1543006", + "http://www.nownews.com/n/2014/12/13/1543020", + "http://www.nownews.com/n/2014/12/13/1543034", + "http://www.nownews.com/n/2014/12/13/1543036", + "http://www.nownews.com/n/2014/12/13/1543037", + "http://www.nownews.com/n/2014/12/13/1543040", + "http://www.nownews.com/n/2014/12/13/1543051", + "http://www.nownews.com/n/2014/12/13/1543054" +] \ No newline at end of file diff --git a/tests/models/Crawler/PTS/Crawl.test b/tests/models/Crawler/PTS/Crawl.test new file mode 100644 index 0000000..db970e7 --- /dev/null +++ b/tests/models/Crawler/PTS/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_PTS::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_PTS::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/PTS/Parse.test b/tests/models/Crawler/PTS/Parse.test new file mode 100644 index 0000000..dd3283e --- /dev/null +++ b/tests/models/Crawler/PTS/Parse.test @@ -0,0 +1,57 @@ +label = 'Crawler_PTS::parse (285779.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/285779.html'); + $result = Crawler_PTS::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/285779.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} + +class TestCase_Crawler_PTS_Parse_285812 extends UnitTestCase +{ + + function __construct() + { + $this->label = 'Crawler_PTS::parse (285812.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/285812.html'); + $result = Crawler_PTS::parse($content); + $reference = json_decode(file_get_contents(__DIR__ . '/data/285812.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/PTS/data/285779.html b/tests/models/Crawler/PTS/data/285779.html new file mode 100644 index 0000000..dfc03c4 --- /dev/null +++ b/tests/models/Crawler/PTS/data/285779.html @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +公共電視台 新聞網 + + + + + + + + + + + + + + + + + + + + +
                      +
                      +
                      + + +
                      +
                      +
                       
                      + + + + + +
                      + + + + + + + + + + + + + +
                      + + + + + +
                      + + + + + + + + + + + + + + + + + + + +
                      + + +
                      Loading
                      + + +
                      +
                      +
                      + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + +
                      + + + + +
                      + + + + + +
                      + 公視新聞網 /  + + 醫療
                      +
                      + +
                      中風年輕化 劉泰英14歲孫子腦溢血
                      + + + + +
                      + + +
                      + + + +
                      + + + + + +
                      + +

                      中風年齡越來越年輕!台綜院創辦人劉泰英昨天參加一場活動時、對媒體透露,家中14歲的孫子,平時愛運動、也沒有心血管病史,卻在今年初腦中風送醫急救,懷疑可能跟吃到黑心油有關,不過醫師表示,年輕人中風、應該是和先天性的關係,是一種罕見的基因缺陷,建議有家族病史的高危險群,可以到醫院詳細檢查。
                      +
                      +中風年輕化、再添一例!台綜院創辦人劉泰英11號參加台綜院活動時、對媒體透露,家中14歲、就讀國中的孫子,今年初在學校突然昏倒,送醫診斷是腦溢血,他懷疑孫子中風、可能和黑心毒油有關。
                      +
                      +==台綜院創辦人 劉泰英==
                      +研究到現在
                      +這些醫學群 醫生群啊
                      +到現在還不曉得原因
                      +那我是一直懷疑
                      +這個是跟毒油 毒食品有關係
                      +
                      +劉泰英認為,孫子身材瘦高,平常愛運動,家族也沒有心血管疾病,由於孫子都在就讀的復興實驗中學吃營養午餐,因此懷疑很可能是吃到劣油才發病;不過醫師表示,14歲就中風昏迷,應該是和先天疾病「動靜脈畸形」有關,這是一種罕見的遺傳性基因缺陷,和黑心油沒有直接關聯。
                      +
                      +==復興實驗中學校長 吳寶珍==
                      +(營養午餐)從食材的進貨
                      +到烹調 到輸送
                      +都有嚴格的監督把關
                      +
                      +==新光醫院神經內科醫師 連立明==
                      +血管畸形前面會不會有前兆
                      +有沒有一個症狀來提醒這病人
                      +很不幸 這種腦畸形
                      +大部分都是沒有一個徵兆
                      +所以你說 誰會有這個腦畸形
                      +(腦血管)破了才知道
                      +
                      +醫師表示,45歲以下、年輕型中風發生率為12%,也就是平均每8人、就有1人是年輕患者,而且這種疾病通常沒有前兆,因此提醒有中風、高血壓、高血糖等家族病史的高危險群,可以透過核磁共振或電腦斷層的血管攝影檢查,提早預防中風發生。
                      +
                      +記者賴淑敏 蔣龍祥 台北報導
                      +
                      +

                      +
                      +

                      + (2014-12-12 12:00)  + 中晝新聞 + +

                      + + + + + + +
                      + + + +
                      + + + + + + + + +
                      +
                      +
                      +
                        + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + + + + + + +
                       
                       
                      + + +

                      +
                       
                      +
                      + + + + + + + + + + +
                      +
                      +
                      + + + + + + diff --git a/tests/models/Crawler/PTS/data/285779.json b/tests/models/Crawler/PTS/data/285779.json new file mode 100644 index 0000000..c1b7fb8 --- /dev/null +++ b/tests/models/Crawler/PTS/data/285779.json @@ -0,0 +1,4 @@ +{ + "title": "中風年輕化 劉泰英14歲孫子腦溢血", + "body": "中風年齡越來越年輕!台綜院創辦人劉泰英昨天參加一場活動時、對媒體透露,家中14歲的孫子,平時愛運動、也沒有心血管病史,卻在今年初腦中風送醫急救,懷疑可能跟吃到黑心油有關,不過醫師表示,年輕人中風、應該是和先天性的關係,是一種罕見的基因缺陷,建議有家族病史的高危險群,可以到醫院詳細檢查。\n\n中風年輕化、再添一例!台綜院創辦人劉泰英11號參加台綜院活動時、對媒體透露,家中14歲、就讀國中的孫子,今年初在學校突然昏倒,送醫診斷是腦溢血,他懷疑孫子中風、可能和黑心毒油有關。\n\n==台綜院創辦人 劉泰英==\n\n研究到現在\n\n這些醫學群 醫生群啊\n\n到現在還不曉得原因\n\n那我是一直懷疑\n\n這個是跟毒油 毒食品有關係\n\n劉泰英認為,孫子身材瘦高,平常愛運動,家族也沒有心血管疾病,由於孫子都在就讀的復興實驗中學吃營養午餐,因此懷疑很可能是吃到劣油才發病;不過醫師表示,14歲就中風昏迷,應該是和先天疾病「動靜脈畸形」有關,這是一種罕見的遺傳性基因缺陷,和黑心油沒有直接關聯。\n\n==復興實驗中學校長 吳寶珍==\n\n(營養午餐)從食材的進貨\n\n到烹調 到輸送\n\n都有嚴格的監督把關\n\n==新光醫院神經內科醫師 連立明==\n\n血管畸形前面會不會有前兆\n\n有沒有一個症狀來提醒這病人\n\n很不幸 這種腦畸形\n\n大部分都是沒有一個徵兆\n\n所以你說 誰會有這個腦畸形\n\n(腦血管)破了才知道\n\n醫師表示,45歲以下、年輕型中風發生率為12%,也就是平均每8人、就有1人是年輕患者,而且這種疾病通常沒有前兆,因此提醒有中風、高血壓、高血糖等家族病史的高危險群,可以透過核磁共振或電腦斷層的血管攝影檢查,提早預防中風發生。\n\n記者賴淑敏 蔣龍祥 台北報導\n\n(2014-12-12 12:00) \n\n中晝新聞" +} \ No newline at end of file diff --git a/tests/models/Crawler/PTS/data/285812.html b/tests/models/Crawler/PTS/data/285812.html new file mode 100644 index 0000000..166e4df --- /dev/null +++ b/tests/models/Crawler/PTS/data/285812.html @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +公共電視台 新聞網 + + + + + + + + + + + + + + + + + + + + +
                      +
                      +
                      + + +
                      +
                      +
                       
                      + + + + + +
                      + + + + + + + + + + + + + +
                      + + + + + +
                      + + + + + + + + + + + + + + + + + + + +
                      + + +
                      Loading
                      + + +
                      +
                      +
                      + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + +
                      + + + + +
                      + + + + + +
                      + 公視新聞網 /  + + 生活財經
                      +
                      + +
                      苗栗鐵皮屋大火 79歲老翁葬身火窟
                      + + + + +
                      + + +
                      + + + +
                      + + + + + +
                      + +

                      天冷意外多,苗栗銅鑼今天清晨六點多,百姓公廟旁的鐵皮屋發生大小,79歲的獨居廖姓老廟公逃生不及,葬身火窟,起火原因不排除是電線走火造成。而在嘉義清晨六點低溫只有15度,一名33歲男子疑似溫差變化,暴斃死亡。
                      +
                      +鐵皮屋被燒到焦黑,主樑燒斷,屋內傢俱也被燒得面目全非。警消滅火後進到屋內,發現獨居的廖姓男屋主,倒在臥室的走道,距離大門口不到幾步路,可能是想要逃生,卻已經來不及。
                      +
                      +==警消人員==
                      +來的時候 火舌就很竄啊
                      +火勢很大了 整間都是濃煙啊
                      +
                      +火勢半小時內就撲滅,但是79歲的獨居老翁卻命喪火窟,當地村長指出,廖姓老翁生活困苦,是低收入戶,早期請他負責廟裡雜務。
                      +
                      +==村長 范聖達==
                      +每年都發放很多物資給他
                      +因為他畢竟是低收入戶
                      +我們有資源 都會給他
                      +也會照顧他的生活起居
                      +
                      +釀成火災的原因,警消不排除是電線走火。而在嘉義,12號清晨一度出現15度的低溫,一名從事鐵工的33歲男子,前一天晚間,住在附近的母親就連絡不上他,請警消破門後才發現已倒臥浴室、死亡多時。
                      +
                      +==死者親友==
                      +可能進去(浴室)洗澡
                      +洗一洗可能瓦斯中毒
                      +他昨天店沒有開
                      +他媽媽要來看他 也進不去
                      +
                      +==救護人員==
                      +倒在浴室裡面
                      +門窗都是完全緊閉的狀態
                      +患者就是沒有意識 沒有呼吸
                      +沒有脈搏 屍體冰冷僵硬
                      +
                      +由於現場門窗緊閉沒有瓦斯味,前一天晚餐也還未食用。警消不排除男子是天冷洗澡時出狀況,但真正死亡原因還要調查。醫師也呼籲,天冷心血管疾病多,民眾要多注意,作好保暖工作。
                      +
                      +台中 嘉義 綜合報導
                      +
                      +

                      +
                      +

                      + (2014-12-12 19:00)  + 晚間新聞 + +

                      + + + + + + +
                      + + + +
                      + + + + + + + + +
                      +
                      +
                      +
                        + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + + + + + + +
                       
                       
                      + + +

                      +
                       
                      +
                      + + + + + + + + + + +
                      +
                      +
                      + + + + + + diff --git a/tests/models/Crawler/PTS/data/285812.json b/tests/models/Crawler/PTS/data/285812.json new file mode 100644 index 0000000..c416e0f --- /dev/null +++ b/tests/models/Crawler/PTS/data/285812.json @@ -0,0 +1,4 @@ +{ + "title": "苗栗鐵皮屋大火 79歲老翁葬身火窟", + "body": "天冷意外多,苗栗銅鑼今天清晨六點多,百姓公廟旁的鐵皮屋發生大小,79歲的獨居廖姓老廟公逃生不及,葬身火窟,起火原因不排除是電線走火造成。而在嘉義清晨六點低溫只有15度,一名33歲男子疑似溫差變化,暴斃死亡。\n\n鐵皮屋被燒到焦黑,主樑燒斷,屋內傢俱也被燒得面目全非。警消滅火後進到屋內,發現獨居的廖姓男屋主,倒在臥室的走道,距離大門口不到幾步路,可能是想要逃生,卻已經來不及。\n\n==警消人員==\n\n來的時候 火舌就很竄啊\n\n火勢很大了 整間都是濃煙啊\n\n火勢半小時內就撲滅,但是79歲的獨居老翁卻命喪火窟,當地村長指出,廖姓老翁生活困苦,是低收入戶,早期請他負責廟裡雜務。\n\n==村長 范聖達==\n\n每年都發放很多物資給他\n\n因為他畢竟是低收入戶\n\n我們有資源 都會給他\n\n也會照顧他的生活起居\n\n釀成火災的原因,警消不排除是電線走火。而在嘉義,12號清晨一度出現15度的低溫,一名從事鐵工的33歲男子,前一天晚間,住在附近的母親就連絡不上他,請警消破門後才發現已倒臥浴室、死亡多時。\n\n==死者親友==\n\n可能進去(浴室)洗澡\n\n洗一洗可能瓦斯中毒\n\n他昨天店沒有開\n\n他媽媽要來看他 也進不去\n\n==救護人員==\n\n倒在浴室裡面\n\n門窗都是完全緊閉的狀態\n\n患者就是沒有意識 沒有呼吸\n\n沒有脈搏 屍體冰冷僵硬\n\n由於現場門窗緊閉沒有瓦斯味,前一天晚餐也還未食用。警消不排除男子是天冷洗澡時出狀況,但真正死亡原因還要調查。醫師也呼籲,天冷心血管疾病多,民眾要多注意,作好保暖工作。\n\n台中 嘉義 綜合報導\n\n(2014-12-12 19:00) \n\n晚間新聞" +} \ No newline at end of file diff --git a/tests/models/Crawler/PTS/data/README.md b/tests/models/Crawler/PTS/data/README.md new file mode 100644 index 0000000..d4f12eb --- /dev/null +++ b/tests/models/Crawler/PTS/data/README.md @@ -0,0 +1,21 @@ +PTS data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + +**Note**: All test parse cases fail now. This indicates that the +site might have undergone HTML structure changes. Need to +change the current parser to adopt. + + - `listing.html` + From the result of crawlIndex() + + - `285779.html` + From: http://news.pts.org.tw/detail.php?NEENO=285779 + + - `285812.html` + From: http://news.pts.org.tw/detail.php?NEENO=285812 \ No newline at end of file diff --git a/tests/models/Crawler/PTS/data/listing.html b/tests/models/Crawler/PTS/data/listing.html new file mode 100644 index 0000000..2f6f03f --- /dev/null +++ b/tests/models/Crawler/PTS/data/listing.html @@ -0,0 +1,614 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +公共電視台 新聞網 + + + + + + + + + + + + + + + + + + +
                      +
                      +
                      + + +
                      +
                      +
                       
                      + + + + + +
                      + + + + + + + + + + + + + +
                      + + + + + +
                      + + + + + + + + + + + + + + + + + + + +
                      + + +
                      Loading
                      + + +
                      +
                      +
                      + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      + + + + + + + + + + + + + +
                      + + 公視新聞網 /  + 最新新聞 +
                       
                      + + 國際油價續探底 創5年來新低紀錄 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 吃薑母鴨配酒 肝硬化患者吐血送醫 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 孕婦接觸大量塑化劑 影響孩子智商 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 朱推修憲公投.內閣制 引發政壇震撼 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 親友任中國官員 夏立言共餐惹議 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 聖誕樹裝飾賽 新奇聖誕紅創意奪冠 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 民報案三單位互推 受理態度不佳 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 天冷鳳梨釋迦落果嚴重 農民痛揪心 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 林佳龍辦主管共識會 強調行動.效能 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 波特蘭高中傳槍響 4學生送醫急救 + + (2014-12-13 12:00)  + 中晝新聞 + +  
                      + 扁保外就醫聲明異議 高院駁回 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 首赴立院 毛揆:改組經總統充分授權 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 朱立倫決選黨主席 不選2016總統 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 柯文哲公布人事 簡余晏.蘇麗瓊入列 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 大陸冷氣團發威 淡水最低溫11.6度 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 苗栗鐵皮屋大火 79歲老翁葬身火窟 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 中風年輕化 劉泰英14歲孫子腦溢血 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 台電購煤.天然氣價格 遭質疑買貴了 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 國內航空.國道客運離峰 部分擬優惠 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 香港7千警金鐘清場 209抗議者被捕 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 日眾議院大選倒數 自民黨遙遙領先 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 俄總統訪印度 雙方達多項合作協議 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 綠色和平秀過頭 闖納茲卡線引批評 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 巴西殺人魔稱殺害42人 警方查證中 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 美加州中北部風暴 停電.停飛.停課 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 高市擬建旗津纜車 跨越高雄港 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 預購墓地不知違法 民眾遭罰要討公道 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 天冷違法捕狗頻傳 高市本週已6起 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 柯文哲請益 李登輝籲謙卑冷靜忍耐 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 林佳龍會林明溱 推中台灣合作模式 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 青年參政當選人 分享奮鬥歷程 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 檢傳喚 林飛帆盼以憲法高度處理 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 北投兩免費溫泉遭拆 民眾嘆可惜 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 秘密客訪查合法民宿 兩成待改善 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 調查:5成學生服務學習 僅為符規定 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 中國技師來台測試電梯 不幸墜樓亡 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + RCA工傷案今最後辯論 明春宣判 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 長照的天使 記錄照顧服務工作價值 + + (2014-12-12 19:00)  + 晚間新聞 + +  
                      + 大陸冷氣團發威 淡水最低溫11.6度 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 天冷頻傳違法捕狗 高市本週已6起 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 朱立倫要選黨主席 2016不選總統 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 扁保外就醫聲明異議 高院駁回 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 檢傳喚 林飛帆盼以憲法高度處理 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 林佳龍會林明溱 推中投跨黨派共治 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 北投兩免費溫泉遭拆 民眾嘆可惜 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 秘密客訪查合法民宿 二成待改善 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 柯文哲請益 李登輝籲謙卑冷靜忍耐 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 毛揆首赴立院 強調總統充分授權 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 港7千警金鐘清場 209抗議者被捕 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 里約非裔人魔供稱 已殺害42人 + + (2014-12-12 18:30)  + 暗時新聞 + +  
                      + 中風年輕化 劉泰英14歲孫子腦溢血 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 台東植物人安養院 家境清寒者免費 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 青年參政當選人 分享奮鬥歷程 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 柯P公佈人事 簡余晏.蘇麗瓊入列 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 銅鑼鐵皮屋大火 獨居廟公葬身火窟 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 預購墓地不知違法 民眾遭警開罰 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + 俄總統訪印度 雙方達多項合作協議 + + (2014-12-12 12:00)  + 中晝新聞 + +  
                      + + +
                       
                      +
                      +
                      +
                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + + + + + + +
                       
                       
                      + + +

                      + +
                       
                      +
                      + + + + + + + + + + +
                      +
                      +
                      + + + + + + diff --git a/tests/models/Crawler/PTS/data/listing.json b/tests/models/Crawler/PTS/data/listing.json new file mode 100644 index 0000000..38f7f7b --- /dev/null +++ b/tests/models/Crawler/PTS/data/listing.json @@ -0,0 +1,59 @@ +[ + "http://news.pts.org.tw/detail.php?NEENO=285779", + "http://news.pts.org.tw/detail.php?NEENO=285780", + "http://news.pts.org.tw/detail.php?NEENO=285781", + "http://news.pts.org.tw/detail.php?NEENO=285782", + "http://news.pts.org.tw/detail.php?NEENO=285784", + "http://news.pts.org.tw/detail.php?NEENO=285785", + "http://news.pts.org.tw/detail.php?NEENO=285786", + "http://news.pts.org.tw/detail.php?NEENO=285792", + "http://news.pts.org.tw/detail.php?NEENO=285793", + "http://news.pts.org.tw/detail.php?NEENO=285794", + "http://news.pts.org.tw/detail.php?NEENO=285795", + "http://news.pts.org.tw/detail.php?NEENO=285796", + "http://news.pts.org.tw/detail.php?NEENO=285797", + "http://news.pts.org.tw/detail.php?NEENO=285798", + "http://news.pts.org.tw/detail.php?NEENO=285800", + "http://news.pts.org.tw/detail.php?NEENO=285801", + "http://news.pts.org.tw/detail.php?NEENO=285803", + "http://news.pts.org.tw/detail.php?NEENO=285804", + "http://news.pts.org.tw/detail.php?NEENO=285805", + "http://news.pts.org.tw/detail.php?NEENO=285807", + "http://news.pts.org.tw/detail.php?NEENO=285808", + "http://news.pts.org.tw/detail.php?NEENO=285809", + "http://news.pts.org.tw/detail.php?NEENO=285810", + "http://news.pts.org.tw/detail.php?NEENO=285811", + "http://news.pts.org.tw/detail.php?NEENO=285812", + "http://news.pts.org.tw/detail.php?NEENO=285813", + "http://news.pts.org.tw/detail.php?NEENO=285814", + "http://news.pts.org.tw/detail.php?NEENO=285815", + "http://news.pts.org.tw/detail.php?NEENO=285816", + "http://news.pts.org.tw/detail.php?NEENO=285817", + "http://news.pts.org.tw/detail.php?NEENO=285818", + "http://news.pts.org.tw/detail.php?NEENO=285819", + "http://news.pts.org.tw/detail.php?NEENO=285820", + "http://news.pts.org.tw/detail.php?NEENO=285821", + "http://news.pts.org.tw/detail.php?NEENO=285822", + "http://news.pts.org.tw/detail.php?NEENO=285823", + "http://news.pts.org.tw/detail.php?NEENO=285824", + "http://news.pts.org.tw/detail.php?NEENO=285825", + "http://news.pts.org.tw/detail.php?NEENO=285826", + "http://news.pts.org.tw/detail.php?NEENO=285827", + "http://news.pts.org.tw/detail.php?NEENO=285828", + "http://news.pts.org.tw/detail.php?NEENO=285829", + "http://news.pts.org.tw/detail.php?NEENO=285830", + "http://news.pts.org.tw/detail.php?NEENO=285831", + "http://news.pts.org.tw/detail.php?NEENO=285832", + "http://news.pts.org.tw/detail.php?NEENO=285833", + "http://news.pts.org.tw/detail.php?NEENO=285835", + "http://news.pts.org.tw/detail.php?NEENO=285838", + "http://news.pts.org.tw/detail.php?NEENO=285839", + "http://news.pts.org.tw/detail.php?NEENO=285840", + "http://news.pts.org.tw/detail.php?NEENO=285841", + "http://news.pts.org.tw/detail.php?NEENO=285842", + "http://news.pts.org.tw/detail.php?NEENO=285843", + "http://news.pts.org.tw/detail.php?NEENO=285844", + "http://news.pts.org.tw/detail.php?NEENO=285845", + "http://news.pts.org.tw/detail.php?NEENO=285846", + "http://news.pts.org.tw/detail.php?NEENO=285848" +] \ No newline at end of file diff --git a/tests/models/Crawler/SETNews/Crawl.test b/tests/models/Crawler/SETNews/Crawl.test new file mode 100644 index 0000000..870a57f --- /dev/null +++ b/tests/models/Crawler/SETNews/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_SETNews::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_SETNews::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/SETNews/Parse.test b/tests/models/Crawler/SETNews/Parse.test new file mode 100644 index 0000000..8c948bc --- /dev/null +++ b/tests/models/Crawler/SETNews/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_SETNews::parse (45500.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/45500.html'); + $result = Crawler_SETNews::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/45500.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/SETNews/data/45500.html b/tests/models/Crawler/SETNews/data/45500.html new file mode 100644 index 0000000..f8c5cb0 --- /dev/null +++ b/tests/models/Crawler/SETNews/data/45500.html @@ -0,0 +1,1471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 頂新魏家債留台灣!味全負債258億 債恐由全民來還?│三立新聞網 SETN.COM + + + +
                      +
                      +
                      + + + + +

                      + + SET三立新聞網 + +

                      +
                      +
                      三立財經台CH88
                      +
                      + +
                      +
                      三立新聞台
                      +
                      + +
                      +
                      +
                      + +
                      + +
                      + +
                      + +
                      + + + +
                      + + + +
                      + + + + +
                      +
                      +
                      + + + + +
                      + +
                      + +
                      + + + + + +
                      + + + + +
                      + +

                      首頁 > + + 政治社會 > + +

                      + + +
                      + + + + + + +
                      +

                      頂新魏家債留台灣!味全負債258億 債恐由全民來還?

                      +
                      +

                      2014/10/25 19:55:00 + + 友善列印友善列印

                      + + + +
                      + +
                      + + + + + + + + + + + + +
                      + + +
                      + + + +
                      + +
                      + + + + + +
                      + +
                      +
                      記者潘照文、張逸民/台北報導
                       
                      頂新集團被砲轟是黑心企業,不僅賣黑心油給台灣人,還把債務留給台灣!翻開康師傅和味全財報就有驚人發現,味全財務體質很差,負債比高達70%,帳上現今有35億,負債高達258億;而康師傅負債比只有50%,擺明將錢藏在海外,但卻大舉跟國銀低利貸款。最誇張的是,到底銀行拿不到錢,最後魏家四兄弟兩手一攤,還是得要全民買單。
                       
                      頂新魏家債留台灣!味全負債258億
                       
                      頂新魏家債留台灣!味全負債258億
                       
                      康師傅生產線裡,這一包包泡麵就是魏家在大陸站穩腳步的根基。1992年魏應州成立康師傅,佔有60%市佔率,在大陸好風光;而在台灣味全產品卻通通慘遭下架命運。同樣的產品兩樣情,魏家留給台灣的,還有大筆債務。
                       
                      頂新魏家債留台灣!味全負債258億
                       
                      財經專家蔡玉真表示,魏家留在台灣的都是質押的資產以及負債、信用貸款,所以這樣的情況加起來的話,我記得沒有錯的話,整個關係企業法人的貸款,光頂新魏家法人的部份是超過500億。
                       
                      頂新魏家債留台灣!味全負債258億
                       
                      翻開財報發現,康師傅滿手現金高達465.9億,負債比只有53.39%;但看看味全的帳上現金只有35億,但債物累累258億,負債比高達70%,財務體質最差,很明顯錢藏海外,債借台灣。財經專家蔡玉真直言:「銀行的利息繳不出來,最後已經撥給他的信用貸款,在經過你所剩下的帝寶還有所剩下的房子,如果有拍賣的話,那最後一定是不足的,不足的話還是由全民買單。」
                       
                      頂新魏家債留台灣!味全負債258億
                      頂新魏家債留台灣!味全負債258億
                       
                      土地融資70億、101質押的借款,還有屬不輕的貸款,錢都跟台灣銀行借,到時銀行拿不到錢,兩手一攤就由全民買單;屈時魏家四兄弟,屁股拍拍逃大陸害慘台灣人民。(整理:實習編輯劉彥璇)
                      +
                      + +
                      + + + + + + + + +
                      +
                      + +
                      +
                      + + + + + + +
                      + +
                      + + + + + + + +
                      +
                      • + + +
                        + +
                        + +
                      +
                      • + + +
                        + +
                        + +
                      +
                      +
                      + + + + + + +
                      來源網址:http://www.setn.com/News.aspx?NewsID=45500
                      + + + +
                      +
                      +
                      + +
                    • 三立財經台CH88
                    • +
                      + + +
                      + +
                    • 三立新聞台CH54
                    • +
                      + + +
                      +
                      +
                      爆料
                      +
                      投稿
                      +

                      分享:

                      + + + + + + + + + +
                      + + + + +
                      + + + +
                      + +
                      ← 在WeChat上關注我們
                      +
                      + +
                      + + + + + + + +
                      + +
                      + + + + + + + + + + + + + +
                      + + + + + + + + +
                      +

                      讀者留言

                      + +
                      + + +
                      + + + + +
                      + +
                      + + + +
                      + +
                      + +
                      +
                      + + + + +
                      +

                      頭條新聞

                      + + 國防部/陀防部發言人臉書 +

                      驚!國防部副部長太扯 夜宴中共官員

                      +

                      台灣國防近期可說是處多事之秋,日前驚爆共諜疑雲,今(13)日更傳出國防部副部長夏立言夜宴現任中國地區共產黨書記的表弟,而...

                      + + +
                    • 衝著馬英九來!朱立倫:個性天差地別
                    • + +
                    • 航空業者還清白 九把刀:清白已破爛
                    • + +
                    • 拱林飛帆參選 賴清德喊話「支持他」
                    • + +
                    • 柯P直鐵錯惹?建築師:路徑短破壞少
                    • + +
                      + + + + +
                      +

                      精彩節目

                      + +
                      +
                      +

                      富郁向錢衝

                      + 油價跌、日圓貶!年底購車全攻略
                      + + +
                      + +

                      搶攻歲末最後一個月的黃金銷售潮,車商促銷一波波,加上日圓狂貶,天時、地利、人和,這個時候是買日系車的最好時機嗎?此外油價持續下探,這幾年深受國人喜愛的SUV,銷售量再度衝高,目前市面上CP值最高的SUV又是哪幾款?各有何優劣?本週《富郁向錢衝》邀請汽車達人龐德、新車購買指南主筆林大維、財經專家黃世聰深入剖析給您聽。

                      +
                      +
                      +
                      + +
                      +
                      +

                      + 成龍、劉德華都住這裡!北京豪宅曝光
                      + + +
                      + +

                      名人或者藝人的住所總是令粉絲好奇,也有許多藝人投資房產相當有成,像是國際巨星成龍就在世界各地置產,不過最近最出名的就是位於北京的豪宅「NAGA上院」,據說這間豪宅大有來頭,許多港星都住在這裡,號稱「港星樓」,包括劉德華、謝霆鋒、吳彥祖都有置產,也因為明星的加持,讓房價大漲,過去成龍買的時候是2億,現在市值可能已經漲到8億。

                      +
                      +
                      +
                      + +
                      +
                      +

                      新台灣加油

                      + 陳為廷選立委!李登輝力挺答應站台
                      + + +
                      + +

                      日前因反黑箱服貿竄紅的學運領袖陳為廷,日前表態聲明要參選苗栗縣立委補選,前總統李登輝表態支持,表示「拚看看!有需要的話,要去說幾句話。」這是一個新世代的崛起,不應阻撓,也答應要為陳為廷站台。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 郭書瑤罵不要玩 李國毅噘嘴好委屈
                      + + +
                      + +

                      三立華劇《22K夢想高飛》中,7個演員們難得聚在一起,在艷陽高照的好日子一起野餐趣,眾人心情超好,李國毅自爆以為天氣冷穿了兩件褲子,沒想到現場卻是快熱昏,而他在等戲時自己玩起盤子,被「冒冒女王」郭書瑤罵說「不要再玩了」,讓他委屈的噘起嘴巴,不過玩心大開的他,也在現場表演模仿撕紙聲音,獲得孟耿如的稱讚,讓他對著郭書瑤說「全世界只有你不捧我場。」

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 好友情人過世 沈文程急忙幫他找新歡
                      + + +
                      + +

                      聽見好友失戀難過,沈文程南下東港,本想送上安慰,卻發現事情不單純。原來沈的好友愛魚如癡,面對愛魚過世,心如刀割無法自己,為了讓好友重拾歡笑,沈情義相挺,自告奮勇替好友,從大鵬灣乘船出海,誓言釣一尾大魚給好友當新歡。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 姚淳耀吳仲強太曖昧 被拱最佳情侶檔
                      + + +
                      + +

                      《再說一次我願意》驚爆「男男戀」正夯?!黃甄妮(飾演Omega)和吳仲強(飾演小琥)排戲中的小娛樂,小倆口搞笑拌嘴,戲中Omega、小琥、志誠(姚淳耀飾演)上演「微妙三角戀」,因為小琥瘋狂愛上Omega,變成控制狂,嚴格控管她一舉一動,讓兩人感情出現裂痕,但私下竟然「琥誠」才是對方真愛?兩人曖昧互動,被拱「最佳情侶檔」,可憐的Omega只好被晾在一旁。

                      +
                      +
                      +
                      + +
                      +
                      +

                      新聞專題

                      + 賓士推新科技!擋風玻璃化身超大螢幕
                      + + +
                      + +

                      今年年初賓士宣布和蘋果合作,讓部分車款運行「Car Play」,但其實賓士自己也正在開發全新的車載系統,未來車上的擋風玻璃將化身超大螢幕,而且用手勢就可以操控,賓士甚至還發表了最新綠能概念車,讓烤漆成為發電機。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 方文琳對槓楊烈 怒嗆聲:和你拼到底
                      + + +
                      + +

                      三立台灣好戲《阿母》旺山用盡心機對付阿滿一家人,利用阿滿那一區的都更案,逼阿滿搬家,阿滿堅定拒絕後,旺山竟然抓走阿滿的婆婆澎粉,把失憶無助的老人家放上怪手,藉此威脅阿滿......

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 拒絕憂鬱症!吃對東西就快樂好心情~
                      + + +
                      + +

                      根據統計,憂鬱症人口約佔全世界人口的3%,也就是說約有約2億人有正承受著憂鬱症的疾苦。現代人精神壓力大、生活匆忙,常不時感到不快樂。其實,靠吃對食物也可以讓我們排解憂鬱,但絕對並非暴飲暴食!而是那些幫助我們抵抗憂鬱的好食物!其實吃對東西就能有好心情,製造出快樂激素讓你愈吃愈快樂!

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 《神很大》阿成、香蕉夜戰拼「將」氣
                      + + +
                      + +

                      《寶島神很大》前往宜蘭三星鍾馗王爺廟,正好遇上鍾馗爺挑選隔天慶典的接駕部將,阿成、香蕉一起加入評比,兄弟倆練的滿頭大汗,為了能爭取到鍾馗爺的青睞,究竟是哪位能通過最終考驗呢?

                      +
                      +
                      +
                      + +
                      + + + + + + +
                      +

                      時事民調

                      +
                      +
                      2014年,你最「喜歡」的名嘴有誰?(每小時可投十票)
                      +
                      +
                        + +
                      • +
                        +

                        我喜歡周玉蔻

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡邱毅

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡唐湘龍

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡趙少康

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡徐嶔煌

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡姚立明

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡林火旺

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡康仁俊

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡鄭村棋

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡黃光芹

                        +
                        +
                      • + + +
                      • +
                        +

                        ......更多選項

                        +
                        +
                      • + +
                      +
                      +
                      + + +
                      +
                      +
                      + + + +
                      + +
                      + +
                      +
                      + + + + + +
                      +

                      你可能也會喜歡

                      + +
                      + +
                      + + +
                      +

                      主播粉絲團

                      + +
                    • + + + +

                      陳書賢

                      +
                      +

                      又彩衣娛親了?暫時忘卻台北的煩惱,回鄉下取暖?台南小北夜市。

                      +
                    • + +
                    • + + + +

                      范益華

                      +
                      +

                      媽呀...還要變多冷?? 我要搬睡袋來公司惹!!

                      +
                    • + +
                    • + + + +

                      王志郁

                      +
                      +

                      今天錄富郁,最近台股大漲大跌,持股如何操作,禮拜六要看唷!!

                      +
                    • + +
                    • + + + +

                      陳雅琳

                      +
                      +

                      新聞生涯裡,因為遇見推動民主的李登輝總統,才讓我更深層認識台灣。 這次九合一大選,台灣過去死板一塊的政治文化終於有所改變,就想聽聽老總統的觀點。...

                      +
                    • + +
                    • + + + +

                      郭雅慧

                      +
                      +

                      週五夜.收播班 (只剩夜貓子同事在茶水間遊蕩) (本週班表) 12/05五 2000.2400.台灣台夜間 12/07日 1200.1800.1900 1...

                      +
                    • + +
                    • + + + +

                      王偊菁

                      +
                      +

                      桌曆索取方式:請附回郵40元+''大''信封寄到台北市內湖區舊宗路一段159號八樓 王偊菁收''~(若再滿額我會在臉書告知) 也請一起認購桌曆做愛心! 150...

                      +
                    • + +
                      + + +
                      + +
                      + + +
                      + + + +
                      + +
                      + +
                      +
                      + +
                      + + +
                      + +
                      + + +
                      + + +
                      +
                      + 關於三立 | + 關於三立新聞網 | + 會員條款 | + 隱私權政策 | + 三立新聞自律守則 | + 合作提案窗口 | + 企業徵才 | + 頻道位置 | + 意見反映 | + 我要爆料 +

                      ©2014 Sanlih E-Television All Rights Reserved 版權所有 盜用必究 台北市內湖區舊宗路一段159號 02-8792-8888

                      +
                      + +
                      + + + + + +
                      + + + + + + + +
                      + + +
                      + + + +
                      + + +
                      + +
                      + + +
                      + +

                      +

                      + +
                      + + + + + + + +
                      + ▲
                      +
                      回頂部
                      +
                      + + + + + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/SETNews/data/45500.json b/tests/models/Crawler/SETNews/data/45500.json new file mode 100644 index 0000000..03d5b3f --- /dev/null +++ b/tests/models/Crawler/SETNews/data/45500.json @@ -0,0 +1,4 @@ +{ + "title": "頂新魏家債留台灣!味全負債258億 債恐由全民來還?", + "body": "記者潘照文、張逸民/台北報導\n \n頂新集團被砲轟是黑心企業,不僅賣黑心油給台灣人,還把債務留給台灣!翻開康師傅和味全財報就有驚人發現,味全財務體質很差,負債比高達70%,帳上現今有35億,負債高達258億;而康師傅負債比只有50%,擺明將錢藏在海外,但卻大舉跟國銀低利貸款。最誇張的是,到底銀行拿不到錢,最後魏家四兄弟兩手一攤,還是得要全民買單。\n \nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163437-XXL.jpg\n \nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163438-XXL.jpg\n \n康師傅生產線裡,這一包包泡麵就是魏家在大陸站穩腳步的根基。1992年魏應州成立康師傅,佔有60%市佔率,在大陸好風光;而在台灣味全產品卻通通慘遭下架命運。同樣的產品兩樣情,魏家留給台灣的,還有大筆債務。\n \nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163439-XXL.jpg\n \n財經專家蔡玉真表示,魏家留在台灣的都是質押的資產以及負債、信用貸款,所以這樣的情況加起來的話,我記得沒有錯的話,整個關係企業法人的貸款,光頂新魏家法人的部份是超過500億。\n \nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163440-XXL.jpg\n \n翻開財報發現,康師傅滿手現金高達465.9億,負債比只有53.39%;但看看味全的帳上現金只有35億,但債物累累258億,負債比高達70%,財務體質最差,很明顯錢藏海外,債借台灣。財經專家蔡玉真直言:「銀行的利息繳不出來,最後已經撥給他的信用貸款,在經過你所剩下的帝寶還有所剩下的房子,如果有拍賣的話,那最後一定是不足的,不足的話還是由全民買單。」\n \nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163441-XXL.jpg\nhttp://setmoney.blob.core.windows.net/newsimages/2014/10/25/163442-XXL.jpg\n \n土地融資70億、101質押的借款,還有屬不輕的貸款,錢都跟台灣銀行借,到時銀行拿不到錢,兩手一攤就由全民買單;屈時魏家四兄弟,屁股拍拍逃大陸害慘台灣人民。(整理:實習編輯劉彥璇)\n" +} \ No newline at end of file diff --git a/tests/models/Crawler/SETNews/data/README.md b/tests/models/Crawler/SETNews/data/README.md new file mode 100644 index 0000000..5fa9cd5 --- /dev/null +++ b/tests/models/Crawler/SETNews/data/README.md @@ -0,0 +1,14 @@ +SETNews data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `45500.html` + From: http://www.setn.com/News.aspx?NewsID=45500 \ No newline at end of file diff --git a/tests/models/Crawler/SETNews/data/listing.html b/tests/models/Crawler/SETNews/data/listing.html new file mode 100644 index 0000000..7a2c776 --- /dev/null +++ b/tests/models/Crawler/SETNews/data/listing.html @@ -0,0 +1,1853 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 三立新聞網 SETN.COM + + + +
                      +
                      +
                      + + + + +

                      + + SET三立新聞網 + +

                      +
                      +
                      三立財經台CH88
                      +
                      + +
                      +
                      三立新聞台
                      +
                      + +
                      +
                      +
                      + +
                      + +
                      + +
                      + +
                      + + + +
                      +
                      + +
                      + +
                      + + +
                      +
                      + + + + +
                      +
                      +
                      + + + + +
                      + +
                      + +
                      + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + +
                      + +
                      +
                      + + + + + + + + + + + + + + + + +
                      +
                      +

                      華流星趨勢

                      + +
                      +
                      + + 周董賺6.4億1200 +

                      雙J再纏鬥!周杰倫大賺6.4億稱王 +

                      +

                      今年歌手年收入排行榜,誰是冠軍呢?答案揭曉就是周杰倫!他靠著跨足不同領域多元吸金,以6.4億元坐穩冠軍,打敗亞軍蔡依林,...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + +
                      +
                      +

                      柯P新政

                      + +
                      +
                      + + 張鐵志 來源:張鐵志臉書 +

                      小內閣新亮點!傳張鐵志入選文化局長 +

                      +

                      台北市長當選人柯文哲新政上路,教育、文化、社會、勞動、環保五局的局長採遴選模式誕生,而截至目前為止僅教育部長確定由湯志民...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + +
                      +
                      +

                      各界籲釋扁

                      + +
                      +
                      + + 陳水扁/flickr(https://farm3.staticflickr.com/2176/2300132442_6145cb739a_z.jpg?zz=1) +

                      快訊/陳水扁保外就醫抗告 高院駁回 +

                      +

                      昨(12)日晚間,前總統陳水扁親筆寫狀向高等法院聲明異議,法官以保外就一爭議應該由行政訴訟解決,遭到駁回;今(13)日中...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + +
                      +
                      +

                      2014選後政局

                      + +
                      +
                      + + 藍四顆太陽1200 +

                      朱立倫推內閣制 吳敦義:不能評論 +

                      +

                      國民黨接班梯隊,在新北市長朱立倫宣佈參選黨主席後,幾位中生代出現了新局面,包括副總統吳敦義被視為最有可能參選2016總統...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + +
                      +
                      +

                      體壇動態

                      + +
                      +
                      + + 圖/記者朱修寬攝 +

                      殷仔信念堅定:變化球、控球精益求精 +

                      +

                      從日本職棒挑戰MLB這個世界棒球的最高殿堂,座右銘「一生懸命」成為一路走來所秉持的堅定信念!台灣「殷雄」陳偉殷10日清晨...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + +
                      +
                      +

                      阿基師驚傳桃色風暴

                      + +
                      +
                      + + 阿基師記者會(林敬旻攝) +

                      影/阿基師記者會全程影音:只有嘴對嘴 +

                      +

                      名廚「阿基師」鄭衍基以愛家、負責任的形象深植人心,才剛度過餿水油風暴的他,沒想到日前卻遭週刊拍到二度帶中年婦女上摩鐵偷腥...

                      +
                      + +
                      + +
                      +
                      看更多相關新聞>>
                      +
                      + + + + + + + +
                      +
                      +

                      國際股市懶人包

                      + +
                      + +
                      + + + + + +
                      + +
                      + +
                      + +
                      +
                      + +
                      +
                      + + +
                      +
                      + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      上市9027.33▲14.26765.31億
                      上櫃137.25▲0.96241.05億
                      金融1064.90▲2.6341.18億
                      電子358.57▲1.32507.63億
                      +
                      + + + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      上證綜合2938.17▲12.430.42%
                      香港恆生23249.20▼63.34-0.27%
                      日本日經17371.58▲114.180.66%
                      南韓綜合1921.71▲5.120.27%
                      +
                      + + + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      英國FTSE6300.63▼161.07-2.49%
                      德國DAX9594.73▼267.8-2.72%
                      法國CAC4108.93▼116.93-2.77%
                      西班牙IBEX10145.00▼286.8-2.75%
                      +
                      + + + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      道瓊工業17280.83▼315.51-1.79%
                      NASDAQ4653.60▼54.56-1.16%
                      S&P5002002.33▼33-1.62%
                      費城半導體671.33▼11.82-1.73%
                      +
                      + + + +
                      +
                      + + + + +
                      + +
                      + +
                      +
                      + + +
                      +
                      +
                      + + + + + + +
                      + + + +
                      + +
                      + + + + + + + + + + + + + + + +
                      +

                      精彩節目

                      + +
                      +
                      +

                      富郁向錢衝

                      + 油價跌、日圓貶!年底購車全攻略
                      + + +
                      + +

                      搶攻歲末最後一個月的黃金銷售潮,車商促銷一波波,加上日圓狂貶,天時、地利、人和,這個時候是買日系車的最好時機嗎?此外油價持續下探,這幾年深受國人喜愛的SUV,銷售量再度衝高,目前市面上CP值最高的SUV又是哪幾款?各有何優劣?本週《富郁向錢衝》邀請汽車達人龐德、新車購買指南主筆林大維、財經專家黃世聰深入剖析給您聽。

                      +
                      +
                      +
                      + +
                      +
                      +

                      + 成龍、劉德華都住這裡!北京豪宅曝光
                      + + +
                      + +

                      名人或者藝人的住所總是令粉絲好奇,也有許多藝人投資房產相當有成,像是國際巨星成龍就在世界各地置產,不過最近最出名的就是位於北京的豪宅「NAGA上院」,據說這間豪宅大有來頭,許多港星都住在這裡,號稱「港星樓」,包括劉德華、謝霆鋒、吳彥祖都有置產,也因為明星的加持,讓房價大漲,過去成龍買的時候是2億,現在市值可能已經漲到8億。

                      +
                      +
                      +
                      + +
                      +
                      +

                      新台灣加油

                      + 陳為廷選立委!李登輝力挺答應站台
                      + + +
                      + +

                      日前因反黑箱服貿竄紅的學運領袖陳為廷,日前表態聲明要參選苗栗縣立委補選,前總統李登輝表態支持,表示「拚看看!有需要的話,要去說幾句話。」這是一個新世代的崛起,不應阻撓,也答應要為陳為廷站台。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 郭書瑤罵不要玩 李國毅噘嘴好委屈
                      + + +
                      + +

                      三立華劇《22K夢想高飛》中,7個演員們難得聚在一起,在艷陽高照的好日子一起野餐趣,眾人心情超好,李國毅自爆以為天氣冷穿了兩件褲子,沒想到現場卻是快熱昏,而他在等戲時自己玩起盤子,被「冒冒女王」郭書瑤罵說「不要再玩了」,讓他委屈的噘起嘴巴,不過玩心大開的他,也在現場表演模仿撕紙聲音,獲得孟耿如的稱讚,讓他對著郭書瑤說「全世界只有你不捧我場。」

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 好友情人過世 沈文程急忙幫他找新歡
                      + + +
                      + +

                      聽見好友失戀難過,沈文程南下東港,本想送上安慰,卻發現事情不單純。原來沈的好友愛魚如癡,面對愛魚過世,心如刀割無法自己,為了讓好友重拾歡笑,沈情義相挺,自告奮勇替好友,從大鵬灣乘船出海,誓言釣一尾大魚給好友當新歡。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 姚淳耀吳仲強太曖昧 被拱最佳情侶檔
                      + + +
                      + +

                      《再說一次我願意》驚爆「男男戀」正夯?!黃甄妮(飾演Omega)和吳仲強(飾演小琥)排戲中的小娛樂,小倆口搞笑拌嘴,戲中Omega、小琥、志誠(姚淳耀飾演)上演「微妙三角戀」,因為小琥瘋狂愛上Omega,變成控制狂,嚴格控管她一舉一動,讓兩人感情出現裂痕,但私下竟然「琥誠」才是對方真愛?兩人曖昧互動,被拱「最佳情侶檔」,可憐的Omega只好被晾在一旁。

                      +
                      +
                      +
                      + +
                      +
                      +

                      新聞專題

                      + 賓士推新科技!擋風玻璃化身超大螢幕
                      + + +
                      + +

                      今年年初賓士宣布和蘋果合作,讓部分車款運行「Car Play」,但其實賓士自己也正在開發全新的車載系統,未來車上的擋風玻璃將化身超大螢幕,而且用手勢就可以操控,賓士甚至還發表了最新綠能概念車,讓烤漆成為發電機。

                      +
                      +
                      +
                      + +
                      +
                      +

                      戲劇

                      + 方文琳對槓楊烈 怒嗆聲:和你拼到底
                      + + +
                      + +

                      三立台灣好戲《阿母》旺山用盡心機對付阿滿一家人,利用阿滿那一區的都更案,逼阿滿搬家,阿滿堅定拒絕後,旺山竟然抓走阿滿的婆婆澎粉,把失憶無助的老人家放上怪手,藉此威脅阿滿......

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 拒絕憂鬱症!吃對東西就快樂好心情~
                      + + +
                      + +

                      根據統計,憂鬱症人口約佔全世界人口的3%,也就是說約有約2億人有正承受著憂鬱症的疾苦。現代人精神壓力大、生活匆忙,常不時感到不快樂。其實,靠吃對食物也可以讓我們排解憂鬱,但絕對並非暴飲暴食!而是那些幫助我們抵抗憂鬱的好食物!其實吃對東西就能有好心情,製造出快樂激素讓你愈吃愈快樂!

                      +
                      +
                      +
                      + +
                      +
                      +

                      綜藝

                      + 《神很大》阿成、香蕉夜戰拼「將」氣
                      + + +
                      + +

                      《寶島神很大》前往宜蘭三星鍾馗王爺廟,正好遇上鍾馗爺挑選隔天慶典的接駕部將,阿成、香蕉一起加入評比,兄弟倆練的滿頭大汗,為了能爭取到鍾馗爺的青睞,究竟是哪位能通過最終考驗呢?

                      +
                      +
                      +
                      + +
                      + + + + + + +
                      +

                      時事民調

                      +
                      +
                      2014年,你最「喜歡」的名嘴有誰?(每小時可投十票)
                      +
                      +
                        + +
                      • +
                        +

                        我喜歡周玉蔻

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡邱毅

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡唐湘龍

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡趙少康

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡徐嶔煌

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡姚立明

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡林火旺

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡康仁俊

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡鄭村棋

                        +
                        +
                      • + +
                      • +
                        +

                        我喜歡黃光芹

                        +
                        +
                      • + + +
                      • +
                        +

                        ......更多選項

                        +
                        +
                      • + +
                      +
                      +
                      + + +
                      +
                      +
                      + + + +
                      + +
                      + +
                      +
                      + + + + +
                      +

                      你可能也會喜歡

                      + +
                      + + +
                      + + +
                      + +
                      + +
                      +
                      + + + + +
                      +

                      主播粉絲團

                      + +
                    • + + + +

                      蔡韋葶

                      +
                      +

                      我家的狗,絕對認為自己是個人!

                      +
                    • + +
                    • + + + +

                      范益華

                      +
                      +

                      媽呀...還要變多冷?? 我要搬睡袋來公司惹!!

                      +
                    • + +
                    • + + + +

                      王志郁

                      +
                      +

                      今天錄富郁,最近台股大漲大跌,持股如何操作,禮拜六要看唷!!

                      +
                    • + +
                    • + + + +

                      張瓊方

                      +
                      +

                      睡前讀到這篇文章寫得真好 http://www.businesstoday.com.tw/article-content-80407-112722

                      +
                    • + +
                    • + + + +

                      陳斐娟

                      +
                      +

                      阿基師捲入桃色風爆,姑且不論「基神」落入凡間的是是非非,整件事,我覺得最值得豎大姆指的,其實是,阿基嫂!阿基嫂沒有如一般女性,在男人出事時,成為男人滅火的「神...

                      +
                    • + +
                    • + + + +

                      廖筱君

                      +
                      +

                      12/12 禮拜五 ※節目異動※今晚節目8點49分播至10點49分! ●"和人民站在一起"!朱立倫宣布將角逐黨揆不選2016!朱搶黨魁推內閣制,36位立委催...

                      +
                    • + +
                      + + + + + + +
                      + + + + +
                      + + + +
                      + +
                      + + +
                      + + +
                      + + + + + +
                      + + +
                      + +
                      + + +
                      + + +
                      +
                      + 關於三立 | + 關於三立新聞網 | + 會員條款 | + 隱私權政策 | + 三立新聞自律守則 | + 合作提案窗口 | + 企業徵才 | + 頻道位置 | + 意見反映 | + 我要爆料 +

                      ©2014 Sanlih E-Television All Rights Reserved 版權所有 盜用必究 台北市內湖區舊宗路一段159號 02-8792-8888

                      +
                      + +
                      + + + + + +
                      + + + + + + + +
                      + + +
                      + + + +
                      + + +
                      + +
                      + + +
                      + +

                      +

                      + +
                      + + + + + + + +
                      + ▲
                      +
                      回頂部
                      +
                      + + + + + + + + +
                      + + + + + + + + + + + + + + + + + + diff --git a/tests/models/Crawler/SETNews/data/listing.json b/tests/models/Crawler/SETNews/data/listing.json new file mode 100644 index 0000000..94d2e83 --- /dev/null +++ b/tests/models/Crawler/SETNews/data/listing.json @@ -0,0 +1,99 @@ +[ + "http://www.setnews.net/News.aspx?NewsID=45500", + "http://www.setnews.net/News.aspx?NewsID=50803", + "http://www.setnews.net/News.aspx?NewsID=51675", + "http://www.setnews.net/News.aspx?NewsID=51692", + "http://www.setnews.net/News.aspx?NewsID=51866", + "http://www.setnews.net/News.aspx?NewsID=51934", + "http://www.setnews.net/News.aspx?NewsID=51997", + "http://www.setnews.net/News.aspx?NewsID=52010", + "http://www.setnews.net/News.aspx?NewsID=52025", + "http://www.setnews.net/News.aspx?NewsID=52037", + "http://www.setnews.net/News.aspx?NewsID=52066", + "http://www.setnews.net/News.aspx?NewsID=52067", + "http://www.setnews.net/News.aspx?NewsID=52082", + "http://www.setnews.net/News.aspx?NewsID=52113", + "http://www.setnews.net/News.aspx?NewsID=52138", + "http://www.setnews.net/News.aspx?NewsID=52142", + "http://www.setnews.net/News.aspx?NewsID=52177", + "http://www.setnews.net/News.aspx?NewsID=52181", + "http://www.setnews.net/News.aspx?NewsID=52196", + "http://www.setnews.net/News.aspx?NewsID=52211", + "http://www.setnews.net/News.aspx?NewsID=52233", + "http://www.setnews.net/News.aspx?NewsID=52238", + "http://www.setnews.net/News.aspx?NewsID=52257", + "http://www.setnews.net/News.aspx?NewsID=52267", + "http://www.setnews.net/News.aspx?NewsID=52272", + "http://www.setnews.net/News.aspx?NewsID=52305", + "http://www.setnews.net/News.aspx?NewsID=52307", + "http://www.setnews.net/News.aspx?NewsID=52336", + "http://www.setnews.net/News.aspx?NewsID=52338", + "http://www.setnews.net/News.aspx?NewsID=52340", + "http://www.setnews.net/News.aspx?NewsID=52341", + "http://www.setnews.net/News.aspx?NewsID=52343", + "http://www.setnews.net/News.aspx?NewsID=52352", + "http://www.setnews.net/News.aspx?NewsID=52386", + "http://www.setnews.net/News.aspx?NewsID=52395", + "http://www.setnews.net/News.aspx?NewsID=52396", + "http://www.setnews.net/News.aspx?NewsID=52397", + "http://www.setnews.net/News.aspx?NewsID=52401", + "http://www.setnews.net/News.aspx?NewsID=52422", + "http://www.setnews.net/News.aspx?NewsID=52423", + "http://www.setnews.net/News.aspx?NewsID=52425", + "http://www.setnews.net/News.aspx?NewsID=52433", + "http://www.setnews.net/News.aspx?NewsID=52435", + "http://www.setnews.net/News.aspx?NewsID=52437", + "http://www.setnews.net/News.aspx?NewsID=52439", + "http://www.setnews.net/News.aspx?NewsID=52441", + "http://www.setnews.net/News.aspx?NewsID=52442", + "http://www.setnews.net/News.aspx?NewsID=52446", + "http://www.setnews.net/News.aspx?NewsID=52447", + "http://www.setnews.net/News.aspx?NewsID=52449", + "http://www.setnews.net/News.aspx?NewsID=52450", + "http://www.setnews.net/News.aspx?NewsID=52452", + "http://www.setnews.net/News.aspx?NewsID=52453", + "http://www.setnews.net/News.aspx?NewsID=52456", + "http://www.setnews.net/News.aspx?NewsID=52463", + "http://www.setnews.net/News.aspx?NewsID=52471", + "http://www.setnews.net/News.aspx?NewsID=52489", + "http://www.setnews.net/News.aspx?NewsID=52492", + "http://www.setnews.net/News.aspx?NewsID=52493", + "http://www.setnews.net/News.aspx?NewsID=52494", + "http://www.setnews.net/News.aspx?NewsID=52496", + "http://www.setnews.net/News.aspx?NewsID=52498", + "http://www.setnews.net/News.aspx?NewsID=52500", + "http://www.setnews.net/News.aspx?NewsID=52501", + "http://www.setnews.net/News.aspx?NewsID=52504", + "http://www.setnews.net/News.aspx?NewsID=52508", + "http://www.setnews.net/News.aspx?NewsID=52510", + "http://www.setnews.net/News.aspx?NewsID=52511", + "http://www.setnews.net/News.aspx?NewsID=52512", + "http://www.setnews.net/News.aspx?NewsID=52514", + "http://www.setnews.net/News.aspx?NewsID=52515", + "http://www.setnews.net/News.aspx?NewsID=52516", + "http://www.setnews.net/News.aspx?NewsID=52517", + "http://www.setnews.net/News.aspx?NewsID=52518", + "http://www.setnews.net/News.aspx?NewsID=52519", + "http://www.setnews.net/News.aspx?NewsID=52520", + "http://www.setnews.net/News.aspx?NewsID=52521", + "http://www.setnews.net/News.aspx?NewsID=52522", + "http://www.setnews.net/News.aspx?NewsID=52524", + "http://www.setnews.net/News.aspx?NewsID=52526", + "http://www.setnews.net/News.aspx?NewsID=52527", + "http://www.setnews.net/News.aspx?NewsID=52530", + "http://www.setnews.net/News.aspx?NewsID=52531", + "http://www.setnews.net/News.aspx?NewsID=52533", + "http://www.setnews.net/News.aspx?NewsID=52534", + "http://www.setnews.net/News.aspx?NewsID=52535", + "http://www.setnews.net/News.aspx?NewsID=52536", + "http://www.setnews.net/News.aspx?NewsID=52539", + "http://www.setnews.net/News.aspx?NewsID=52540", + "http://www.setnews.net/News.aspx?NewsID=52541", + "http://www.setnews.net/News.aspx?NewsID=52544", + "http://www.setnews.net/News.aspx?NewsID=52545", + "http://www.setnews.net/News.aspx?NewsID=52549", + "http://www.setnews.net/News.aspx?NewsID=52550", + "http://www.setnews.net/News.aspx?NewsID=52551", + "http://www.setnews.net/News.aspx?NewsID=52563", + "http://www.setnews.net/News.aspx?NewsID=52565" +] \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/Crawl.test b/tests/models/Crawler/StormMediaGroup/Crawl.test new file mode 100644 index 0000000..1598dec --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_StormMediaGroup::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_StormMediaGroup::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/Parse.test b/tests/models/Crawler/StormMediaGroup/Parse.test new file mode 100644 index 0000000..67aba50 --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_StormMediaGroup::parse (048c71d1.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/048c71d1.html'); + $result = Crawler_StormMediaGroup::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/048c71d1.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/data/048c71d1.html b/tests/models/Crawler/StormMediaGroup/data/048c71d1.html new file mode 100644 index 0000000..bbaee0f --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/data/048c71d1.html @@ -0,0 +1,2318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 風傳媒 一個有國際觀、專注揭弊、觀點犀利批判性的新媒體! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      +
                      +
                      +
                      + + +
                      +
                      +   +
                      +
                      + + +
                      + +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + +
                      + +
                      + +
                      +
                      + + + + +
                      + + +
                      + + + + + + + + + +
                      +
                      + +
                      +
                      + + + + + + +
                      +
                      +
                      +
                      +
                      + + + + + + + + + +
                      +

                      + 首頁> + 新聞> + + + + + 國際 + + + + +

                      +

                      油價跌跌不休 重挫歐美股市

                      + + + +
                      + +
                      + + + 產生縮網址 + +
                      + +
                      + + + + + + +

                      編譯中心 + 2014年12月13日 09:33 + 237 點擊數 +

                      +
                      +
                      + +
                        +
                      • + +
                        +
                      • +
                      • +
                        + +
                      • +
                      • + + + +
                      • +
                      • + + +
                      • + + + +
                      • + + + + +
                      • + +
                      • 列印
                      • +
                      + A + A + A + A +
                      + + + + + + +
                      + + 油價跌跌不休 重挫歐美股市 + + + + +
                      + + + + +
                      +
                      +
                      受油價繼續下跌拖累,紐約股市三大指數12日下跌,本週三大指數全部收跌。道瓊和標普連續7周收漲後本週分別下跌3.8%和3.5%,為今年以來最大單周跌幅,納斯達克本週下跌2.7%。
                      +

                      +

                      +
                       
                      +
                      國際油價12日繼續刷新五年低點。2015年1月交貨的紐約輕質原油期貨價格下挫4.15%,收於每桶57.46美元,為2009年5月以來新低。前一交易日,紐約原油期貨收盤首次跌破每桶60美元大關。
                      +
                       
                      +
                      對原油供過於求的擔憂使油價近期連續走低。繼石油輸出國組織10日下調明年原油需求預期後,國際能源署12日下調了2015年全球原油日均需求的增長預期。
                      +
                       
                      +
                      儘管美國消費者信心升至近八年新高,但對股市的提振作用不大。美國密西根大學和路透聯合發佈的報告顯示,12月份密西根大學消費者信心指數初值為93.8,創2007年1月以來新高,也好於市場預期。
                      +
                       
                      +
                      另外,美國勞工部公佈的數據顯示,受能源價格下降影響,美國批發物價指數在經歷10月份的小幅反彈後,11月份再次下降,降幅0.2%。
                      +
                       
                      +
                      截至當天收盤,道瓊工業平均指數跌315.51點,收於17280.83點,跌幅1.79%。標準普爾500種股票指數跌33.00點,收於2002.33點,跌幅1.62%。納斯達克綜合指數跌54.56點,收於4653.60點,跌幅1.16%。
                      +
                       
                      +
                      歐洲三大股市均大幅下挫。倫敦股市《金融時報》100種股票平均價格指數12日收盤大跌,報收於6300.63點,下跌161.07點,跌幅2.49%。法國巴黎股市CAC40指數12日以4108.93點報收,下跌116.93點,跌幅2.77%;德國法蘭克福股市DAX指數收於9594.73點,下跌267.80點,跌幅2.72%。
                      + + +
                      + +
                      + + + +
                      +

                      立即下載風傳媒APP,世界脈動在你手中!

                      + +
                      +
                      + +
                        +
                      • + +
                        +
                      • +
                      • +
                        + +
                      • +
                      • + + + +
                      • +
                      • + + +
                      • + + + +
                      • + + + + +
                      • + +
                      • 列印
                      • +
                      +
                      + + + +
                      +
                      + + + + + +
                      +
                      +
                      + + +
                      + +
                      + 如果您喜歡我們的報導,請幫我們按個讚! + +
                      + +
                      +
                      +
                      + + + + + + + + + + + + + + +
                      + +
                      + + + + + +

                      熱門新聞

                      + + +
                      + +
                      + +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      + +
                      + +
                      +
                      + + + + + + + + +
                      +
                      +
                      +
                      +
                      + + + + + +
                      + + + + + +
                      + + + + + + + + +
                      + + + +
                      + +
                      +

                      我要留言

                      +
                      + +
                      + +
                      + +
                      + + + + +
                      +
                      +
                      +
                      +
                      + + 0則留言 +
                      +
                      +
                        + +
                      + +
                      +
                      +
                      + +
                      + + + + + + + + +
                      +
                      +
                      +
                      +
                      +
                      + + + + +
                      + + + + + + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +

                      Copyright © 2014 Storm Media Group All Rights Reserved.

                      +
                      +
                      +
                      + + + + + + + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/data/048c71d1.json b/tests/models/Crawler/StormMediaGroup/data/048c71d1.json new file mode 100644 index 0000000..5431e74 --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/data/048c71d1.json @@ -0,0 +1,4 @@ +{ + "title": "油價跌跌不休 重挫歐美股市", + "body": "受油價繼續下跌拖累,紐約股市三大指數12日下跌,本週三大指數全部收跌。道瓊和標普連續7周收漲後本週分別下跌3.8%和3.5%,為今年以來最大單周跌幅,納斯達克本週下跌2.7%。\n\n\n \n國際油價12日繼續刷新五年低點。2015年1月交貨的紐約輕質原油期貨價格下挫4.15%,收於每桶57.46美元,為2009年5月以來新低。前一交易日,紐約原油期貨收盤首次跌破每桶60美元大關。\n \n對原油供過於求的擔憂使油價近期連續走低。繼石油輸出國組織10日下調明年原油需求預期後,國際能源署12日下調了2015年全球原油日均需求的增長預期。\n \n儘管美國消費者信心升至近八年新高,但對股市的提振作用不大。美國密西根大學和路透聯合發佈的報告顯示,12月份密西根大學消費者信心指數初值為93.8,創2007年1月以來新高,也好於市場預期。\n \n另外,美國勞工部公佈的數據顯示,受能源價格下降影響,美國批發物價指數在經歷10月份的小幅反彈後,11月份再次下降,降幅0.2%。\n \n截至當天收盤,道瓊工業平均指數跌315.51點,收於17280.83點,跌幅1.79%。標準普爾500種股票指數跌33.00點,收於2002.33點,跌幅1.62%。納斯達克綜合指數跌54.56點,收於4653.60點,跌幅1.16%。\n \n歐洲三大股市均大幅下挫。倫敦股市《金融時報》100種股票平均價格指數12日收盤大跌,報收於6300.63點,下跌161.07點,跌幅2.49%。法國巴黎股市CAC40指數12日以4108.93點報收,下跌116.93點,跌幅2.77%;德國法蘭克福股市DAX指數收於9594.73點,下跌267.80點,跌幅2.72%。\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t.hk_event{\n\t\t\t\t\t\tborder: 1px solid #000;\n\t\t\t\t\t\tpadding: 10px 20px;\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t\t.hk_event .link{\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\tmargin: 10px 0;\n\t\t\t\t\t}\n\t\t\t\t\t.hk_box{\n\t\t\t\t\t\twidth: 200px;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tmargin: 10px 0;\n\t\t\t\t\t}\n\t\t\t\t\t.hk_box.mid{\n\t\t\t\t\t\tmargin: 10px 14px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t 立即下載風傳媒APP,世界脈動在你手中!" +} \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/data/README.md b/tests/models/Crawler/StormMediaGroup/data/README.md new file mode 100644 index 0000000..c019559 --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/data/README.md @@ -0,0 +1,14 @@ +StormMediaGroup data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `048c71d1.html` + From: http://www.stormmediagroup.com/opencms/news/detail/048c71d1-8268-11e4-b7fe-ef2804cba5a1/?uuid=048c71d1-8268-11e4-b7fe-ef2804cb \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/data/listing.html b/tests/models/Crawler/StormMediaGroup/data/listing.html new file mode 100644 index 0000000..e669e03 --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/data/listing.html @@ -0,0 +1,5050 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 風傳媒 一個有國際觀、專注揭弊、觀點犀利批判性的新媒體! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      +
                      +
                      +
                      + + +
                      +
                      +   +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +

                      + 首頁> + + + + 新聞> + + + + + + 國內 + + > + + + 更多國內新聞 +

                      +
                      +
                      +
                        + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 曾競選淡江大學學生會會長的陸生蔡博藝,今年大四,她在13日上午的《公民、青年與台灣選舉:兩岸青年的對話》座談會上,談到對台灣選舉的觀察。她在競選期間,近距離跟著台北市大安區古莊里里長參選人簡銘宏,以及綠黨競選桃園市中壢區議員的王浩宇,她觀察到,新媒體讓競選成本大幅降低,老一輩候選人該思考撒錢方式的妥適性,而基層結構派系依舊穩固,突圍仍有困難的情況。 +蔡博藝觀... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 有關《蘋果日報》13日報導「國防部副部長夜宴共軍導彈前軍官」一事,國防部副部長夏立言鄭重澄清,表示中國籍的遠房親戚申列京,是雲南省玉溪市地方的食品藥品監督管理局的黨組書記,申列京的妻子王海坡是地方區的出納,絕未具有中共第二炮兵部隊退役副營長的身分,他在知悉申列京具有中共地方黨職身分後,隔日即向安全部門說明前晚的行程。 +據媒體報導,國防部副部長夏立言本月6日晚... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 文化部「2014臺灣國際詩歌節」重點活動「詩境跨越:與國際詩人對話」、「臺灣詩歌傳唱」系列活動將於12月12日至15日登場,除邀請6位重量級國際詩人來臺交流,並於12日下午於齊東詩舍舉辦歡迎茶會,邀請陳黎、管管等近30位詩人齊聚一堂。 +「詩境跨越:與國際詩人對話」所邀請的詩人包含代表華人文化圈的香港北島、大陸楊鍵;代表東方文化圈的日本蜂飼耳、韓國羅喜德;以及... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 科技部代理部長林一平今(12日)表示,日前刊載交大教授黃國華用DNA聚合酶為基因定序」的國際頂尖期刊《自然奈米》(Nature Nanotechnology)回信科技部,表示將撤下該論文、黃也同意撤文。科技部決定,將對黃國華與同案學生陳昱勳祭出停權5到10年的重懲。 +交大材料系教授黃國華民國102年發表「用DNA聚合酶為基因定序」論文,並刊載在國際頂尖期刊《... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 訴訟長達15年的美國無線電公司(RCA)案今(12)日舉行一審最終辯論,在結束上午的原告辯論後,中午RCA志工團於場外演唱吳易叡教授創作的歌曲「春光:誌念RCA工傷」為自救會成員及義務律師團打氣。義務律師團表示,上午法庭攻防重點為職業病因果關係之確立,並希望透過要求精神賠償27億元的方式,為530位工人及家屬爭取到RCA的一個真相與道歉。 +RCA公司自196... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 美國無線電公司(RCA)工殤案經過了15年的訴訟過程,今(12)日做一審最後詰辯,上午RCA員工自救會於台北地方法院前召開記者會說明抗爭歷程,並期望這個案例,能成為法院確定職業病因果關係的重要判例。60歲上下的受害員工們合唱抗爭歌曲「美麗的花朵」表達心聲,有受害員工情緒激動淚流不止,華隆自救會也到場聲援,場面感人。 +盼能成為職業病因果關係判例 +RCA公司於1... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 自今年1月到10月底為止,來台短期工作的外籍人士共有9萬4000多人,不過其中有5000多名勞工沒有受到任何職災保障。台灣勞工陣線今天(12日)舉行記者會,呼籲政府重視中國籍勞工來台工作的權益,並比照其他外國籍勞工納保。 +日前1名中國籍劉姓技師在新北市汐止的工地進行電梯維修保養時,不幸失足墜落死亡,這起事件引起中國籍勞工來台未受到保障的爭議。 +律師賴中強表示... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 台北市長當選人柯文哲首開先例「民選」勞動局長,5位備選人名單出爐,誰是你心目中的台北市勞動局長?《風傳媒》邀你來票選! +本次投票時間從12月12日下午7時開始投票,到14日下午4時截止。APP使用者按此投票。 +由柯文哲首創的勞動局長遴選,可說是一波三折。 +台北市勞動局長候選人由遴選委員書面審查備選人,先選出10人,10日經過第二階段面試,11日公布遴選委員會... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 媒體報導,台電因燃料成本下跌,計畫將針對民生用電及小商家退費,用電戶換算1年約可回饋166元,大約2個便當的價錢。對此,立院民進黨團11日召開記者會反批台電的新電價公式,將人事等成本轉嫁消費者,反而會讓用電戶每年多396元的電費,反而多付4個便當的錢。黨團幹事長蔡其昌呼籲經濟部及台電,回饋電費及新電價公式應脫勾處理,也表示立院會嚴格討論電價公式。 +蔡其昌表示... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 財政部預計於明年1月提出「房地合一實價課稅」改革方案,日前引起建商與不動產產業公會強烈反彈,財政部似乎有退縮跡象。對此,巢運11日召開記者會,呼籲立委跟建商不要阻撓稅制改革,否則將公布阻擋法案立委及其房產資料。 +巢運表示,日前財政部向立法院財政委員會提出「房地合一稅制之規劃情形」專案報告,引來立委「太可怕」、「仲介會倒閉一半以上」等等批評聲浪,建商及不動產開... +
                        +
                        +
                        +
                      • + + +
                      + + + + + + +
                      + + + + + + + + + + + + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 + + 9 + + + + 下一頁 + 最末頁 + +
                      + + +
                      + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + +
                      +
                      +
                      + + + + +
                      + + + + + + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +

                      Copyright © 2014 Storm Media Group All Rights Reserved.

                      +
                      +
                      +
                      + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 風傳媒 一個有國際觀、專注揭弊、觀點犀利批判性的新媒體! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      +
                      +
                      +
                      + + +
                      +
                      +   +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +

                      + 首頁> + + + + 新聞> + + + 國際 + + + + + > + + + 更多國際新聞 +

                      +
                      +
                      +
                        + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 《BBC》秘魯國際氣候會議懸而未決 +在秘魯首都利瑪舉行的聯合國全球氣候變遷會議,已經超過原訂的12日閉幕時程,但仍然無法達成協議,工業先進國家與開發中國家對溫室氣體減排相持不下。 +《CNN》IS公開表明 可性侵非教徒的女性與兒童 +佔據伊拉克與敘利亞廣大區域的恐怖組織「伊斯蘭國」(IS)日前發布政令,表明可以讓非教徒的女性與兒童淪為奴隸,並加以性侵。 +《美聯社... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 義大利媒體報導,天主教教宗方濟各(Pope Francis)11日出席一場在聖伯多祿廣場(St. Peter’s Square)的公開活動時,安慰一名剛失去愛犬的小男童,引述使徒保祿(Paul)的話說:「天堂是開放給所有上帝的造物,有一天我們會在上帝的永恆中再度看見牠們」。此舉被外界認為,教宗一話語暗示了「動物也能上天堂。」 +這一席言論,雖不知道是否有助於安... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 西藏精神領袖達賴喇嘛目前正在義大利參加諾貝爾獎和平得主的年度會議,並希望與天主教教宗方濟各(Pope Francis)會面,但是梵蒂岡方面12日回應,因梵蒂岡和中國的「關係微妙」,教宗不會與達賴喇嘛會面。 +梵蒂岡發言人表示,教宗十分尊敬達賴喇嘛,但為了一些「明顯的原因」已經回絕,方濟各也不會與其他諾貝爾獎得主會面,會以視訊向與會者致意。達賴喇嘛的發言人表示:... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 美國國會12日通過2015年會計年度《國防授權法》(NDAA),為美國整軍經武開出一張5842億美元(約新台幣18兆4000億元)的支票,其中最值得注目的部分是637億美元的海外作戰經費,頭號打擊目標正是今年異軍突起的中東恐怖組織「伊斯蘭國」(Islamic State,IS)。 +5842億美元 新台幣18兆4000億元 +這項法案已經在4日以300票對119... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 受油價繼續下跌拖累,紐約股市三大指數12日下跌,本週三大指數全部收跌。道瓊和標普連續7周收漲後本週分別下跌3.8%和3.5%,為今年以來最大單周跌幅,納斯達克本週下跌2.7%。 +國際油價12日繼續刷新五年低點。2015年1月交貨的紐約輕質原油期貨價格下挫4.15%,收於每桶57.46美元,為2009年5月以來新低。前一交易日,紐約原油期貨收盤首次跌破每桶60... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 小小一袋夏威夷火山豆(macadamia nuts),近來紅遍南韓,因為它讓堂堂大韓航空社長(董事長)千金大顯官威,硬生生下令客機掉頭,引發南韓社會排山倒海而來的譴責,不得不辭去公司職務,還被迫低聲下氣地道歉。 +大韓航空(Korean Air)前副社長趙顯娥12日下午現身,到國土交通部航空鐵道事故調查委員會大樓接受調查,並且表示願意向5日從紐約飛往仁川的KE... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 「我們花了好多心力確保消費者無法任意駭進蘋果的數位音樂系統,因為一旦發生這種憾事,唱片公司就會要求我們將音樂下架」,蘋果創辦人賈伯斯(Steve Jobs)5日在加州「出庭」時這樣表示。 +生前影帶當證詞 +這段長度約27分鐘的錄影為賈伯斯過世前半年(2011年4月)所錄製,據悉,當蘋果公司代表在庭上播放這段影片時,全場「靜默無聲(transfixed)」,因為... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 美國中央情報局(CIA)局長布瑞南(John Brennan)11日承認,過去10年間,部分CIA人員曾在未授權的情形下使用「令人厭惡的」(abhorrent)手段取得情報,但強調絕大多數的CIA人員並未不當對待囚犯。布瑞南表示,CIA的拘禁計畫有其效果,但「使用加強偵訊手段(enhanced interrogation techniques,E.I.T.)... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 歐巴馬政府出兵攻打伊斯蘭國(Islamic State, IS)有譜?美國參議院外交委員會(Foreign Relations Committee)11日通過一項法案,授權白宮有條件出動地面戰鬥部隊打擊伊斯蘭國,唯此草案要留待明年1月新國會開議後,才會進行參眾兩院的全院討論與表決,屆時預料將有一場激辯。 +間接放寬出兵限制 +根據參院外委會的這項授權草案(Aut... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 有奧斯卡風向球之稱的金球獎(Golden Globe Awards),入圍名單11日揭曉,喜劇片《鳥人》(Birdman)入圍7項最搶眼;《年少時代》(Boyhood)與《模仿遊戲》(The Imitation Game)入圍5項緊追在後;《歡迎來到布達佩斯大飯店》(The Grand Budapest Hotel)也以4項提名異軍突起。 +影星茱莉安摩爾(J... +
                        +
                        +
                        +
                      • + + +
                      + + + + + + +
                      + + + + + + + + + + + + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 + + 9 + + + + 下一頁 + 最末頁 + +
                      + + +
                      + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + +
                      +
                      +
                      + + + + +
                      + + + + + + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +

                      Copyright © 2014 Storm Media Group All Rights Reserved.

                      +
                      +
                      +
                      + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 風傳媒 一個有國際觀、專注揭弊、觀點犀利批判性的新媒體! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      +
                      +
                      +
                      + + +
                      +
                      +   +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +

                      + 首頁> + + + + 新聞> + + + + 政治 + + + + > + + + 更多政治新聞 +

                      +
                      +
                      +
                        + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 前總統陳水扁日前申請保外就醫遭駁,向台北地方法院提出聲明異議遭駁回,他不服而提抗告。台灣高等法院今天裁定抗告駁回。 +目前唯一能可能讓扁保外就醫的途徑,就要看法務部矯正署最後如何決定。 +前總統陳水扁為保外就醫,今年6月首度向法務部矯正署申請保外就醫遭駁回,他親筆寫訴狀向台北地院聲明異議,上月底遭北院以管轄法院錯誤為由駁回。 +法務部長羅瑩雪日前召開記者會,鬆口為... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 新北市長朱立倫12日正式宣佈參選國民黨主席,並以推動內閣制為其政見。國民黨代理主席、副總統吳敦義13日上午被問及是否支持修憲時表示,他身為負責黨主席補選的代理主席,無論贊成與否都不宜評論。 +朱立倫12日在個人臉書宣佈參選國民黨主席,並提出推動修憲,以內閣制取代雙首長制為其競選政見,引起政壇諸多揣測。 +副總統吳敦義13日上午出席公開活動時表示,世界上較著名的內... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 柯文哲說要找來女性企業家擔任副市長,各界把女性企業界猜一圈後,《中國時報》今日報導,指國內廣告界著名的女強人、奧美集團大中華區副董事長莊淑芬,可望出任第3位副市長。 +對莊的人事,多位柯辦人士不願評論,強調柯文哲辦公室並未證實此一報導,相關新人事公布仍會按照既定節奏再正式向外宣布。 +柯文哲已發佈鄧家基、林欽榮2位副手,但第3位副手遲遲沒有宣布。柯日前曾透露,鎖... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 九合一選後分析,各界專家學者出籠,紛紛表示這是中間選民和年輕選民的新力量,透過網路的傳播,壓垮國民黨政權。以學術研究的角度來看,專長民調和選舉預測的3位學者,對中間選民都持保留態度,到底誰才是中間選民,台灣學界未定論。 +不少民眾自認中間選民或中立選民,細究歷次選舉政黨傾向,也許真的不是如此。加上不少媒體民調常常將未表態選民直接視為中間選民,一直以來都讓中間選... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 台北市長選舉結果出爐,無黨籍參選的柯文哲大勝國民黨提名的連勝文24萬票,外界都在關注怎麼贏的,各種選情分析滿天飛,包含網路世代、年輕族群和中間選民等各式論調。專注選舉研究的學者認為,主因是對手「產品」不夠好,無法完全吸引藍營選民,而非柯文哲真的有多「神」。 +台大政治系今天舉行午餐學術活動,邀請該系退休教授洪永泰、政大選舉研究中心主任蔡佳泓和未來事件交易所執行... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 針對修憲議題,民進黨發言人黃帝穎12日表示,健全國會是健全民主憲政制度的基礎,民進黨認為這個階段,應該以國會為中心來啟動憲改工程,包括解決國會席次不能合理反應選票比例的「票票不等值問題」,以及有效政黨門檻應該降低,讓小黨、社會多元的聲音在國會有代表的席次和18歲公民權等議題為優先工作。 +黃帝穎也強調,憲改必須以國家民主長遠發展作為目標,必須有清楚的策略和足夠... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 陳水扁前總統爭取保外就醫,其中向高院聲請聲明異議部分,高院12日下午裁定駁回,扁子陳致中晚間在臉書 強調,扁病情不能再拖,法務部身為主管官署,必須自己決定,絕無推給法院之理。 +民進黨發言人黃帝穎晚間也發出新聞稿,指為了避免扁病況持續惡化,法務部本可依法做出適法的裁定,讓扁保外就醫,進行居家療養,這不僅是法務部的職權,也是基於尊重醫療專業、醫療人權的理由。但今... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 針對新北市長朱立倫宣布要選國民黨黨主席,還主張進行憲改,李登輝前總統12日下午受訪時則說,「很好啊,國民黨就去拼,不拼怎生存?」李還說,「應該要自立性,自己志願來喊,不要聽別人的話,怕怕處理,沒法度啦(台語)」。 +雖然當年是被國民黨開除而離開,李登輝下午受訪時,還是期勉國民黨,要認真打拼,為台灣努力,還強調這次選舉贏的不是民進黨,而是老百姓,「講正經的,沒贏... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 台北市長當選人柯文哲12日下午在前國代許龍俊陪同下,前往翠山莊拜會前總統李登輝,兩人會談近三個小時,李親自送柯文哲離開翠山莊,李和柯受訪時,特別期勉柯,「做事要謙卑、冷靜、忍耐」,市政才會做得好,還強調,做市長很辛苦,意見很多,議會也要照顧到,要思考怎麼和議會關係弄好。 +李登輝還說,柯文哲在競選時跟老百姓說了很多話,這些話等到當市長時就要實實在在去執行,讓台... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 朱立倫今(12日)宣佈參選國民黨主席、不參加2016年總統大選,並表示將推動修憲,包含以內閣制取代現行雙首長制、下修投票年齡至18歲、降低政黨門檻至3%等。對此,國民黨立委費鴻泰表示,許多藍委支持朱立倫見解。 +朱立倫表示,11月29日國民黨空前潰敗,人民用選票發出怒吼,證明國民黨路線應徹底檢討。朱坦言,經濟與兩岸政策本來是國民黨的優勢,但六年下來人民發現財富... +
                        +
                        +
                        +
                      • + + +
                      + + + + + + +
                      + + + + + + + + + + + + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 + + 9 + + + + 下一頁 + 最末頁 + +
                      + + +
                      + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + +
                      +
                      +
                      + + + + +
                      + + + + + + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +

                      Copyright © 2014 Storm Media Group All Rights Reserved.

                      +
                      +
                      +
                      + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 風傳媒 一個有國際觀、專注揭弊、觀點犀利批判性的新媒體! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + +
                      + + + + + + +
                      +
                      +
                      +
                      + + +
                      +
                      +   +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +

                      + 首頁> + + + + 新聞> + + + + + 兩岸 + + + > + + + 更多兩岸新聞 +

                      +
                      +
                      +
                        + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 古巴前領導人菲德爾·卡斯楚(Fidel Alejandro Castro Ruz)11日登上中國媒體版面,因為他是2014年的孔子和平獎得獎人。不過今年的頒獎典禮已在9日結束,卡斯楚也根本沒到北京領獎,而是由古巴留學生代領,之後再帶回古巴轉交。如此草率的「中國版和平獎」非但中國外交部不願評論,微博網民更是一片酸言嘲諷:「孔子若有知,不知會怎麼想這群不肖子孫。... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 香港政府昨天(11日)在金鐘執行清場,一共逮捕247名不願離開的抗議人士,包括學聯秘書長周永康、壹傳媒集團主席黎智英、歌手何韻詩、學者周保松、以及15名泛民派的立法會議員等人,都被帶回警署訊問。原本佈滿帳篷與路障的金鐘甘諾道、夏愨(音同「卻」)道,也在11日晚間恢復通車。被捕者從12日清晨起陸續被無條件釋放,在金鐘、旺角已被清場後,佔領區僅剩銅鑼灣一處。香港... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + (黎智英被拘捕後,立刻宣布辭去港蘋社長,取自香港獨立媒體網) +金鐘最終清場,港警11日於下午4時27分開始拘捕行動,警方從兩點開始呼籲靜坐人士合作,自行離開,但前排學聯、學思民潮成員及立法會議員都已做好被捕的心理準備,持續高呼「我要真普選,梁振英下台。」 +堅決在佔領區留守的示威者已經靜坐超過8小時,香港警方宣布金鐘佔領區開始清場後,有大批佩戴頭盔及盾牌的警員... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 中國2015年將迎來749萬名高校(大學及專科院校)的應屆畢業生,人數創下歷史新高。由於高校畢業生的就業市場日益緊張,連中國教育部都喊出「彈性學制」,不但允許在校生休學創業,還呼籲校方給予各項協助與指導。但教育部官員也承認,就業市場明年的宏觀壓力不減,中國社會對於大學生創業的成效也多所爭議。在就業市場日益擁擠的中國,「讀大學究竟何用」,成了最近廣為討論的話題... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 爭取香港特首真普選的佔領運動今天(11日)進入第75天,港府一早就在特區政府所在的金鐘部署大批警力,預計將在一天之內清場完畢。香港政府總部與立法會今天暫停開放,港府呼籲佔領者主動撤離,警方將嚴正執法。現場雖聚集許多民眾靜坐抗議,直至上午11時為止,清場過程並未發生衝突。 +跨境全日通公司的清場代理人正在拆除路障。(熱血時報) +這次清場的禁制令,是由香港冠中巴士... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 美國聯邦參議院日前通過《2014年軍艦移轉法案》,授權美國總統歐巴馬對台出售4艘已經除役的派里級巡防艦(Oliver Hazard Perry class frigate),一般預料歐巴馬最晚將在明年初批准該案。中國媒體日前報導此事,認為是「台灣買老爺艦,錢多人傻」,還有軍事專家認為派里級噸位較小,就算想要改裝先進裝備也困難重重。 +《錢江晚報》形容,台灣海軍... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 在中國具有指標性意義的反腐案—劉鐵男受賄案,10日上午在河北廊坊中院宣判。國家發改委前副主任、國家能源局前局長劉鐵男在一審被宣判無期徒刑、剝奪政治權利終身。劉鐵男被指控於2002至2012年間利用職務便利謀取利益,收受財物共計價值人民幣3558萬餘元(約1.79億台幣),所有犯罪所得也被法院追繳。 +河北廊坊中院的微博以文字方式直播判決。 +有「小國務院」之稱的... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 香港冠中巴士旗下的跨境全日通公司,8日獲法庭對金鐘佔領區臨時禁制令蓋印同意後,隨即與警方及執達主任(執行官)討論執行禁制令相關細節,雙方決定在11日(四)早上9點進行清場,冠中巴士總裁黃焯安指出,會參考過去作法,派遣30至50名配戴工作證員工協助清場。特首梁振英也表明,將以「最低武力」清理障礙物。 +9日,金鐘道上張貼臨時禁制令。(美聯社) +根據金鐘佔領區的臨... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 如今轉做紅酒商人,但過去具有香港皇家警察、黑道幫會、武打演員多重背景的香港演員陳惠敏,日前接受中國電視節目《老友記》專訪,他除了直言自己確實是著名幫會14K的「双花紅棍」,更說現在他都「勸人不要加入黑社會」,因為「現在回歸祖國了,你講什麼黑社會呢?」「現在香港的幫會,也是愛國的,也是聽國家的命令的。」一定程度透露了現在香港黑社會與國家機器的共處心態。 +陳惠敏... +
                        +
                        +
                        +
                      • + + + + + + + +
                      • +
                        +
                        + +
                        + + + + + 「打倒孔家店」在文革時期,曾被紅衛兵們喊的震天價響,但曾幾何時,孔子已經成了中國「軟實力」的象徵。12月7日起一連兩天,第九屆全球孔子學院大會在廈門盛大舉行,中國國務院副總理、孔子學院總部理事會主席劉延東也出席慶祝孔子學院創辦十週年。不過美國眾院的人權事務小組主席史密斯日前要求責任署,調查孔子學院是否威脅美國的學術自由。孔子學院這間現代的「孔家店」,也成了硝... +
                        +
                        +
                        +
                      • + + +
                      + + + + + + +
                      + + + + + + + + + + + + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 + + 9 + + + + 下一頁 + 最末頁 + +
                      + + +
                      + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + +
                      +
                      +
                      + + + + +
                      + + + + + + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +

                      Copyright © 2014 Storm Media Group All Rights Reserved.

                      +
                      +
                      +
                      + + + + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/StormMediaGroup/data/listing.json b/tests/models/Crawler/StormMediaGroup/data/listing.json new file mode 100644 index 0000000..bbbc269 --- /dev/null +++ b/tests/models/Crawler/StormMediaGroup/data/listing.json @@ -0,0 +1,42 @@ +[ + "http://www.stormmediagroup.com/opencms/news/detail/048c71d1-8268-11e4-b7fe-ef2804cba5a1/?uuid=048c71d1-8268-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/08e3a109-828e-11e4-b7fe-ef2804cba5a1/?uuid=08e3a109-828e-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/0a8a3a5a-8108-11e4-b7fe-ef2804cba5a1/?uuid=0a8a3a5a-8108-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/14d496fc-826d-11e4-b7fe-ef2804cba5a1/?uuid=14d496fc-826d-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/1d23b581-81e9-11e4-b7fe-ef2804cba5a1/?uuid=1d23b581-81e9-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/26203769-81d5-11e4-b7fe-ef2804cba5a1/?uuid=26203769-81d5-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/282a1393-81b4-11e4-b7fe-ef2804cba5a1/?uuid=282a1393-81b4-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/29dac266-811b-11e4-b7fe-ef2804cba5a1/?uuid=29dac266-811b-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/2aa8f0e8-81f6-11e4-b7fe-ef2804cba5a1/?uuid=2aa8f0e8-81f6-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/2bb546d7-8010-11e4-b7fe-ef2804cba5a1/?uuid=2bb546d7-8010-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/38583a72-81fe-11e4-b7fe-ef2804cba5a1/?uuid=38583a72-81fe-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/3a26a7ed-813c-11e4-b7fe-ef2804cba5a1/?uuid=3a26a7ed-813c-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/3b96015c-81ce-11e4-b7fe-ef2804cba5a1/?uuid=3b96015c-81ce-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/4cd5bcda-7f73-11e4-b7fe-ef2804cba5a1/?uuid=4cd5bcda-7f73-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/4cf70dce-81f4-11e4-b7fe-ef2804cba5a1/?uuid=4cf70dce-81f4-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/5c6bd029-8288-11e4-b7fe-ef2804cba5a1/?uuid=5c6bd029-8288-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/5ea43bcf-827a-11e4-b7fe-ef2804cba5a1/?uuid=5ea43bcf-827a-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/63039112-829a-11e4-b7fe-ef2804cba5a1/?uuid=63039112-829a-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/641af353-82a5-11e4-b7fe-ef2804cba5a1/?uuid=641af353-82a5-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/6499600d-81ee-11e4-b7fe-ef2804cba5a1/?uuid=6499600d-81ee-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/6501da8c-7f7c-11e4-b7fe-ef2804cba5a1/?uuid=6501da8c-7f7c-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/754a6c71-8200-11e4-b7fe-ef2804cba5a1/?uuid=754a6c71-8200-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/7dab0d05-81ab-11e4-b7fe-ef2804cba5a1/?uuid=7dab0d05-81ab-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/7e40c4b1-81f2-11e4-b7fe-ef2804cba5a1/?uuid=7e40c4b1-81f2-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/7fd5aa5c-8293-11e4-b7fe-ef2804cba5a1/?uuid=7fd5aa5c-8293-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/843bc628-8203-11e4-b7fe-ef2804cba5a1/?uuid=843bc628-8203-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/9c815502-81b6-11e4-b7fe-ef2804cba5a1/?uuid=9c815502-81b6-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/a3cf00e1-827e-11e4-b7fe-ef2804cba5a1/?uuid=a3cf00e1-827e-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/b5aa131b-8048-11e4-b7fe-ef2804cba5a1/?uuid=b5aa131b-8048-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/b9f5db5e-8296-11e4-b7fe-ef2804cba5a1/?uuid=b9f5db5e-8296-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/c2845cdd-8201-11e4-b7fe-ef2804cba5a1/?uuid=c2845cdd-8201-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/c2c9b09c-7f95-11e4-b7fe-ef2804cba5a1/?uuid=c2c9b09c-7f95-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/c59733b0-8207-11e4-b7fe-ef2804cba5a1/?uuid=c59733b0-8207-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/d6862a4e-819e-11e4-b7fe-ef2804cba5a1/?uuid=d6862a4e-819e-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/dbada2fd-80f5-11e4-b7fe-ef2804cba5a1/?uuid=dbada2fd-80f5-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/df6619ea-81ed-11e4-b7fe-ef2804cba5a1/?uuid=df6619ea-81ed-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/e2132a45-80da-11e4-b7fe-ef2804cba5a1/?uuid=e2132a45-80da-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/e423d711-81e7-11e4-b7fe-ef2804cba5a1/?uuid=e423d711-81e7-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/fbcec05f-80ee-11e4-b7fe-ef2804cba5a1/?uuid=fbcec05f-80ee-11e4-b7fe-ef2804cba5a1", + "http://www.stormmediagroup.com/opencms/news/detail/fc6131e1-81b1-11e4-b7fe-ef2804cba5a1/?uuid=fc6131e1-81b1-11e4-b7fe-ef2804cba5a1" +] \ No newline at end of file diff --git a/tests/models/Crawler/TTV/Crawl.test b/tests/models/Crawler/TTV/Crawl.test new file mode 100644 index 0000000..e62c0e2 --- /dev/null +++ b/tests/models/Crawler/TTV/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_TTV::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_TTV::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/TTV/Parse.test b/tests/models/Crawler/TTV/Parse.test new file mode 100644 index 0000000..9af38c5 --- /dev/null +++ b/tests/models/Crawler/TTV/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_TTV::parse (10312120017000I.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/10312120017000I.html'); + $result = Crawler_TTV::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/10312120017000I.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/TTV/data/10312120017000I.html b/tests/models/Crawler/TTV/data/10312120017000I.html new file mode 100644 index 0000000..c927c54 --- /dev/null +++ b/tests/models/Crawler/TTV/data/10312120017000I.html @@ -0,0 +1,1388 @@ + + + + + + + + +~ץ1.38 r}!޷~̰30Ӥ@̴H T~[X - xsD + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + + + +
                      +
                      + + + + +
                      +
                      + ttv logo x  + tv ` xsD xsD  + TַsD TַsD  + x]g x]g  + sDJ sDJ  + RSS RSS  +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      + + +
                      + +
                      + + + +
                      + + +
                      +
                      +
                      +
                      +
                      + +
                      +
                      ~ץ1.38 r}!޷~̰30Ӥ@̴H T~[X@~פh~h1.8 ӧC54%¾
                      +
                      +
                      +
                      + 2014/12/12  + + +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      + +
                      + + + +
                      + +
                      +
                      + +
                      F~zw~iHh֦~שOHND¾լdA~ꤺ~o񪺦~׼O1.38ӤACӤH_h~٦hF1.8ѡAj2200AƦ٦޷~A~[`@30Ӥ몺W֧QAݰ_ӴG񩹦~CӬFEyuA]WL3AA@NW[wФj@HtA@تC
                      +
                      +
                      Apt̴HAѡBnnªPBM̪Lܬ_A󳣧ƱxP֡AEyuCHA]qܹ{otuۤvDAND¾լdA~WL~nA󦳢W[w⻨إ[XCt~󦳬ޤq]dzƵoXӤ몺~סAuCݦ𦨪Aꤺ~׽լdACӤH쪺~פjCӤATh~٦hFCѡAjLpɡAuL~pPA~תݹJ]jۦPC_֦~תķ|p~B޷~BB~AN|HzSApG~׼w٭n֡AN|Ҽ{¾C~סAWZڪ߱ݤSȨˮ`AuƱӤj]ﱵ}ߪﱵs~ӡC
                      +
                      +
                      + + DDG#~  #  #u  #  #~  #޷~  #H  #t +
                      +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                      + + +
                      +
                      + +
                      +
                      + +
                      + + + + + + + + +
                      +
                      +
                      +
                      +
                      +
                      + +
                      + + +
                      +
                      i~ץ1.38 r}!޷~̰30Ӥ@̴H T~[X@~פh~h1.8 ӧC54%¾j
                      +
                      + +
                      + +
                      Top Of Page
                      +
                      +
                      + +
                      + +
                      + + + +
                      +
                      + + +
                      +
                      +
                      +
                      + + +
                      + + +
                      +
                      + +

                      r

                      +

                      +
                      +
                      + + +
                      +
                      + +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + +
                      +
                      + xx + xx` + xxsD + xx]g + x + x + x      +
                      +
                      +
                      OWqƷ~ѥq vҦ  © 2010-  Taiwan Television Enterprise, Ltd. All Rights Reserved.
                      +
                      x_KwTq10@`G(02)2775-8888@ȪAMuG0800-058-886
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + +^쳻 + + + + + + + + + + diff --git a/tests/models/Crawler/TTV/data/10312120017000I.json b/tests/models/Crawler/TTV/data/10312120017000I.json new file mode 100644 index 0000000..ec747fa --- /dev/null +++ b/tests/models/Crawler/TTV/data/10312120017000I.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/tests/models/Crawler/TTV/data/README.md b/tests/models/Crawler/TTV/data/README.md new file mode 100644 index 0000000..adc4dde --- /dev/null +++ b/tests/models/Crawler/TTV/data/README.md @@ -0,0 +1,14 @@ +TTV data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `10312120017000I.html` + From: http://www.ttv.com.tw/103/12/1031212/10312120017000I.htm \ No newline at end of file diff --git a/tests/models/Crawler/TTV/data/listing.html b/tests/models/Crawler/TTV/data/listing.html new file mode 100644 index 0000000..cebf4f6 --- /dev/null +++ b/tests/models/Crawler/TTV/data/listing.html @@ -0,0 +1,1901 @@ + + + + + + + + + + + +xsD + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + + + +
                      +
                      + + + + +
                      +
                      + ttv logo x  + tv ` xsD xsD  + TַsD TַsD  + x]g x]g  + sDJ sDJ  + RSS RSS  +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      + + +
                      + +
                      + + +
                      +
                      + +
                      +
                      + +
                      +
                      +
                      üOI dĵϮ]k@R
                      +
                      +
                      üOI dĵϮ]k@R
                      +
                      pkæOyo¡AݷݥDUĵA~QϦ^kͩR!s_M@s⪨AXͤ@Ӧh ..
                      +
                      +
                      +
                      + +
                      +
                      +
                      m! ŤMH HliEǮK
                      +
                      +
                      m! ŤMH HliEǮK
                      +
                      F@ӰzAMŤMHAHgޡIƤ@WfqAfؤu~Ϥ@AɥnfA ..
                      +
                      +
                      +
                      + +
                      +
                      +
                      O~Nnij Dk|^
                      +
                      +
                      O~Nnij Dk|^
                      +
                      e`γnЫO~NAV|XnijADXijx^C|{e`ΡALAnЫO~NSLApP ..
                      +
                      +
                      +
                      + +
                      +
                      +
                      eժiЫ F! TkY
                      +
                      +
                      eժiЫ F! TkY
                      +
                      n뿤Wȵo;ǥͼYӷN~A_sꤤ@W\mTkǥ͡AWȦ]աAնo{YKۡAҥHQ ..
                      +
                      +
                      +
                      + +
                      +
                      +
                      vhXt? gH:uOQ
                      +
                      +
                      vhXt? gH:uOQ
                      +
                      vnDi򩵿NAUȶǥX̷sANOLYNnhXtALgHߨ_{okALvu ..
                      +
                      +
                      +
                      + +
                      +
                      + +
                      + +
                      +
                      + + +
                      +
                      + +
                      x_wֳtDo19slN~!@O ..
                      +
                      +
                      + + +
                      +
                      + +
                      ӶkBwAQgZzưAƫozLy ..
                      +
                      +
                      + + +
                      +
                      + +
                      {bOauAnpߡApBͤdUOYLqA_ ..
                      +
                      +
                      + +
                      + +
                      + +
                      + + + +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      + +
                      +
                      + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + +
                      +
                      +
                      + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +
                      + + +    + + W@ + U@ + +
                      +
                      +
                      +
                      v
                      +
                      +
                      + +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      v
                      +
                      + +
                      x_wֳtDo19slN~!@OUbUɡAæ٨Fle訮AODӤjVes ..
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      + +
                      + + +
                      @g
                      +
                      +
                      + + +
                      + + + + + + + + + + + + + + + +
                      + + +
                      +
                      + +
                      + + +
                      + + +
                      H
                      +
                      +
                      + + +
                      + + + + + + + + + + + + + + + +
                      + + +
                      +
                      + +
                      + + + +
                      + +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +
                      + + +    + + W@ + U@ + +
                      +
                      +
                      + +
                      +
                      + +
                      +
                      + + +
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      +
                      v width=
                      +
                      + +
                      + +
                      + +
                      +
                      + +
                      + +
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      v
                      +
                      + +
                      DaƲzӫYHѴNazӫ~oaAϥΤjqX_qAftW¾VBT +nwaHίSsChơAA[Wܥɦ̤AhhfPj ..
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      + +
                      +
                      + + + + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + +
                      +
                      +
                      v
                      +
                      + +
                      + + + + + + + + + + +
                      +
                      +
                      + + +
                      +
                      +
                      + +
                      + + +
                      +
                      +
                      +
                      +
                      + + +    + + W@ + U@ + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      + + + + + + + +
                      + +
                      +
                      + +
                      xWYt~ӤwgͦAkkѤ֡A׬OxWHΪ̬O~HAiWYtзNBHAHڭ̻{bYtAOzձڸsQͬOLHA{b] ..
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      +
                      + +
                      + +
                      + +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                      + + + + + + + +
                      + +
                      + + + + + + +
                      + + + +
                      +
                      + +
                      + + + + + + + +
                      + + +
                      +
                      +
                      +
                      +
                      sDJ
                      + +
                      +
                      + +
                      +
                      + +
                      + + +
                      + +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      + +
                      +
                      + +
                      +
                      sDXG +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      + + +
                      +
                      + +
                      + +
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      + Lqp + LaX + ੳͶ + it + + + _ + έ + | + + + + + + + + + +
                      +
                      + +
                      + + + + + + + +
                      + + +
                      + + +
                      +
                      +
                      + +
                      + +
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      +
                      + +
                      + + + + + + + +
                      + +
                      +
                      + + +
                      +
                      +
                      +
                      + + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +
                      _
                      +
                      + h +
                      +
                      +
                      +
                      + hɴ +
                      +
                      +
                      n
                      +
                      + h +
                      +
                      +
                      F
                      +
                      + hɳuȫB +
                      +
                      +
                      + + 14J + +
                      +
                      +
                      + + 16J + +
                      +
                      +
                      + + 19J + +
                      +
                      +
                      + + 16J + +
                      +
                      +
                      + +
                      + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + + +
                      +
                      + xx + xx` + xxsD + xx]g + x + x + x      +
                      +
                      +
                      OWqƷ~ѥq vҦ  © 2010-  Taiwan Television Enterprise, Ltd. All Rights Reserved.
                      +
                      x_KwTq10@`G(02)2775-8888@ȪAMuG0800-058-886
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/TTV/data/listing.json b/tests/models/Crawler/TTV/data/listing.json new file mode 100644 index 0000000..208e5fc --- /dev/null +++ b/tests/models/Crawler/TTV/data/listing.json @@ -0,0 +1,133 @@ +[ + "http://www.ttv.com.tw/103/11/1031118/103111800081002.htm", + "http://www.ttv.com.tw/103/11/1031119/10311190012800A.htm", + "http://www.ttv.com.tw/103/11/1031124/10311240025700V.htm", + "http://www.ttv.com.tw/103/11/1031125/103112500019001.htm", + "http://www.ttv.com.tw/103/11/1031125/103112500061002.htm", + "http://www.ttv.com.tw/103/11/1031126/103112600043002.htm", + "http://www.ttv.com.tw/103/11/1031127/103112700061002.htm", + "http://www.ttv.com.tw/103/11/1031127/10311270015900A.htm", + "http://www.ttv.com.tw/103/12/1031201/103120100061002.htm", + "http://www.ttv.com.tw/103/12/1031201/103120100070002.htm", + "http://www.ttv.com.tw/103/12/1031201/10312010012800A.htm", + "http://www.ttv.com.tw/103/12/1031204/103120400039001.htm", + "http://www.ttv.com.tw/103/12/1031204/103120400040001.htm", + "http://www.ttv.com.tw/103/12/1031204/103120400076002.htm", + "http://www.ttv.com.tw/103/12/1031204/10312040016800I.htm", + "http://www.ttv.com.tw/103/12/1031204/10312040018900I.htm", + "http://www.ttv.com.tw/103/12/1031204/10312040028200H.htm", + "http://www.ttv.com.tw/103/12/1031205/10312050017300I.htm", + "http://www.ttv.com.tw/103/12/1031207/10312070004200L.htm", + "http://www.ttv.com.tw/103/12/1031208/103120800007001.htm", + "http://www.ttv.com.tw/103/12/1031208/103120800038001.htm", + "http://www.ttv.com.tw/103/12/1031208/103120800065002.htm", + "http://www.ttv.com.tw/103/12/1031208/103120800107005.htm", + "http://www.ttv.com.tw/103/12/1031208/10312080018900I.htm", + "http://www.ttv.com.tw/103/12/1031208/10312080031900L.htm", + "http://www.ttv.com.tw/103/12/1031208/10312080032100L.htm", + "http://www.ttv.com.tw/103/12/1031208/10312080032300L.htm", + "http://www.ttv.com.tw/103/12/1031209/103120900013001.htm", + "http://www.ttv.com.tw/103/12/1031209/103120900052002.htm", + "http://www.ttv.com.tw/103/12/1031209/103120900058002.htm", + "http://www.ttv.com.tw/103/12/1031209/103120900111005.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090017400I.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090020700V.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090028500H.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090031100L.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090031700L.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090032500L.htm", + "http://www.ttv.com.tw/103/12/1031209/10312090032700L.htm", + "http://www.ttv.com.tw/103/12/1031210/103121000064002.htm", + "http://www.ttv.com.tw/103/12/1031210/103121000074002.htm", + "http://www.ttv.com.tw/103/12/1031210/103121000088005.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100014800I.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100015300I.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100016300I.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100016900I.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100018000V.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100023700V.htm", + "http://www.ttv.com.tw/103/12/1031210/10312100027800L.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100017001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100023001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100027001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100029001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100030001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100034001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100037001.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100062002.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100070002.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100073002.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100082002.htm", + "http://www.ttv.com.tw/103/12/1031211/103121100092005.htm", + "http://www.ttv.com.tw/103/12/1031211/10312110015100I.htm", + "http://www.ttv.com.tw/103/12/1031211/10312110029400L.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200022001.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200050002.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200060002.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200062002.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200063002.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200065002.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200092005.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200095005.htm", + "http://www.ttv.com.tw/103/12/1031212/103121200122005.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120013800A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120014100A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120014400A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120015000A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120015200A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120015900A.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120016200I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120016400I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120016500I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017000I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017100I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017200I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017300I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017400I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017500I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120017600I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018400I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018500I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018600I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018700I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018800I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120018900I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120019000I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120019100I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120019200I.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120019900V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120021900V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120022600V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120022900V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120024300V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120025800V.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120026800H.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120029600L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120030000L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120030100L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120030400L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120030700L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031100L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031400L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031500L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031700L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031800L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120031900L.htm", + "http://www.ttv.com.tw/103/12/1031212/10312120032200L.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000100I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000300I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000400I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000500I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000600I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000700I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000800I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130000900I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001100I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001200I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001400I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001500I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001600I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001700I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001800I.htm", + "http://www.ttv.com.tw/103/12/1031213/10312130001900I.htm" +] \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/Crawl.test b/tests/models/Crawler/TVBS/Crawl.test new file mode 100644 index 0000000..0fee01b --- /dev/null +++ b/tests/models/Crawler/TVBS/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_TVBS::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_TVBS::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/Parse.test b/tests/models/Crawler/TVBS/Parse.test new file mode 100644 index 0000000..ccb2c09 --- /dev/null +++ b/tests/models/Crawler/TVBS/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_TVBS::parse (556732.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/556732.html'); + $result = Crawler_TVBS::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/556732.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/data/556732.html b/tests/models/Crawler/TVBS/data/556732.html new file mode 100644 index 0000000..36ca7f7 --- /dev/null +++ b/tests/models/Crawler/TVBS/data/556732.html @@ -0,0 +1,1839 @@ + + + + + + + + + + + + ​《食尚玩家》前進南美印加帝國-秘魯五部曲 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +
                      + +
                      +
                      + +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      + TVBS 新聞 >  + + + 旅遊玩家 + +  >  + ​《食尚玩家》前進南美印加帝國-秘魯五部曲 + +
                      +
                      +
                      +

                      ​《食尚玩家》前進南美印加帝國-秘魯五部曲

                      + +
                      + + + + + +
                      +
                      +
                      +
                      2014年10月份食尚玩家出訪南美最具神秘性且兼具文化性的秘魯,由第一天團浩角翔起擔任隨行節目主持人帶著大家揭開這個南美國度的神秘面紗。 +
                        +
                      噗嚨共團隊將會帶領大家參訪秘魯耳熟能詳的世界遺產及古都文物還有大家最期待的美食。首先抵達的是有王者之城美名的首都利馬,這個兼具現代化及古文明的大城市有著名的大主教教堂、巴洛克式建築的San Franscico教堂及神秘人骨教堂;再來、會參訪一個至今謎團未解的Nazca Line,七百多幅的幾何圖案所形成的奇景,緊接著天團會帶著大家一窺冒險性十足的亞馬遜雨林,深入原始部落體驗當地生活,大啖食人魚及打獵。 +
                        +
                      而此行最重要的景點就是天空之城”馬丘比丘”,這個神秘古城兼具神壇、宮殿、梯園等精巧的石頭建築還有完善的溝渠灌溉系統,鬼斧神工般的出現在2400公尺的高山上,還有位於海拔3500公尺在1983年被聯合國教科文組織選為世界遺產的古印加帝國首都庫斯科,大教堂的肅穆讓整個城市佈滿古印加帝國的遺跡。最後,我們來到世界上最高的高山淡水湖泊-的的喀喀湖,偌大清澈且湛藍,湖中更有當地人以蘆葦草建的蘆葦島及蘆葦船,居民過著與世無爭的生活,此般曠世美景猶如仙境。 +
                        +
                      美食、絕對是物產富饒秘魯的一大特色,特有的Cuy (天竺鼠),其軟嫩如雞肉的口感,保證讓你品嚐後永生難忘!還有傳統美食Causa,是一道非常開胃的馬鈴薯輕食料理。當然不可忘了最知名的Ceviche (檸檬醃生魚),以生魚和煮熟的海鮮及鮮蔬並加上生洋蔥灑上辣椒粉(Aji Pepper),搭配安地斯山種的大玉米粒(Choclo),那種微酸帶鮮甜海鮮的口感是你無法忘記的的美味。在秘魯,有著數千種以上的馬鈴薯和玉米種類,其中用紫玉米所熬煮出來的紫玉米汁(Chicha morada)是當地人的國民飲料,色澤鮮豔且口感清醇一定要去喝上一杯。而Pisco、它是秘魯最引以為傲的國酒,其特有溫和醇厚且不嗆辣口感散發淡淡的花果香;而以Pisco為基底的雞尾酒Pisco sour更是一絕,讓陳厚的Pisco更顯清爽活潑。 +
                        +
                      為讓大家領略秘魯文化之美還有美食的豐富層次,秘魯駐台北商務辦事處特地與TVBS食尚玩家團隊合作,藉由食尚玩家精緻的呈現,讓觀眾更加認識這神祕的國家。國人前往秘魯觀光是免簽證,也希望大家多加利用。相關精彩的節目內容分成5集將於12月的每周二晚上10:00播出,為答謝觀眾們的支持及對秘魯的喜愛,於每集播出後舉辦”看節目抽大獎”活動,獎品包括秘魯手工藝品,浩角翔起親筆簽名的紀念品,電影票等,詳情請參考食尚玩家及秘魯駐台辦事處臉書。 +
                      +
                      ◎照片來源:PROMPERU +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                      +
                      + +
                      +
                      + + + + +
                      +

                      最近修改:2014-12-02 14:44:21

                      +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      +
                      + + + +
                      + +
                      +
                      + + +
                      + + + + + + +
                      +
                      + + + + + +
                      +
                      + +
                      +

                      + +
                      + + + + + + + + + + + diff --git a/tests/models/Crawler/TVBS/data/556732.json b/tests/models/Crawler/TVBS/data/556732.json new file mode 100644 index 0000000..025cd20 --- /dev/null +++ b/tests/models/Crawler/TVBS/data/556732.json @@ -0,0 +1,4 @@ +{ + "title": "​《食尚玩家》前進南美印加帝國-秘魯五部曲", + "body": "/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/20141202130728326.jpg_l\n\n\n\n\n 2014年10月份食尚玩家出訪南美最具神秘性且兼具文化性的秘魯,由第一天團浩角翔起擔任隨行節目主持人帶著大家揭開這個南美國度的神秘面紗。\n \n  \n \n 噗嚨共團隊將會帶領大家參訪秘魯耳熟能詳的世界遺產及古都文物還有大家最期待的美食。首先抵達的是有王者之城美名的首都利馬,這個兼具現代化及古文明的大城市有著名的大主教教堂、巴洛克式建築的San Franscico教堂及神秘人骨教堂;再來、會參訪一個至今謎團未解的Nazca Line,七百多幅的幾何圖案所形成的奇景,緊接著天團會帶著大家一窺冒險性十足的亞馬遜雨林,深入原始部落體驗當地生活,大啖食人魚及打獵。\n \n  \n \n 而此行最重要的景點就是天空之城”馬丘比丘”,這個神秘古城兼具神壇、宮殿、梯園等精巧的石頭建築還有完善的溝渠灌溉系統,鬼斧神工般的出現在2400公尺的高山上,還有位於海拔3500公尺在1983年被聯合國教科文組織選為世界遺產的古印加帝國首都庫斯科,大教堂的肅穆讓整個城市佈滿古印加帝國的遺跡。最後,我們來到世界上最高的高山淡水湖泊-的的喀喀湖,偌大清澈且湛藍,湖中更有當地人以蘆葦草建的蘆葦島及蘆葦船,居民過著與世無爭的生活,此般曠世美景猶如仙境。\n \n  \n \n 美食、絕對是物產富饒秘魯的一大特色,特有的Cuy (天竺鼠),其軟嫩如雞肉的口感,保證讓你品嚐後永生難忘!還有傳統美食Causa,是一道非常開胃的馬鈴薯輕食料理。當然不可忘了最知名的Ceviche (檸檬醃生魚),以生魚和煮熟的海鮮及鮮蔬並加上生洋蔥灑上辣椒粉(Aji Pepper),搭配安地斯山種的大玉米粒(Choclo),那種微酸帶鮮甜海鮮的口感是你無法忘記的的美味。在秘魯,有著數千種以上的馬鈴薯和玉米種類,其中用紫玉米所熬煮出來的紫玉米汁(Chicha morada)是當地人的國民飲料,色澤鮮豔且口感清醇一定要去喝上一杯。而Pisco、它是秘魯最引以為傲的國酒,其特有溫和醇厚且不嗆辣口感散發淡淡的花果香;而以Pisco為基底的雞尾酒Pisco sour更是一絕,讓陳厚的Pisco更顯清爽活潑。\n \n  \n \n 為讓大家領略秘魯文化之美還有美食的豐富層次,秘魯駐台北商務辦事處特地與TVBS食尚玩家團隊合作,藉由食尚玩家精緻的呈現,讓觀眾更加認識這神祕的國家。國人前往秘魯觀光是免簽證,也希望大家多加利用。相關精彩的節目內容分成5集將於12月的每周二晚上10:00播出,為答謝觀眾們的支持及對秘魯的喜愛,於每集播出後舉辦”看節目抽大獎”活動,獎品包括秘魯手工藝品,浩角翔起親筆簽名的紀念品,電影票等,詳情請參考食尚玩家及秘魯駐台辦事處臉書。\n \n\n ◎照片來源:PROMPERU\n \n\n/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/20141202130736939.jpg_l\n\n\n/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/20141202130653425.jpg_l\n\n\n/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/2014120213072112.jpg_l\n\n\n/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/20141202130742543.jpg_l\n\n\n/static/forum_attachment/img/FILE_DB/newsphoto/brave80912@tvbs.com.tw/201412/20141202130705356.jpg_l\n" +} \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/data/README.md b/tests/models/Crawler/TVBS/data/README.md new file mode 100644 index 0000000..de67e20 --- /dev/null +++ b/tests/models/Crawler/TVBS/data/README.md @@ -0,0 +1,14 @@ +TVBS data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `556732.html` + From: http://news.tvbs.com.tw/entry/556732 \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/data/listing.html b/tests/models/Crawler/TVBS/data/listing.html new file mode 100644 index 0000000..c4bd918 --- /dev/null +++ b/tests/models/Crawler/TVBS/data/listing.html @@ -0,0 +1,1561 @@ + + + + + + + + + + + + + + TVBS新聞_每日新聞 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      +
                      + +
                      +
                      + +
                      +
                      +
                      +
                      + + + + + + + + + + + + + + +
                      +
                      +

                      TVBS 新聞 > 每日新聞

                      +
                      + + + + + + + + + + + + + + + + + + +
                      + 上個月   + 2014 年 12 月   + 下個月 +
                      + + 12/10
                      + 星期三 +
                      + + 12/11
                      + 星期四 +
                      + + 12/12
                      + 星期五 +
                      + 12/13
                      + 星期六 +
                                               + 今日最新 +
                      +
                      +
                      +
                        +
                      • + +
                        ​​UBA/UBA女籃劉懿文破繭而出 「雙十」加4助攻北市大博愛首勝 
                        +
                        +

                        103學年度UBA大專籃賽11日公開女一級預賽,上季第四台北市大博愛校區(北市教大)84:78擊敗台北大學,大驚奇是179公分大四中鋒劉懿文破繭而出,14投中9攻下21分、12籃板「雙十」外帶4助攻,3項都生涯新高,打出個人代表作,搭配隊友...詳全文

                        +
                        +
                      • +
                      • + +
                        天冷買氣熱! 露營「人形睡袋」銷量增3倍 
                        +
                        +

                        這波天冷下雨的天氣,也帶動一些保暖防雨的商品熱賣,像是露營時使用的「人形睡袋」,銷量就暴增兩、三倍,還有具有環保概念的「馬鈴薯雨衣」,也搭上這幾天陰雨天,買氣增加好幾成...詳全文

                        +
                        +
                      • +
                      • + +
                        政治感覺太遙遠 日年輕人「政治冷感」 
                        +
                        +

                        ▲(圖:達志影像/美聯社)這個禮拜天,日本就要舉行眾議院大選投開票,不過選前民調卻顯示,這次的投票率有可能改寫史上新低,原來日本的年輕公民,普遍覺得世襲政治離自己太遙遠,加上空洞的選舉口號,和超強寒流來襲,都讓這次的眾議院選舉的投票,難以勾...詳全文

                        +
                        +
                      • +
                      • + +
                        ​超萌貓界花美男 睡著後…形象一秒崩壞! 
                        +
                        +

                        (網路新聞中心/何文君)毛小孩可愛的模樣總是能融化大家的心,當牠們睡著的時候,更是主人心中的小天使!但這隻最近在網路爆紅的貓咪,牠睡著的時候,會讓你對天使的形象徹底失望...詳全文

                        +
                        +
                      • +
                      • + +
                        泰王室家變!王儲妃被逐 失皇族身份 
                        +
                        +

                        ▲(圖:達志影像/美聯社)泰國王室鬧家變,平民出身的泰國王妃西拉斯美,喪失所有皇室身份和頭銜,導火線是因為王妃娘家親戚多人涉嫌貪腐,傷害王室形象,泰國王儲乾脆把老婆趕出皇家,來個徹底切割...詳全文

                        +
                        +
                      • +
                      • + +
                        ​UBA/文化女籃身高平均179.25成UBA之最 開幕戰贏60分 
                        +
                        +

                        103學年度UBA大專籃賽公開女一級預賽11日在台科大體育館登場,開幕戰文化對實踐,文化就排出UBA女籃81學年上路(男籃76學年先開打),迄今23個球季來最高的天龍陣,12名登錄球員8人身高180或更高,平均179.25公分,史上單一球隊...詳全文

                        +
                        +
                      • +
                      • + +
                        兄弟要跑路費 專挑補習班、幼園電話恐嚇 
                        +
                        +

                        現在有歹徒專挑補習班、幼兒園這種小朋友多的地方,打電話向業者恐嚇!在高雄這三個月來,就有六間補習班接到威脅電話,對方都表示兄弟要跑路費,開口從30萬到60萬不等,如果不給錢,就要對補習班不利,目前為止,雖然沒有傳出有補習班因此受害,警方猜測...詳全文

                        +
                        +
                      • +
                      • + +
                        一日船長!民眾玩閒置船 體驗當討海人 
                        +
                        +

                        現在體驗風盛行,宜蘭就有閒置漁船開放讓民眾當「一日船長」!之前出海的漁船現在停靠港邊,民眾不僅可以模擬開船,裡頭還可以現場煮菜,品嘗鮮魚湯和古早風味的「船仔飯」,讓民眾體驗討海人在船上的食衣住行...詳全文

                        +
                        +
                      • +
                      • + +
                        湖人險勝馬刺 Kobe破喬丹紀錄再等等 
                        +
                        +

                        ▲(圖:達志影像/路透社)今天NBA洛杉磯湖人隊,客場迎戰馬刺隊,雙方鏖戰到延長賽,湖人兩分險勝。可惜湖人一哥Kobe Bryant,單場只拿下22分,要超越籃球之神喬丹的生涯總得分,還要再等等。至於林書豪和楊恩,兩個替補小將立大功,合力攻...詳全文

                        +
                        +
                      • +
                      • + +
                        強力寒流南下中 名古屋、福岡可能降雪 
                        +
                        +

                        ▲(圖:達志影像/美聯社)日本又遇到「週末大雪」來襲!日本氣象廳發出警告,因為「強力寒流」南下,這個週末包括日本海沿岸以及西日本的太平洋沿岸,有可能出現積雪的災情,日本第三大城名古屋和九州的福岡,都有機會在禮拜天,降下入冬後的第一場雪...詳全文

                        +
                        +
                      • +
                      • + +
                        RM見面會門票秒殺! 粉絲搶嘸前排搖滾區 
                        +
                        +

                        韓國超人氣綜藝Running Man,五位主持人將在明年1月到台灣辦見面會,讓粉絲期待瘋狂搶票,見面會門票13日中午12點開賣,有粉絲11日就來排隊,主辦單位也更改遊戲規則,從一個人限購8張改成4張,粉絲分頭進行搶票,只希望能多一份搶到票的...詳全文

                        +
                        +
                      • +
                      • + +
                        AKB48團員站台 台中資訊月爆高潮 
                        +
                        +

                        2014台中資訊月開跑,剛好碰到展期的第一個週末,雖然天氣寒冷,卻有上千民眾頂著寒風到現場搶便宜,知名相機大廠,還特地邀請日本超人氣女子團體AKB48的前團員片山陽加,來到現場與民眾同樂,而知名筆電大廠也推出電競筆電,一台便宜1萬元...詳全文

                        +
                        +
                      • +
                      • + +
                        嘜走!男酒駕肇逃 刑警所長追200公尺逮 
                        +
                        +

                        在警察局門口前出車禍,還敢落跑!新北市一名徐姓男子,11日晚間10點多,開車行經竹林路,他為了超車,開到對向車道,卻撞上一名機車騎士,非但沒有下車察看還上演落跑記,當時正要上班的刑警,目睹這一切,馬上追上去,另一名秀朗所所長也馬上開車支援,...詳全文

                        +
                        +
                      • +
                      • + +
                        父訪友搭車走失! 家屬做海報、找VCR尋人 
                        +
                        +

                        只要再多問幾句,也許余姓男子就不會凍死街頭!家屬說,自從父親中風後,就有失智情況,曾經也搭捷運在淡水和南港迷路,當時,處理的員警都有聯絡家屬,這次男子失蹤後隔天,他們除了報案,還查詢死者的捷運卡搭車紀錄,拿著自製海報,在公車總站附近找人,所...詳全文

                        +
                        +
                      • +
                      • + +
                        討回公道!埋線減重延婚 中醫師遭起訴 
                        +
                        +

                        台中1名準新娘2012年10月計畫到關島結婚,當時她擔心手臂太粗穿婚紗不好看,到中醫診所「穴位埋針」,沒想到兩邊手臂出現30多個膿包,前後動了多次清創引流手術,仍留下清楚疤痕,她不只帶著傷疤拍婚紗、辦海外婚禮,連12月台灣宴客時間都往後延,...詳全文

                        +
                        +
                      • +
                      • + +
                        砂石車撞路邊民宅 網友「一秒變敞篷」 
                        +
                        +

                        桃園前天上午10點多,一輛砂石車撞上路旁民宅,車頭蓋被削去大半邊,幸好無人受傷。整個過程被行經車輛的行車紀錄器,拍了下來,並po上網路,網友說這輛砂石車是一秒變敞篷車...詳全文

                        +
                        +
                      • +
                      • + +
                        搶寶快狠準! 3千件流當品2折特賣「搶翻」 
                        +
                        +

                        淘寶客都會趁著歲末搶寶物,當鋪年底舉辦流當品特賣,近三千件珠寶、鑽石、翡翠,都比起當鋪價再下殺兩到五折,最低甚至一折就可賣到,一早特賣會場外聚集數百人冒著寒風排隊,排在前面的人,甚至已經在這裡打地鋪一個星期了...詳全文

                        +
                        +
                      • +
                      • + +
                        廣告教母莊淑芬任副手? 柯文哲低調不證實 
                        +
                        +

                        有台灣廣告教母之稱的莊淑芬,被點名是準台北市長柯文哲的第三位女性副手,尤其他目前任職的奧美集團大中華區副董事長一職,也和柯文哲日前所說的條件,企業界人士這一項,不謀而合,但這項消息柯文哲目前還不願證實...詳全文

                        +
                        +
                      • +
                      • + +
                        碰!10公斤碗櫃壓傷陸童 父母閃神釀禍 
                        +
                        +

                        照顧家中的幼兒真的要多加留心,大陸一名母親帶2歲男童到餐廳用餐,男童好奇在餐廳跑來跑去,就在父母閃神的那一剎那,男童伸手拉了一旁的碗筷消毒櫃,結果高1.5公尺、重達10公斤的消毒櫃整個倒下,當場把男童壓扁,雖然只受皮外傷,但是難保毎一次都這...詳全文

                        +
                        +
                      • +
                      • + +
                        「馬吳王朱」四太陽 吳敦義2016出線呼聲高 
                        +
                        +

                        新北市長朱立倫12日表態放棄2016,全力參選黨魁之後,國民黨內未來誰能角逐大位,外界好奇,後馬時期,黨內的四個太陽,除了總統之外,還有吳敦義、王金平、加上朱立倫,就在朱立倫表態棄選2016之後,黨內認為,要能在選戰裡對上蔡英文的人,還是非...詳全文

                        +
                        +
                      • +
                      +
                      +
                      + +
                      + + + + + +
                      + +
                      + +
                      +

                      + +
                      + + + + + + + + + +
                      ​​UBA/UBA女籃劉懿文破繭而出 「雙十」加4助攻北市大博愛首勝
                      (17:21)
                      天冷買氣熱! 露營「人形睡袋」銷量增3倍
                      (17:21)
                      政治感覺太遙遠 日年輕人「政治冷感」
                      (17:13)
                      ​超萌貓界花美男 睡著後…形象一秒崩壞!
                      (17:09)
                      泰王室家變!王儲妃被逐 失皇族身份
                      (17:06)
                      ​UBA/文化女籃身高平均179.25成UBA之最 開幕戰贏60分
                      (17:00)
                      \ No newline at end of file diff --git a/tests/models/Crawler/TVBS/data/listing.json b/tests/models/Crawler/TVBS/data/listing.json new file mode 100644 index 0000000..0da3d1e --- /dev/null +++ b/tests/models/Crawler/TVBS/data/listing.json @@ -0,0 +1,28 @@ +[ + "http://news.tvbs.com.tw/entry/556732", + "http://news.tvbs.com.tw/entry/558003", + "http://news.tvbs.com.tw/entry/558294", + "http://news.tvbs.com.tw/entry/558296", + "http://news.tvbs.com.tw/entry/558298", + "http://news.tvbs.com.tw/entry/558300", + "http://news.tvbs.com.tw/entry/558303", + "http://news.tvbs.com.tw/entry/558304", + "http://news.tvbs.com.tw/entry/558305", + "http://news.tvbs.com.tw/entry/558306", + "http://news.tvbs.com.tw/entry/558307", + "http://news.tvbs.com.tw/entry/558308", + "http://news.tvbs.com.tw/entry/558309", + "http://news.tvbs.com.tw/entry/558310", + "http://news.tvbs.com.tw/entry/558311", + "http://news.tvbs.com.tw/entry/558312", + "http://news.tvbs.com.tw/entry/558313", + "http://news.tvbs.com.tw/entry/558314", + "http://news.tvbs.com.tw/entry/558315", + "http://news.tvbs.com.tw/entry/558316", + "http://news.tvbs.com.tw/entry/558317", + "http://news.tvbs.com.tw/entry/558318", + "http://news.tvbs.com.tw/entry/558319", + "http://news.tvbs.com.tw/entry/558320", + "http://news.tvbs.com.tw/entry/558321", + "http://news.tvbs.com.tw/entry/558322" +] \ No newline at end of file diff --git a/tests/models/Crawler/UDN/Crawl.test b/tests/models/Crawler/UDN/Crawl.test new file mode 100644 index 0000000..05f4ba5 --- /dev/null +++ b/tests/models/Crawler/UDN/Crawl.test @@ -0,0 +1,20 @@ +label = 'Crawler_UDN::findLinksIn test (listing.html)'; + } + + function testCrawlLinksIn() + { + $body = file_get_contents(__DIR__ . '/data/listing.html'); + $links = array_values(Crawler_UDN::findLinksIn($body)); + sort($links); + $expected_links = json_decode(file_get_contents(__DIR__ . '/data/listing.json'), TRUE); + $this->assertIdentical($links, $expected_links, 'Crawling links'); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/UDN/Parse.test b/tests/models/Crawler/UDN/Parse.test new file mode 100644 index 0000000..cd53a5d --- /dev/null +++ b/tests/models/Crawler/UDN/Parse.test @@ -0,0 +1,29 @@ +label = 'Crawler_UDN::parse (9127738.html)'; + } + + function testParse() + { + $content = file_get_contents(__DIR__ . '/data/9127738.html'); + $result = Crawler_UDN::parse(Crawler::prepareContent($content)); + $reference = json_decode(file_get_contents(__DIR__ . '/data/9127738.json')); + + $this->assertEqual( + $result->title, + $reference->title, + 'Parsed Page Title' + ); + $this->assertEqual( + $result->body, + $reference->body, + 'Parsed Page Body' + ); + } + +} \ No newline at end of file diff --git a/tests/models/Crawler/UDN/data/9127738.html b/tests/models/Crawler/UDN/data/9127738.html new file mode 100644 index 0000000..cc18777 --- /dev/null +++ b/tests/models/Crawler/UDN/data/9127738.html @@ -0,0 +1,1982 @@ + + + + + + + + + + +qsyG٦׾˩Mը | nD | YɷsD | pXsD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + +
                      + + + + + + + + +
                      + + + + + + +
                      + +
                      +
                      + + + + + + +
                      + + + + +
                      +
                      +
                        + +
                      +
                      +
                      + + +
                      + + + + + + +
                      + +
                      + + + +
                      + + + + + + + + + + + + +
                      + + + + + + + + + + + + + + + + +
                      + +̷s | oN | zsD + + + + + + + + + + + + + + + +
                      + + +
                      + +
                      + + + +
                      qsyG٦׾˩Mը
                      + +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + + + +

                      ws_߭۬QѴij׾˧令ըAx_qsyWȪܡAW@׾ˬO9~eAݨD`hˬFʥAL٦׾˩MըC

                      +qsyAo9~ݨˬFB@@ǰD͡AL{DnզAN¦AӥB̯ϬMhNnDALӤHo˪@kA]ıoƱzL׾ˤ覡ѨMD C

                      +qsyWȨդѥ[x_cACݰqsy᪺U@BHͳWAqsyALU@BNO֡BɤO⥫U@Ӷ꺡yIC

                      +t~ACݨ2016O_iMdq@_uX@vAqsyAثeSo˪C

                      +
                      + + + + + + + +

                      i2014/12/13 pX߳j@ http://udn.com/

                      + +
                      + + +

                      + +

                      + + + +
                      + + + + + +
                      + +
                      + +
                      + + + + + + + + + + + + + + + + +
                      +
                      + + + + + +
                      + + + + + + + + + + + +
                      + + + + + +
                      + + + +
                      + +
                      + + + + +
                      + + + + + + +
                      + + + +
                      + + + + +
                      + sDy + (UAohsDPı) +
                      +
                      +
                      +
                      + + + + +
                      + + + + + + + + + + + + +
                      + + +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      Facebook ^
                      + +
                      Facebook^J
                      + + + +
                      +
                      + + + + + + + + + +
                      BLOG
                      +
                      +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + +
                      + +
                      + +
                      + + + + + + + + + + + + + + +
                      +
                        +
                      • +
                      • pXsD
                      • +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + + + + + + + + + +
                      + + + + + +
                      q\ql 
                      +
                      + + + +
                      +
                      + + + + + + + + + + + +
                      + + + + + +
                      + pXql
                      + udnȫֳ
                      + udn׾³
                      + @Pjƹql
                      + ssDql
                      + xW߳
                      + WL
                      + pXѳuֻ
                      + WHql
                      + ~nEPӼuql +

                      +
                      +
                      +
                      +
                      +
                      + + + + + + + +
                      + + + +
                       
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/models/Crawler/UDN/data/9127738.json b/tests/models/Crawler/UDN/data/9127738.json new file mode 100644 index 0000000..ae3a7cc --- /dev/null +++ b/tests/models/Crawler/UDN/data/9127738.json @@ -0,0 +1,4 @@ +{ + "title": "郝龍斌:贊成修憲和內閣制", + "body": "【聯合晚報╱記者楊正海╱即時報導】\n2014.12.13 01:06 pm\n針對新北市長朱立倫昨天提議修憲改成內閣制,台北市長郝龍斌上午表示,上一次修憲是9年前,期間看到非常多憲政的缺失,他贊成修憲和內閣制。\n郝龍斌說,這9年中間看到憲政運作有一些問題產生,他認為主要的內閣成員,都有民意基礎,而且最能夠反映多元民意的要求,他個人支持這樣的作法,也覺得希望能透過修憲方式具體解決問題 。\n郝龍斌上午到花博公園參加台北花卉,媒體問郝龍斌市長卸任後的下一步人生規劃,郝龍斌說,他的下一步就是儘快、盡力把市長任期劃下一個圓滿的句點。\n另外,媒體問到2016是否有可能和吳敦義一起「合作」,郝龍斌說,目前沒有這樣的打算。" +} \ No newline at end of file diff --git a/tests/models/Crawler/UDN/data/README.md b/tests/models/Crawler/UDN/data/README.md new file mode 100644 index 0000000..9de7b41 --- /dev/null +++ b/tests/models/Crawler/UDN/data/README.md @@ -0,0 +1,14 @@ +UDN data +================== + +The `.html` files are downloaded 2014-12-13. +They represents the normal data crawled from the site. + +The `.json` files are the expected parse result for the +`.html` files of the same name. + + - `listing.html` + From the result of crawlIndex() + + - `9127738.html` + From: http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127738.shtml \ No newline at end of file diff --git a/tests/models/Crawler/UDN/data/listing.html b/tests/models/Crawler/UDN/data/listing.html new file mode 100644 index 0000000..27f75d5 --- /dev/null +++ b/tests/models/Crawler/UDN/data/listing.html @@ -0,0 +1,1895 @@ +arMenu1 = new Array( + "udn tv","http://tv.udn.com/index.shtml",0, + "新聞live直播","https://video.udn.com/live",0, + "udn talks","http://udntalks.udn.com/",1, + "救扁議題再起","https://video.udn.com/topic/478",1, + "柯P小內閣成形","https://video.udn.com/topic/471",1, + "朱立倫選黨主席","https://video.udn.com/topic/469",1, + "節目","http://tv.udn.com/shows/index.shtml",1, + "國際","http://video.udn.com/global",1, + "時事","http://video.udn.com/general",1, + "生活","http://video.udn.com/life",1, + "財經","http://video.udn.com/finance",1, + "娛樂","http://video.udn.com/stars",1, + "體育","http://video.udn.com/sports",1, + "綜合","http://video.udn.com/complex",1, + "手語新聞","http://video.udn.com/topic/442/",1); +arMenu1_3 = new Array( + "邱文傑:偉大與平凡的距離","http://udntalks.udn.com/videos_detail.php?id=131",0, + "王希文:老調新彈—多元文化的兼容並蓄","http://udntalks.udn.com/videos_detail.php?id=42",0, + "楊力州:讓生命安置,跟這個世界談談","http://udntalks.udn.com/videos_detail.php?id=132",0, + "歐陽靖:怕的不是路有多長,怕的是不敢上路","http://udntalks.udn.com/videos_detail.php?id=33",0); +arMenu1_4 = new Array( + "陳水扁保外就醫遭駁回 陳菊喊話","//video.udn.com/topic/478/247811",0, + "扁保外就醫聲明異議 遭高院駁回","//video.udn.com/topic/478/247570",0, + "扁保外就醫聲明異議 高院今駁回","//video.udn.com/topic/478/247460",0, + "釋扁與否受馬英九指揮? 羅瑩雪否認","//video.udn.com/topic/478/247225",0, + "青年救扁晚會 呂秀蓮到場力挺","//video.udn.com/topic/478/246553",0, + "呂秀蓮出席救扁晚會 流淚籲釋放阿扁","//video.udn.com/topic/478/245993",0, + "扁保外就醫案 馬總統事前不知情","//video.udn.com/topic/478/246407",0, + "美麗島新書發表 陳菊等人籲放扁","//video.udn.com/topic/478/245976",0, + "呂秀蓮探監 陳水扁感動落淚","//video.udn.com/topic/478/245856",0, + "扁辦重新提出 保外就醫申請","//video.udn.com/topic/478/245711",0); +arMenu1_5 = new Array( + "莊淑芬任副市長?柯文哲低調","//video.udn.com/topic/471/247819",0, + "柯P請益 李登輝三句話勉勵","//video.udn.com/topic/471/247619",0, + "柯文哲請益之旅 今拜會李登輝","//video.udn.com/topic/471/247494",0, + "柯文哲公布 13位局處首長名單","//video.udn.com/topic/471/247389",0, + "第一波北市府人事 柯文哲公布名單","//video.udn.com/topic/471/247252",0, + "外界批球員兼裁判 吳世哲退選","//video.udn.com/topic/471/247077",0, + "「白毛將軍」傅永茂 扁政府時代獲拔擢","//video.udn.com/topic/471/246996",0, + "勞動局長遴選 投票流程民霧煞煞","//video.udn.com/topic/471/247056",0, + "吳世哲聲明 退出「勞動局長」遴選","//video.udn.com/topic/471/246881",0, + "北市勞局長備選人 吳世哲退選","//video.udn.com/topic/471/246958",0); +arMenu1_6 = new Array( + "朱立倫不選總統 吳敦義低調回應","//video.udn.com/topic/469/247801",0, + "宣布參選黨主席 朱立倫不選2016","//video.udn.com/topic/469/247713",0, + "「支持朱立倫」 胡志強不參選黨魁","//video.udn.com/topic/469/247693",0, + "「找回創黨精神」 朱立倫表態選黨魁","//video.udn.com/topic/469/247614",0, + "朱不選2016總統 國民黨誰來選?","//video.udn.com/topic/469/247615",0, + "談參選黨主席 朱立倫不當共主盼團結","//video.udn.com/topic/469/247423",0, + "選黨魁不選總統 朱立倫盼推內閣制","//video.udn.com/topic/469/247481",0, + "主席補選今領表 國民黨掀角力戰","//video.udn.com/topic/469/247383",0, + "朱立倫選黨主席 不選2016總統","//video.udn.com/topic/469/247406",0, + "朱立倫參選國民黨主席 不參選2016總統","//video.udn.com/topic/469/247171",0); +arMenu1_7 = new Array( + "財經新視界/讓您成為理財萬事通!","http://tv.udn.com/shows/156.shtml",0, + "行車紀錄趣/進入迷人的動力世界!","http://tv.udn.com/shows/2.shtml",0, + "台灣名物誌/各地嚴選名物報你知!","http://tv.udn.com/shows/1.shtml",0, + "健康日記/紀錄健康,為身體把關!","http://tv.udn.com/shows/138.shtml",0, + "藝想世界/與您一起發現藝術之美!","http://tv.udn.com/shows/141.shtml",0, + "大而話之/放眼兩岸精采話題剖析!","http://tv.udn.com/shows/134.shtml",0, + "攻房大挑戰/買對房子富貴一輩子!","http://tv.udn.com/shows/155.shtml",0, + "字。在生活/探索字的奧妙與故事!","http://tv.udn.com/shows/132.shtml",0); +arMenu1_8 = new Array( + "送機器人上月球 南非募資追夢","//video.udn.com/news/247809",0, + "利馬氣候會落幕 各國嚴重分歧","//video.udn.com/news/247804",0, + "逾10機場當機 英國航班大中斷","//video.udn.com/news/247712",0, + "遭母遺棄小海獺 票選命名Luna","//video.udn.com/news/247723",0, + "南加州連日暴雨 土石流淹沒民宅","//video.udn.com/news/247721",0, + "讀頭條看世界(2014/12/13)","//video.udn.com/news/247714",0, + "義國罷工抗議 多城市爆警民衝突","//video.udn.com/news/247715",0, + "全球瞭望(2)恐怖「刑求」又逼供 「CIA」反恐成功?激化?(2014/12/12)","//video.udn.com/news/247701",0, + "全球瞭望(1)港府強力清場 「佔中」結束了?更昇華了?(2014/12/12)","//video.udn.com/news/247706",0, + "全球瞭望(3)突換國防部長 歐巴馬「全球戰略」將轉變?(2014/12/12)","//video.udn.com/news/247702",0); +arMenu1_9 = new Array( + "抓槍擊犯飯店攻堅 警逮5男1女","//video.udn.com/news/247861",0, + "朱立倫不選總統 吳敦義低調回應","//video.udn.com/news/247801",0, + "陳水扁保外就醫遭駁回 陳菊喊話","//video.udn.com/news/247811",0, + "莊淑芬任副市長?柯文哲低調","//video.udn.com/news/247819",0, + "美國校園再傳槍響 3人中槍送醫","//video.udn.com/news/247716",0, + "宣布參選黨主席 朱立倫不選2016","//video.udn.com/news/247713",0, + "「支持朱立倫」 胡志強不參選黨魁","//video.udn.com/news/247693",0, + "天橋底下來PLAY(2)政治不再一人主導 朱立倫推內閣制 (2014/12/12)","//video.udn.com/news/247704",0, + "天橋底下來PLAY(1)朱立倫宣布選黨魁 不選2016總統 (2014/12/12)","//video.udn.com/news/247707",0, + "推行內閣制 可改變閣揆有責無權","//video.udn.com/news/247616",0); +arMenu1_10 = new Array( + "「生物律動展」 換種方式感受聲音","//video.udn.com/news/247876",0, + "假日玩樂趣! 新北耶誕踩街遊行","//video.udn.com/news/247862",0, + "烏骨雞一斤破百元 婆媽買不下手","//video.udn.com/news/247808",0, + "癌症患者新選擇 居家化療成趨勢","//video.udn.com/news/247817",0, + "資訊月3C最大盛事 掀筆電平板戰","//video.udn.com/news/247821",0, + "春節離島周二搶票 民航局教三招","//video.udn.com/news/247711",0, + "擠痘出血叫救護車 急診輕症爆滿","//video.udn.com/news/247719",0, + "冬天來吃鍋 全台10大火鍋出爐","//video.udn.com/news/247690",0, + "年關近想轉職?12月工作機會多","//video.udn.com/news/247571",0, + "氣溫一路探底 國內發熱衣買氣夯","//video.udn.com/news/247581",0); +arMenu1_11 = new Array( + "國際股市(2014/12/13)","//video.udn.com/news/247863",0, + "國際油價續下跌 歐美股市重挫","//video.udn.com/news/247800",0, + "台股周線收黑 聚焦大戶條款後續","//video.udn.com/news/247820",0, + "歐美股市收盤指數(2014/12/12)","//video.udn.com/news/247718",0, + "就市論勢/中小IC設計生技 優選(2014/12/13)","//video.udn.com/news/247717",0, + "樂透開獎(2014/12/12)","//video.udn.com/news/247695",0, + "前景不佳 交機延遲 空巴股票大跌","//video.udn.com/news/247686",0, + "ITA陸反對納入面板 談判瀕臨破局","//video.udn.com/news/247678",0, + "日韓澳股市(2014/12/12)","//video.udn.com/news/247685",0, + "大陸股市(2014/12/12)","//video.udn.com/news/247683",0); +arMenu1_12 = new Array( + "年吸6.4億 2014歌手周杰倫最賺","//video.udn.com/news/247802",0, + "隋棠「徵婚」 男友小媽 妹妹現身","//video.udn.com/news/247803",0, + "台北電影票房排行榜 (2014/12/12)","//video.udn.com/news/247594",0, + "金球獎入圍揭曉 「鳥人」傲視群雄","//video.udn.com/news/247373",0, + "「鐵獅玉玲瓏2」惹議 賽德克族籲道歉","//video.udn.com/news/247374",0, + "愛妻形象崩壞 阿基師代言受衝擊","//video.udn.com/news/247376",0, + "全程3D拍攝 「出埃及記」重現傳奇","//video.udn.com/news/247419",0, + "金球獎入圍 「鳥人」風光飛上枝頭","//video.udn.com/news/247205",0, + "電影搞笑惹議 賽德克族要求道歉","//video.udn.com/news/247209",0, + "資深藝人趙舜病逝 得年58歲","//video.udn.com/news/246550",0); +arMenu1_13 = new Array( + "大白鯊賽次輪 戴伊組合續保領先","//video.udn.com/news/247877",0, + "超網聯賽 印度Aces隊鎖定冠軍","//video.udn.com/news/247818",0, + "台北城市跆拳道賽 王炳順先開踢","//video.udn.com/news/247805",0, + "ITTF年終賽 陳思羽U21女單封后","//video.udn.com/news/247662",0, + "超網聯賽杜拜站 印度Aces隊領先","//video.udn.com/news/247661",0, + "台北城市跆拳道賽 周末紅館登場","//video.udn.com/news/247665",0, + "跑步昏倒滿一年 林又立不怕繼續跑","//video.udn.com/news/247666",0, + "國北教大女籃 升上UBA甲一戰場","//video.udn.com/news/247663",0, + "CBA青年隊 小球員西進新選擇","//video.udn.com/news/247664",0, + "升甲一級第二戰 國北教大奪首勝","//video.udn.com/news/247626",0); +arMenu1_14 = new Array( + "春節離島機位 下周二準備開搶","//video.udn.com/news/247871",0, + "環保新妙招 德機場養蜂測空汙","//video.udn.com/news/247872",0, + "獵殺海豹惹議 挪威擬廢補助金","//video.udn.com/news/247874",0, + "送水千里 大陸南水北調中線啟用","//video.udn.com/news/247720",0, + "「跛腳馬」險被處死 網友號召救馬","//video.udn.com/news/247696",0, + "七甲花市混搭色系 推各色耶誕紅","//video.udn.com/news/247699",0, + "12萬個樂高積木 打造希臘衛城","//video.udn.com/news/247698",0, + "夏威夷豆返航風波 韓航千金道歉","//video.udn.com/news/247588",0, + "迪士尼90周年特展 穿越時光迴廊","//video.udn.com/news/247593",0, + "1700新聞ING (2014/12/12)","//video.udn.com/news/247507",0); +arMenu1_15 = new Array( + "手語/身心障牌照優惠 1900輛資格將取消","//video.udn.com/topic/442/246633",0, + "手語/享受靜默 聽障生奪果雕雙冠王","//video.udn.com/topic/442/247217",0, + "手語/強光下工作 工程師險失明","//video.udn.com/topic/442/247216",0, + "手語/滿牆老照片… 聽「內灣媳婦」說故事","//video.udn.com/topic/442/247215",0, + "手語/袁鵬偉「有故事的店」 指尖敲出漸凍病友夢工廠","//video.udn.com/topic/442/247211",0, + "手語/2014大新聞 太陽花學運、食安…","//video.udn.com/topic/442/247210",0, + "手語/奇美醫學中心跨國研究 電子耳聽見旋律","//video.udn.com/topic/442/246627",0, + "手語/台灣國際創意設計賽 觀世音教手語「銀」了","//video.udn.com/topic/442/246624",0, + "手語/「反北宜直鐵」粉絲頁 提3大訴求","//video.udn.com/topic/442/246623",0, + "手語/直言集/國民黨 用行動讓「婉君」心動吧","//video.udn.com/topic/442/246622",0); + +// created on wm@cmdes.udn.com 2014/12/13 17:32:8 1 459 + +arMenu0 = new Array("nD","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/",1, +"|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/",1, +"a","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/",1, +"⩤","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/",1, +"","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/",1, +"]g","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/",1, +"B","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/",1, +"T","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/",1, +"ͬ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/",1) +arMenu0_1 = new Array("ҥDuɿA߭ۦPBv","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128018.shtml",0, +"nߩeɿ iұt","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128009.shtml",0, +"ҥDuɿ ߭ۦPBv","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128003.shtml",0, +"_]F 15enO","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127977.shtml",0, +"鷺ըHJӱjG]ӤH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127952.shtml",0, +"a~P xWƦWɦ25W","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127947.shtml",0, +"_Ұʧ 14벼","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127916.shtml",0, +"_ic {qXS10","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127876.shtml",0, +"O~Nܧi^","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127873.shtml",0, +"xqWG׾ˬO@Ӥju{","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127865.shtml",0, +"xqWG׾˻ݦ|@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127858.shtml",0, +"Mwߤd G߰|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127855.shtml",0, +"}GqŦX@Nq","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127820.shtml",0, +"߭۴ը dq","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127751.shtml",0, +"qsyG٦׾˩Mը","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127738.shtml",0) +arMenu0_2 = new Array("^溸@b tdHO","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9128019.shtml",0, +"14קC 򶩾K~e","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9128011.shtml",0, +"~HVex mzըf","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127976.shtml",0, +"rkJĵ˥q ӰQѯ}","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127972.shtml",0, +"DƧ}wDLRsrut","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127941.shtml",0, +"vܤut ۾ǻsrkk","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127922.shtml",0, +"¸鰽ζ @w妨}","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127891.shtml",0, +"jsǻzDĵDDQīH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127888.shtml",0, +"Ƚ|B ĵ3pɧ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127874.shtml",0, +"ֱŤj qrǾDĵd","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127857.shtml",0, +"HQBTʦhU _}e","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127846.shtml",0, +"uc湳GĵPD","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127842.shtml",0, +"RߦWjP ~HDĵa^","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127841.shtml",0, +"O~Nקܧi |^","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127838.shtml",0, +"{}jڮ ĵKeH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127703.shtml",0) +arMenu0_3 = new Array("Ӥupw ^Uaģ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128024.shtml",0, +"qǧUzն ŷxzե","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128016.shtml",0, +"kle[} ϫo","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128015.shtml",0, +"P \Ҩ²","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128012.shtml",0, +"C~m` ^j","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127994.shtml",0, +"ҥx_ |A","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127982.shtml",0, +"s_Cϫy UH@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127981.shtml",0, +"ŷxӪH ˥갪ͤWҵo","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127974.shtml",0, +"ȴga yĤlѥ[@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127971.shtml",0, +"922׶Х@ɬ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127970.shtml",0, +"NBBAaz","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127955.shtml",0, +"jbxn|즲ʭ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127951.shtml",0, +"sGDe½ krpe","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127936.shtml",0, +"nַO|٧Uxnuz","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127935.shtml",0, +"xnyڧӤuZuӤu","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127933.shtml",0) +arMenu0_4 = new Array("~ap| L14x","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9128008.shtml",0, +"ȳQ| sW椣C","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127992.shtml",0, +"wʳXx{ 14騣Y","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127980.shtml",0, +"|w ⩤e~@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127973.shtml",0, +"fBt 123","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127953.shtml",0, +"jGqixi榱 ð","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127907.shtml",0, +"XKKaä[γwʡG⩤@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127863.shtml",0, +"eAE CϰiI","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127860.shtml",0, +"1Ӥ3F ͡GG","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127822.shtml",0, +"Dz]b@x LߨMDƹ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127774.shtml",0, +"_ʭԾZ 2015_d","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127645.shtml",0, +"IJe 78ffø200Te","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127633.shtml",0, +"_ʤW ߸Fϰk|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127629.shtml",0, +"nʤjO ߪ񥭽ͩM","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127628.shtml",0, +"kgkʷR 3Ӥo","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127620.shtml",0) +arMenu0_5 = new Array("IǤh j̰|Ѫ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9128017.shtml",0, +"zɫBg۬y ܤ12BʤH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9128014.shtml",0, +"jҼxҿOif|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127990.shtml",0, +"VnFA-50Ծ ~f","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127978.shtml",0, +"鲳|e] wflU","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127961.shtml",0, +"k¾ W[","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127948.shtml",0, +"ڷ~sW ԦCLӤe","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127923.shtml",0, +"Ŵ촵 LרkQ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127915.shtml",0, +"Qɤj}u űN","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127910.shtml",0, +"դHMּƱڸs]ItZԤj","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127906.shtml",0, +"jlq@ ૰D̦h","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127893.shtml",0, +"̫[H uAɶv@ɦa","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127883.shtml",0, +"ڰǴZk ¥HCax","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127875.shtml",0, +"૰I jƪs","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127871.shtml",0, +"CG]oU^ ڬѥ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127870.shtml",0) +arMenu0_6 = new Array("dFGH߳۸","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9128023.shtml",0, +"dFGGYHo Ȧb","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127991.shtml",0, +"dFGH߳۸ u~פvT","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127949.shtml",0, +"lȨI ̨γbo","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127942.shtml",0, +"yAA O","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127903.shtml",0, +"xWǤ󲣭Ȥ~20%","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127881.shtml",0, +"ݨDﵽ L","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127852.shtml",0, +"o^ ~A","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127851.shtml",0, +"jx Uۼo","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127849.shtml",0, +"xT qH~4GA","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127847.shtml",0, +"@gȹ ɭ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127839.shtml",0, +"~TCݤd xtQh","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127835.shtml",0, +"ǶϷsW8 O16","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127830.shtml",0, +"ѭO300I xѦO","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127814.shtml",0, +"OTCqLΡ]4550^ӽФWd","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127770.shtml",0) +arMenu0_7 = new Array("SBLx໴x","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9128010.shtml",0, +"دuRʵدv]","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127946.shtml",0, +"SBLxඤx","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127940.shtml",0, +"NBAܮEy Lѻw_","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127886.shtml",0, +"NBAT HJ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127828.shtml",0, +"Ӿ|ծlԪQ H}][","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127649.shtml",0, +"NBALѻPӧU HIޡuv","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127630.shtml",0, +"MLBSXpZ A-Rodݭn","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127575.shtml",0, +"MLBl ätyCML","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127574.shtml",0, +"MLBpShʸTG ȳQ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127573.shtml",0, +"MLBVu|ijR vO@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127568.shtml",0, +"MLBiԴ°⳾q ų̦","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127567.shtml",0, +"MLBФhj ɧ٭n̴y","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127566.shtml",0, +"NBA}ìHwF饸","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127551.shtml",0, +"NBAܮGr}줦ִ֦^","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127416.shtml",0) +arMenu0_8 = new Array("²pѰ۸Bkq MpBͶW޺tX","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127979.shtml",0, +"²pѬq۸","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127944.shtml",0, +"ܹCӫ@ӥU٫ܤj","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127937.shtml",0, +"_@kR| ǩnSelinam","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127892.shtml",0, +"iȩMpYXuqNO̷|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127889.shtml",0, +"T vkkd`PC","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127885.shtml",0, +"dL] Fl}3dU","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127844.shtml",0, +"nʤpd E3׷","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127836.shtml",0, +"tlRunning Man }ޤH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127697.shtml",0, +"iںӿ˪ FĤ@ҤH","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127643.shtml",0, +"~qΨ qyOoN","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127637.shtml",0, +"_lS̡upīGv ~ŧx","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127617.shtml",0, +"ʲok Ŷǥä}A","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127561.shtml",0) +arMenu0_9 = new Array("د55P~y P]̦Pw","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9128022.shtml",0, +"FNЧ@ ҼFy","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9128013.shtml",0, +"Ťl fyƥ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127959.shtml",0, +"Yǧ Cϸ~½","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127958.shtml",0, +"̩_̩gP|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127957.shtml",0, +"oаqu NhI","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127945.shtml",0, +"ЦGi s´ŸqHڷQ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127943.shtml",0, +"ȬwHBvޤj ݥxԨf","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127939.shtml",0, +"aS Ҳv7","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127938.shtml",0, +"DHJ@F~ͤH}Ϫj@","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127934.shtml",0, +"xyn oDG","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127924.shtml",0, +"uA~ xW}","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127911.shtml",0, +"tLFu qϴ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127905.shtml",0, +"J Aڦpsܭ","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127859.shtml",0, +"ҰʳC~ڦGo|","http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127831.shtml",0) +arMenu2 = new Array("߭ۿһ","http://udn.com/NEWS/NATIONAL/NAT4/",1, +"Uɬݦһ","http://udn.com/NEWS/NATIONAL/NATS5/",1, +"ۭ߭n׾","http://udn.com/NEWS/NATIONAL/NAT3/",1, +"O~ND","http://udn.com/NEWS/NATIONAL/NATS1/",1, +"x_ssF","http://udn.com/NEWS/NATIONAL/NATS3/",1, +"EX@F","http://udn.com/NEWS/NATIONAL/NATS4/",1, +"Fv","http://udn.com/NEWS/NATIONAL/NAT1/",1, +"X","http://udn.com/NEWS/NATIONAL/NAT5/",1, +"Ϫݮɨ","http://udn.com/NEWS/NATIONAL/NATS10/",1, +"֯լdijX","http://udn.com/NEWS/NATIONAL/NAT2/",1) +arMenu2_1 = new Array("߭ۿһuӤݦ@DMFvPv","http://udn.com/NEWS/NATIONAL/NAT4/9127345.shtml",0, +"߭۰ѿG^Һ믫 MHb@_","http://udn.com/NEWS/NATIONAL/NAT4/9127293.shtml",0, +"ťҥDu ߭ۡGҲnkٰa","http://udn.com/NEWS/NATIONAL/NAT4/9127287.shtml",0, +"sD߭ n]ٱqҤWU","http://udn.com/NEWS/NATIONAL/NAT4/9127289.shtml",0, +"sD߭۳sg3b WԲI","http://udn.com/NEWS/NATIONAL/NAT4/9127315.shtml",0, +"[ǡu¥гվvi","http://udn.com/NEWS/NATIONAL/NAT4/9127295.shtml",0, +"߭۽Ͱ^E ڭ̭өʤѮtaO","http://udn.com/NEWS/NATIONAL/NAT4/9127298.shtml",0, +"ͤ ߭ۡGyٶl͡H","http://udn.com/NEWS/NATIONAL/NAT4/9127296.shtml",0, +"߭ۡGѿ uMӤӰQ׹L","http://udn.com/NEWS/NATIONAL/NAT4/9126086.shtml",0, +"2016` ߭ۤ ֨Ӿ","http://udn.com/NEWS/NATIONAL/NAT4/9126055.shtml",0, +"MD߭ۺ޲zHY 񰨭^E󰪬","http://udn.com/NEWS/NATIONAL/NAT4/9125834.shtml",0, +"nYQѡHD_jI","http://udn.com/NEWS/NATIONAL/NAT4/9116779.shtml",0, +"nPorsche Macan qܱz{ਮ","http://udn.com/NEWS/NATIONAL/NAT4/9118779.shtml",0, +"sTnO5O ֥[","http://udn.com/NEWS/NATIONAL/NAT4/9118737.shtml",0) +arMenu2_2 = new Array("߭ۤ2016 xqWGܤnӦ","http://udn.com/NEWS/NATIONAL/NATS5/9127300.shtml",0, +"ۭ߭YҥDu eG½V3ys","http://udn.com/NEWS/NATIONAL/NATS5/9127306.shtml",0, +"G૬nD šGҲb","http://udn.com/NEWS/NATIONAL/NATS5/9127303.shtml",0, +"eҲks OA׬FҪk","http://udn.com/NEWS/NATIONAL/NATS5/9127291.shtml",0, +"JqF GL dqGw","http://udn.com/NEWS/NATIONAL/NATS5/9127322.shtml",0, +"ſ ݦn","http://udn.com/NEWS/NATIONAL/NATS5/9127308.shtml",0, +"¥ն߷|򥻱w","http://udn.com/NEWS/NATIONAL/NATS5/9127356.shtml",0, +"ס׾ˡ2016 ijD","http://udn.com/NEWS/NATIONAL/NATS5/9127358.shtml",0) +arMenu2_3 = new Array("dqݤը ٫ݶi@BQ","http://udn.com/NEWS/NATIONAL/NAT3/9127765.shtml",0, +"߭ۤ` 3_ټu","http://udn.com/NEWS/NATIONAL/NAT3/9127129.shtml",0, +"߭ۡG2016׾ˤjj","http://udn.com/NEWS/NATIONAL/NAT3/9127265.shtml",0, +"e٬ɥ~yu׾ 2020մ}v","http://udn.com/NEWS/NATIONAL/NAT3/9127268.shtml",0, +"Ǫ̽ͤըu`Ϊ nv","http://udn.com/NEWS/NATIONAL/NAT3/9127267.shtml",0, +"sDNHqH ׾˨⭱b","http://udn.com/NEWS/NATIONAL/NAT3/9127269.shtml",0, +"NˬF źץXӪ","http://udn.com/NEWS/NATIONAL/NAT3/9126038.shtml",0, +"סĥ|׭R ը_ڡH","http://udn.com/NEWS/NATIONAL/NAT3/9127360.shtml",0) +arMenu2_4 = new Array("uݦFBv󪧫O~N |^","http://udn.com/NEWS/NATIONAL/NATS1/9127305.shtml",0, +"O~N ùGSw]߳","http://udn.com/NEWS/NATIONAL/NATS1/9127307.shtml",0, +"ⱴ A~O~N","http://udn.com/NEWS/NATIONAL/NATS1/9127310.shtml",0, +"nK`AaIs[YL~h","http://udn.com/NEWS/NATIONAL/NATS1/9117256.shtml",0, +"nvbzQ CCѰŷQ","http://udn.com/NEWS/NATIONAL/NATS1/9102044.shtml",0, +"nei_F دM̧C8","http://udn.com/NEWS/NATIONAL/NATS1/9102020.shtml",0) +arMenu2_5 = new Array("_kƤHn Q٨SIY","http://udn.com/NEWS/NATIONAL/NATS3/9127755.shtml",0, +"_p 3Hugv","http://udn.com/NEWS/NATIONAL/NATS3/9127312.shtml",0, +"_Ĥ@ip Lwo","http://udn.com/NEWS/NATIONAL/NATS3/9127137.shtml",0, +"Ĥ@ip _ijGM~BGI","http://udn.com/NEWS/NATIONAL/NATS3/9127353.shtml",0, +"୻D߷N@ Ұʧ5ƿHw","http://udn.com/NEWS/NATIONAL/NATS3/9127230.shtml",0, +"_Ƨuj½cv","http://udn.com/NEWS/NATIONAL/NATS3/9127316.shtml",0, +"nj_ BNRBԭ@","http://udn.com/NEWS/NATIONAL/NATS3/9127231.shtml",0, +"_@kռy _k߼R","http://udn.com/NEWS/NATIONAL/NATS3/9127232.shtml",0, +"_QΪD GCy~","http://udn.com/NEWS/NATIONAL/NATS3/9126080.shtml",0, +"nC饻 KOWIFIPsu","http://udn.com/NEWS/NATIONAL/NATS3/9112072.shtml",0, +"nF״xd Lз~so easyI","http://udn.com/NEWS/NATIONAL/NATS3/9104158.shtml",0, +"nwROqȤťٹBʷ|b","http://udn.com/NEWS/NATIONAL/NATS3/9112039.shtml",0) +arMenu2_6 = new Array("Fs쿤 mHj@","http://udn.com/NEWS/NATIONAL/NATS4/9127753.shtml",0, +"__yϰpXvz 멳Ұ","http://udn.com/NEWS/NATIONAL/NATS4/9127757.shtml",0, +"ƦrŪ| PFF","http://udn.com/NEWS/NATIONAL/NATS4/9127262.shtml",0, +"N٦buCv lΤHߤ~","http://udn.com/NEWS/NATIONAL/NATS4/9127318.shtml",0, +"GX nǡugv","http://udn.com/NEWS/NATIONAL/NATS4/9127212.shtml",0, +"@Poi uL|v11@","http://udn.com/NEWS/NATIONAL/NATS4/9127272.shtml",0, +"xLsζ |De3ѴN","http://udn.com/NEWS/NATIONAL/NATS4/9127320.shtml",0, +"̿|¨ i̳QDЦ^","http://udn.com/NEWS/NATIONAL/NATS4/9127035.shtml",0, +"yoWGj P","http://udn.com/NEWS/NATIONAL/NATS4/9127246.shtml",0, +"Ὤ崐mGӾ|զO iɶKµ","http://udn.com/NEWS/NATIONAL/NATS4/9127244.shtml",0, +"ס_P{H gFvCWh","http://udn.com/NEWS/NATIONAL/NATS4/9127357.shtml",0, +"nBsȮaǰ۪Ŷ ҥ","http://udn.com/NEWS/NATIONAL/NATS4/9112037.shtml",0, +"n½AͩRгyH͵Li","http://udn.com/NEWS/NATIONAL/NATS4/9116898.shtml",0, +"nWɥN إߪ|s[","http://udn.com/NEWS/NATIONAL/NATS4/9116451.shtml",0) +arMenu2_7 = new Array("Lߨbˤͳ ꨾nDīGDp","http://udn.com/NEWS/NATIONAL/NAT1/9127758.shtml",0, +"nʤjO77P~ ~泡~GOаV","http://udn.com/NEWS/NATIONAL/NAT1/9127759.shtml",0, +"֬OǹBѡH L|BKTЦ^","http://udn.com/NEWS/NATIONAL/NAT1/9127234.shtml",0, +"L|Yߩe Mw","http://udn.com/NEWS/NATIONAL/NAT1/9127107.shtml",0, +"׬IFi }GFζnǴӸU","http://udn.com/NEWS/NATIONAL/NAT1/9127301.shtml",0, +"nͬơ꿤̩ 餻ĤG","http://udn.com/NEWS/NATIONAL/NAT1/9127047.shtml",0, +"y vGKܷN","http://udn.com/NEWS/NATIONAL/NAT1/9126082.shtml",0, +"ס½îæ DbRĥ","http://udn.com/NEWS/NATIONAL/NAT1/9127363.shtml",0, +"n}ɥV BkP4990_","http://udn.com/NEWS/NATIONAL/NAT1/8966261.shtml",0, +"ne¥PxWҰsT","http://udn.com/NEWS/NATIONAL/NAT1/9117259.shtml",0, +"nCavalia ۰ P ޡuzvAU","http://udn.com/NEWS/NATIONAL/NAT1/9086731.shtml",0) +arMenu2_8 = new Array("OHRYc x_|","http://udn.com/NEWS/NATIONAL/NAT5/9127304.shtml",0, +"2Jt ګTYԡuӦZv̦h~","http://udn.com/NEWS/NATIONAL/NAT5/9127309.shtml",0, +"ӶX n@_@","http://udn.com/NEWS/NATIONAL/NAT5/9127319.shtml",0, +"vѨM ض۱Ϸ|^","http://udn.com/NEWS/NATIONAL/NAT5/9127054.shtml",0, +"ֵRx mq~","http://udn.com/NEWS/NATIONAL/NAT5/9127313.shtml",0, +"ihPչ uۤn","http://udn.com/NEWS/NATIONAL/NAT5/9127239.shtml",0, +"auqlpxvҥ E","http://udn.com/NEWS/NATIONAL/NAT5/9127247.shtml",0, +"m185D ̿GwsCw","http://udn.com/NEWS/NATIONAL/NAT5/9126054.shtml",0, +"ספy pGoͦbK","http://udn.com/NEWS/NATIONAL/NAT5/9127362.shtml",0, +"nХAs_fռWI","http://udn.com/NEWS/NATIONAL/NAT5/8567452.shtml",0, +"nCavalia ۰ P ޡuzvAU","http://udn.com/NEWS/NATIONAL/NAT5/9086716.shtml",0, +"nWȰe ~{^X2%","http://udn.com/NEWS/NATIONAL/NAT5/9102019.shtml",0) +arMenu2_9 = new Array("TϪǦ~ڭ̧몺Dz","http://udn.com/NEWS/NATIONAL/NATS10/9127834.shtml",0, +"ϪnWȬwI ]ĮӡH","http://udn.com/NEWS/NATIONAL/NATS10/9126651.shtml",0, +"ϪźM O~N H","http://udn.com/NEWS/NATIONAL/NATS10/9122314.shtml",0, +"Ϫ2014żömTop 5","http://udn.com/NEWS/NATIONAL/NATS10/9122291.shtml",0, +"ϪxWgG VѦY","http://udn.com/NEWS/NATIONAL/NATS10/9119824.shtml",0, +"Ϫͻ`ù_v","http://udn.com/NEWS/NATIONAL/NATS10/9117774.shtml",0, +"Ϫo@ ~","http://udn.com/NEWS/NATIONAL/NATS10/9117040.shtml",0, +"TϪfG ݹL","http://udn.com/NEWS/NATIONAL/NATS10/9113467.shtml",0, +"Ϫմ}O ּ̤[H","http://udn.com/NEWS/NATIONAL/NATS10/9107950.shtml",0, +"Ϫ{xW ܧAӽ~","http://udn.com/NEWS/NATIONAL/NATS10/9102855.shtml",0, +"TϪDAȰϦnn}","http://udn.com/NEWS/NATIONAL/NATS10/9098872.shtml",0, +"Ϫn[} ťxq@|","http://udn.com/NEWS/NATIONAL/NATS10/9083764.shtml",0, +"nq Xҳ樮w","http://udn.com/NEWS/NATIONAL/NATS10/9126261.shtml",0, +"n|H~夣t","http://udn.com/NEWS/NATIONAL/NATS10/9125705.shtml",0, +"nIoOs_HIaz@@I","http://udn.com/NEWS/NATIONAL/NATS10/9125703.shtml",0) +arMenu2_10 = new Array("֤֡H~ zʹ","http://udn.com/NEWS/NATIONAL/NAT2/8998934.shtml",0, +"콦U@ 禾vUi֮qijX","http://udn.com/NEWS/NATIONAL/NAT2/8998925.shtml",0, +"wꦪ3] Ah]no","http://udn.com/NEWS/NATIONAL/NAT2/8998928.shtml",0, +"֦wz kHOb","http://udn.com/NEWS/NATIONAL/NAT2/8998929.shtml",0, +"wˤɯ OB֯U","http://udn.com/NEWS/NATIONAL/NAT2/8998932.shtml",0, +"^VX෽ ֹqiί","http://udn.com/NEWS/NATIONAL/NAT2/8998933.shtml",0, +"xW[ϹֹqAण2","http://udn.com/NEWS/NATIONAL/NAT2/8998924.shtml",0, +"xW[ֹqAणQ2","http://udn.com/NEWS/NATIONAL/NAT2/8998923.shtml",0, +"ɶb@x֥|ijDoi","http://udn.com/NEWS/NATIONAL/NAT2/8621612.shtml",0, +"nɦ~̰3.2%Dɰ]IsI","http://udn.com/NEWS/NATIONAL/NAT2/9126386.shtml",0) +arMenu3 = new Array("װlr","http://udn.com/NEWS/SOCIETY/SOC1/",1, +"N~{","http://udn.com/NEWS/SOCIETY/SOC2/",1, +"Ǹo","http://udn.com/NEWS/SOCIETY/SOC3/",1, +"NxH","http://udn.com/NEWS/SOCIETY/SOC5/",1, +"k߫eu","http://udn.com/NEWS/SOCIETY/SOC6/",1, +"|UH","http://udn.com/NEWS/SOCIETY/SOC7/",1) +arMenu3_1 = new Array("]wvĭ˸ ͵otŧĵj","http://udn.com/NEWS/SOCIETY/SOC1/9127281.shtml",0, +"} EǤ","http://udn.com/NEWS/SOCIETY/SOC1/9127276.shtml",0, +"kh~ҩKgw S{","http://udn.com/NEWS/SOCIETY/SOC1/9127206.shtml",0, +"s˫q LkHE_D","http://udn.com/NEWS/SOCIETY/SOC1/9127192.shtml",0, +"nq Xҳ樮w","http://udn.com/NEWS/SOCIETY/SOC1/9126262.shtml",0) +arMenu3_2 = new Array("iЫǨ| TkY","http://udn.com/NEWS/SOCIETY/SOC2/9127124.shtml",0, +"SХͥp3 æ`䪱A","http://udn.com/NEWS/SOCIETY/SOC2/9127250.shtml",0, +"zaϨ SJӾ","http://udn.com/NEWS/SOCIETY/SOC2/9127070.shtml",0, +"J 24_`","http://udn.com/NEWS/SOCIETY/SOC2/9127210.shtml",0, +"¼qĵNeq tB","http://udn.com/NEWS/SOCIETY/SOC2/9127190.shtml",0, +"򶩥5ӥvĵ ΥDh˴","http://udn.com/NEWS/SOCIETY/SOC2/9127207.shtml",0, +"ètL ⨮@","http://udn.com/NEWS/SOCIETY/SOC2/9127283.shtml",0) +arMenu3_3 = new Array("qHdߦʸU BõLİQ^","http://udn.com/NEWS/SOCIETY/SOC3/9127273.shtml",0, +"TH椣HHL N","http://udn.com/NEWS/SOCIETY/SOC3/9127275.shtml",0, +"G~yk] rʷR","http://udn.com/NEWS/SOCIETY/SOC3/9127168.shtml",0, +"sʫI80 LP3~2","http://udn.com/NEWS/SOCIETY/SOC3/9127053.shtml",0) +arMenu3_4 = new Array("L}\ o@Uz","http://udn.com/NEWS/SOCIETY/SOC5/9127172.shtml",0, +"yUzl Vx","http://udn.com/NEWS/SOCIETY/SOC5/9127024.shtml",0, +"ؤsBХ@ ~Uw","http://udn.com/NEWS/SOCIETY/SOC5/9127069.shtml",0) +arMenu3_5 = new Array("xW󤽮`D^ RCAVGײ׵","http://udn.com/NEWS/SOCIETY/SOC6/9127285.shtml",0, +"Uesͤ` 5͡uOvKLo","http://udn.com/NEWS/SOCIETY/SOC6/9127278.shtml",0, +"n20030K~Na P5~2Ӥ","http://udn.com/NEWS/SOCIETY/SOC6/9127135.shtml",0, +"yѮ~Τw 3Hk","http://udn.com/NEWS/SOCIETY/SOC6/9127201.shtml",0, +"IuR ۲´","http://udn.com/NEWS/SOCIETY/SOC6/9127182.shtml",0, +"A즬 ҮѩdN","http://udn.com/NEWS/SOCIETY/SOC6/9127189.shtml",0, +"dѿҦ L","http://udn.com/NEWS/SOCIETY/SOC6/9127352.shtml",0, +"cwH AFHfU","http://udn.com/NEWS/SOCIETY/SOC6/9127056.shtml",0) +arMenu3_6 = new Array("DHcj }ϴ","http://udn.com/NEWS/SOCIETY/SOC7/9127277.shtml",0, +"R帡 6ԧ","http://udn.com/NEWS/SOCIETY/SOC7/9127058.shtml",0, +"unjdvKѨӤp tbsP","http://udn.com/NEWS/SOCIETY/SOC7/9127279.shtml",0, +"ѾQ}a 90Τ߯k","http://udn.com/NEWS/SOCIETY/SOC7/9127223.shtml",0) +arMenu4 = new Array("xW_m","http://udn.com/NEWS/DOMESTIC/DOM1/",1, +"jx_","http://udn.com/NEWS/DOMESTIC/DOM2/",1, +"˭]","http://udn.com/NEWS/DOMESTIC/DOM3/",1, +"","http://udn.com/NEWS/DOMESTIC/DOM4/",1, +"ūn","http://udn.com/NEWS/DOMESTIC/DOM5/",1, +"q","http://udn.com/NEWS/DOMESTIC/DOM6/",1, +"yF","http://udn.com/NEWS/DOMESTIC/DOM7/",1) +arMenu4_1 = new Array("^q ihGvfܦn","http://udn.com/NEWS/DOMESTIC/DOM1/9127233.shtml",0, +"uQvǵI QƤWh","http://udn.com/NEWS/DOMESTIC/DOM1/9127179.shtml",0, +"vPKƨBoq 15RiPhone","http://udn.com/NEWS/DOMESTIC/DOM1/9127175.shtml",0, +"ɱAvei uvcdH","http://udn.com/NEWS/DOMESTIC/DOM1/9127125.shtml",0, +"L2e mø2000yq","http://udn.com/NEWS/DOMESTIC/DOM1/9127099.shtml",0, +"Dwpڤڰ q","http://udn.com/NEWS/DOMESTIC/DOM1/9127012.shtml",0, +"mø LU_uBv","http://udn.com/NEWS/DOMESTIC/DOM1/9126975.shtml",0) +arMenu4_2 = new Array("x_citϬF","http://udn.com/NEWS/DOMESTIC/DOM2/9127782.shtml",0, +"[\ιJ_ ΨF","http://udn.com/NEWS/DOMESTIC/DOM2/9126998.shtml",0, +"_sF H|GO","http://udn.com/NEWS/DOMESTIC/DOM2/9127237.shtml",0, +"F| Lͤѳq","http://udn.com/NEWS/DOMESTIC/DOM2/9127229.shtml",0, +"Cܸ˭w ͺtoL}","http://udn.com/NEWS/DOMESTIC/DOM2/9127074.shtml",0, +"¤p8~ uBBv}","http://udn.com/NEWS/DOMESTIC/DOM2/9127064.shtml",0, +"LZ uRvۤv","http://udn.com/NEWS/DOMESTIC/DOM2/9127169.shtml",0, +"FRgѪkuǨӪv }ZЧӤu","http://udn.com/NEWS/DOMESTIC/DOM2/9127163.shtml",0, +"зNAmn s_ϼx","http://udn.com/NEWS/DOMESTIC/DOM2/9127021.shtml",0, +"ů40~ 3ܡuKvr","http://udn.com/NEWS/DOMESTIC/DOM2/9127001.shtml",0, +"Хּv _lmXSu","http://udn.com/NEWS/DOMESTIC/DOM2/9126999.shtml",0) +arMenu4_3 = new Array("Naim оǵeXзN","http://udn.com/NEWS/DOMESTIC/DOM3/9127052.shtml",0, +"4̰CϾ oȷf","http://udn.com/NEWS/DOMESTIC/DOM3/9127214.shtml",0, +"j{O ߧ3۸x","http://udn.com/NEWS/DOMESTIC/DOM3/9127040.shtml",0, +"祫ND@ 平ӸO","http://udn.com/NEWS/DOMESTIC/DOM3/9127039.shtml",0, +"˪Fᰪ un@_Wjǡv","http://udn.com/NEWS/DOMESTIC/DOM3/9127180.shtml",0, +"۱jꤤ޼֥y xPXlet it go","http://udn.com/NEWS/DOMESTIC/DOM3/9127050.shtml",0, +"uNvv MjhJٵLê","http://udn.com/NEWS/DOMESTIC/DOM3/9127041.shtml",0, +"~] ǥͰǡuAv","http://udn.com/NEWS/DOMESTIC/DOM3/9127188.shtml",0, +"swBwծռy 24HOUǪ","http://udn.com/NEWS/DOMESTIC/DOM3/9127186.shtml",0, +"ƪOB樮BK TS̭nx3","http://udn.com/NEWS/DOMESTIC/DOM3/9127044.shtml",0) +arMenu4_4 = new Array("kĪ@KQij","http://udn.com/NEWS/DOMESTIC/DOM4/9127048.shtml",0, +"XuT LsGNyz","http://udn.com/NEWS/DOMESTIC/DOM4/9127171.shtml",0, +"Ƶoꪫ z1H2d","http://udn.com/NEWS/DOMESTIC/DOM4/9127274.shtml",0, +"Ƭʫʸ DwPN~i","http://udn.com/NEWS/DOMESTIC/DOM4/9127128.shtml",0, +"bbkqĵ 33x]X","http://udn.com/NEWS/DOMESTIC/DOM4/9127126.shtml",0) +arMenu4_5 = new Array("Mw _xn","http://udn.com/NEWS/DOMESTIC/DOM5/9127280.shtml",0, +"yj uRvܪ","http://udn.com/NEWS/DOMESTIC/DOM5/9127284.shtml",0, +"uqO ~պ","http://udn.com/NEWS/DOMESTIC/DOM5/9127282.shtml",0, +"nӧ4sQ 6","http://udn.com/NEWS/DOMESTIC/DOM5/9127102.shtml",0, +"ijǡK Pxvն}ei","http://udn.com/NEWS/DOMESTIC/DOM5/9127096.shtml",0, +"j¿ Fvͭ","http://udn.com/NEWS/DOMESTIC/DOM5/9127191.shtml",0, +"֫1300~ȤѤW 椻@","http://udn.com/NEWS/DOMESTIC/DOM5/9127174.shtml",0, +"tŤdU L{uůMHv","http://udn.com/NEWS/DOMESTIC/DOM5/9127177.shtml",0) +arMenu4_6 = new Array("Q^LH ǿ","http://udn.com/NEWS/DOMESTIC/DOM6/9127071.shtml",0, +"ȡBq jnV","http://udn.com/NEWS/DOMESTIC/DOM6/9127219.shtml",0, +"}i }jMR","http://udn.com/NEWS/DOMESTIC/DOM6/9127066.shtml",0, +"~20~P ӸU{Ѻ","http://udn.com/NEWS/DOMESTIC/DOM6/9127068.shtml",0, +"U` ֮q","http://udn.com/NEWS/DOMESTIC/DOM6/9127037.shtml",0) +arMenu4_7 = new Array("pX YإD","http://udn.com/NEWS/DOMESTIC/DOM7/9127240.shtml",0, +"xxFwcPqD jpi","http://udn.com/NEWS/DOMESTIC/DOM7/9127199.shtml",0, +"ϳзNmø {","http://udn.com/NEWS/DOMESTIC/DOM7/9127195.shtml",0, +"iܼҫ ǮըYN","http://udn.com/NEWS/DOMESTIC/DOM7/9127028.shtml",0, +"@ɤѤ媾 jǪγsu","http://udn.com/NEWS/DOMESTIC/DOM7/9127022.shtml",0, +"uAŲ y34a~̤J","http://udn.com/NEWS/DOMESTIC/DOM7/9127241.shtml",0, +"ooΨm p]w@n","http://udn.com/NEWS/DOMESTIC/DOM7/9126979.shtml",0, +"mnֹΫ f","http://udn.com/NEWS/DOMESTIC/DOM7/9126977.shtml",0, +"BA۰ tӿ찪","http://udn.com/NEWS/DOMESTIC/DOM7/9126973.shtml",0, +"fylƥ s~10ӦWB","http://udn.com/NEWS/DOMESTIC/DOM7/9127263.shtml",0, +"nżK ënju{S","http://udn.com/NEWS/DOMESTIC/DOM7/9127228.shtml",0) +arMenu5 = new Array("Dwв","http://udn.com/NEWS/MAINLAND/AD1/",1, +"⩤nD","http://udn.com/NEWS/MAINLAND/MAI1/",1, +"ǯu","http://udn.com/NEWS/MAINLAND/MAI2/",1, +"⩤gT","http://udn.com/NEWS/MAINLAND/MAI3/",1, +"ѥ","http://udn.com/NEWS/MAINLAND/MAIN3/",1, +"xӱ","http://udn.com/NEWS/MAINLAND/MAI4/",1) +arMenu5_1 = new Array("DCI~ʩШg","http://udn.com/NEWS/MAINLAND/AD1/9097088.shtml",0, +"䭺IixDw\wؤH","http://udn.com/NEWS/MAINLAND/AD1/9097087.shtml",0, +"Dw򲣵|ǧADK","http://udn.com/NEWS/MAINLAND/AD1/9097066.shtml",0, +"ʦ~ܭAqZڷQ","http://udn.com/NEWS/MAINLAND/AD1/9097065.shtml",0, +"vצaADjQȩЦav","http://udn.com/NEWS/MAINLAND/AD1/9097064.shtml",0) +arMenu5_2 = new Array("|XxF ߩeuTv","http://udn.com/NEWS/MAINLAND/MAI1/9127034.shtml",0, +"ed jun_աvuҥ","http://udn.com/NEWS/MAINLAND/MAI1/9127326.shtml",0, +"uڤv Bion","http://udn.com/NEWS/MAINLAND/MAI1/9125935.shtml",0, +"eM e249Huڭ̱N^ӡIv","http://udn.com/NEWS/MAINLAND/MAI1/9126237.shtml",0, +"eMĵ½ ߸@װ","http://udn.com/NEWS/MAINLAND/MAI1/9125909.shtml",0, +"Ϧ@߳A ^㭻uīGv","http://udn.com/NEWS/MAINLAND/MAI1/9126239.shtml",0, +"ͬQQ","http://udn.com/NEWS/MAINLAND/MAI1/9127328.shtml",0, +"ne¥PxWҰsT","http://udn.com/NEWS/MAINLAND/MAI1/9117264.shtml",0, +"nxӧQ ̧C8","http://udn.com/NEWS/MAINLAND/MAI1/9102025.shtml",0) +arMenu5_3 = new Array("QjxBwѼũj ZҨ","http://udn.com/NEWS/MAINLAND/MAI2/9127337.shtml",0, +"niI82 4000̸","http://udn.com/NEWS/MAINLAND/MAI2/9125954.shtml",0, +"hڤD@ ͱujRv","http://udn.com/NEWS/MAINLAND/MAI2/9125951.shtml",0, +"uoۭvϱ gqu}v3","http://udn.com/NEWS/MAINLAND/MAI2/9125952.shtml",0, +"nߡIѰ |qubp","http://udn.com/NEWS/MAINLAND/MAI2/9125953.shtml",0, +"qɵuTF1v af","http://udn.com/NEWS/MAINLAND/MAI2/9124984.shtml",0, +"ڤƳзN~| ѥ_ʷs","http://udn.com/NEWS/MAINLAND/MAI2/9124949.shtml",0, +"nk koi~Ĥ@","http://udn.com/NEWS/MAINLAND/MAI2/9111214.shtml",0) +arMenu5_4 = new Array("Ѥ@PQ^R Wұrޤp","http://udn.com/NEWS/MAINLAND/MAI3/9127657.shtml",0, +"u~w gٴt","http://udn.com/NEWS/MAINLAND/MAI3/9127083.shtml",0, +"H Ȧ~`2","http://udn.com/NEWS/MAINLAND/MAI3/9127085.shtml",0, +"wʡG⩤X@ vOUP","http://udn.com/NEWS/MAINLAND/MAI3/9127095.shtml",0, +"]G 詼","http://udn.com/NEWS/MAINLAND/MAI3/9127098.shtml",0, +"DȬwI UŸ","http://udn.com/NEWS/MAINLAND/MAI3/9127151.shtml",0, +"LзsO yNqӫҰ","http://udn.com/NEWS/MAINLAND/MAI3/9127152.shtml",0, +"I_ iIO","http://udn.com/NEWS/MAINLAND/MAI3/9127165.shtml",0, +"ne¥PxWҰsT","http://udn.com/NEWS/MAINLAND/MAI3/9117265.shtml",0) +arMenu5_5 = new Array("ѤӤx議 sت@ѥ|ĵ","http://udn.com/NEWS/MAINLAND/MAIN3/9127164.shtml",0, +"ʭuIPO Ҹ14","http://udn.com/NEWS/MAINLAND/MAIN3/9127077.shtml",0, +"UFNW ȤW1.5","http://udn.com/NEWS/MAINLAND/MAIN3/9127078.shtml",0) +arMenu5_6 = new Array(" }xӧ","http://udn.com/NEWS/MAINLAND/MAI4/9124982.shtml",0, +"K| xW§P","http://udn.com/NEWS/MAINLAND/MAI4/9124983.shtml",0, +"@a@K s䦨uFYv","http://udn.com/NEWS/MAINLAND/MAI4/9124947.shtml",0, +"W۶T CѸT adӾ","http://udn.com/NEWS/MAINLAND/MAI4/9124942.shtml",0, +"I_10~bK @MФlI","http://udn.com/NEWS/MAINLAND/MAI4/9124948.shtml",0, +"85C W}Xĥ","http://udn.com/NEWS/MAINLAND/MAI4/9125018.shtml",0, +"xWK|ӫ~ NЭ","http://udn.com/NEWS/MAINLAND/MAI4/9125014.shtml",0) +arMenu6 = new Array("Х걡","http://udn.com/NEWS/WORLD/AD2/",1, +"||","http://udn.com/NEWS/WORLD/WOR1/",1, +"ڵJI","http://udn.com/NEWS/WORLD/WOR3/",1, +"_Dn","http://udn.com/NEWS/WORLD/WOR7/",1, +"ڰ]g","http://udn.com/NEWS/WORLD/WOR2/",1, +"ڸUH","http://udn.com/NEWS/WORLD/WOR4/",1, +"sD","http://udn.com/NEWS/WORLD/WOR6/",1, +"Ygu","http://udn.com/NEWS/WORLD/WORS2/",1, +"yD","http://udn.com/NEWS/WORLD/OUT/",1) +arMenu6_1 = new Array("YWȡAqԱڸm֭I","http://udn.com/NEWS/WORLD/AD2/9116434.shtml",0, +"nxWХíAЪ","http://udn.com/NEWS/WORLD/AD2/9116433.shtml",0, +"QsuqAл½I","http://udn.com/NEWS/WORLD/AD2/9116412.shtml",0, +"鴣eAХhU","http://udn.com/NEWS/WORLD/AD2/9116293.shtml",0, +"nnqoiAPѼW","http://udn.com/NEWS/WORLD/AD2/9116291.shtml",0) +arMenu6_2 = new Array("wtܥg Ƚwﭲ","http://udn.com/NEWS/WORLD/WOR1/9127094.shtml",0, +"w@ӿ Х|high","http://udn.com/NEWS/WORLD/WOR1/9127089.shtml",0, +"ֶJMFvNP G饻W[~","http://udn.com/NEWS/WORLD/WOR1/9127086.shtml",0) +arMenu6_3 = new Array("aHgG xmQvXǡI","http://udn.com/NEWS/WORLD/WOR3/9127766.shtml",0, +"xҩdDh xQAXZ","http://udn.com/NEWS/WORLD/WOR3/9127772.shtml",0, +"Zׯf Z~","http://udn.com/NEWS/WORLD/WOR3/9127773.shtml",0, +"ȷSo_ʡH ЩvרF","http://udn.com/NEWS/WORLD/WOR3/9127333.shtml",0, +"xVcjl nL","http://udn.com/NEWS/WORLD/WOR3/9126850.shtml",0, +"ګعBe [ԥʥܫ¡uuJv","http://udn.com/NEWS/WORLD/WOR3/9125902.shtml",0, +"F[[}tĬ 2","http://udn.com/NEWS/WORLD/WOR3/9125934.shtml",0, +"ܫ43 e`ΡG|ᮬ","http://udn.com/NEWS/WORLD/WOR3/9125901.shtml",0, +"LƵجuްʶávQT","http://udn.com/NEWS/WORLD/WOR3/9125933.shtml",0, +"ݧԥ_IIΨܾ ٨ͤƥզѹ","http://udn.com/NEWS/WORLD/WOR3/9125984.shtml",0, +"ns_jPAХois","http://udn.com/NEWS/WORLD/WOR3/8611697.shtml",0, +"nPorsche Macan mH","http://udn.com/NEWS/WORLD/WOR3/9118781.shtml",0, +"nmȬwӾ ufĹ","http://udn.com/NEWS/WORLD/WOR3/9102024.shtml",0) +arMenu6_4 = new Array("Ls5UӵwKȦʭ[Zƿ","http://udn.com/NEWS/WORLD/WOR7/9126990.shtml",0, +"WޡIĤ@ݨMLjf kHmHK","http://udn.com/NEWS/WORLD/WOR7/9126300.shtml",0, +"pCסK uvܡuvv","http://udn.com/NEWS/WORLD/WOR7/9126195.shtml",0, +"ߤG5kT` PD35~","http://udn.com/NEWS/WORLD/WOR7/9126036.shtml",0, +"2500~uqlvD} }kMiK","http://udn.com/NEWS/WORLD/WOR7/9125993.shtml",0, +"Ҭkͦus LoV͡uhv","http://udn.com/NEWS/WORLD/WOR7/9125887.shtml",0, +"̴ΪP§ICS̷dRvƶ","http://udn.com/NEWS/WORLD/WOR7/9125822.shtml",0, +"Φb餺u@ǡv4~ `kl}~","http://udn.com/NEWS/WORLD/WOR7/9125773.shtml",0, +"@ɬ60~ ̶̥jǪجOK","http://udn.com/NEWS/WORLD/WOR7/9125715.shtml",0) +arMenu6_5 = new Array("dF iڬwQ","http://udn.com/NEWS/WORLD/WOR2/9127705.shtml",0, +"C~ 1~Y^450","http://udn.com/NEWS/WORLD/WOR2/9127706.shtml",0, +"kūHžD","http://udn.com/NEWS/WORLD/WOR2/9127708.shtml",0, +"Lh@P^U","http://udn.com/NEWS/WORLD/WOR2/9127707.shtml",0, +"īGwJ Įɳ~׭H","http://udn.com/NEWS/WORLD/WOR2/9127130.shtml",0, +"īG800汼10% ᮬ","http://udn.com/NEWS/WORLD/WOR2/9127202.shtml",0, +"ڵSGQڵ OڤHͪI","http://udn.com/NEWS/WORLD/WOR2/9126860.shtml",0, +"uMRInn DsФq","http://udn.com/NEWS/WORLD/WOR2/9127136.shtml",0, +"ЧIJ ijDZJ","http://udn.com/NEWS/WORLD/WOR2/9127138.shtml",0, +"oY+IEAU׻ݨDKڬѮ c","http://udn.com/NEWS/WORLD/WOR2/9127161.shtml",0, +"yoɶ^3 ֥eKyHֺGH","http://udn.com/NEWS/WORLD/WOR2/9125739.shtml",0, +"nɦ~̰3.2%Dɰ]IsI","http://udn.com/NEWS/WORLD/WOR2/9126392.shtml",0) +arMenu6_6 = new Array("2014饻~׺~rG|","http://udn.com/NEWS/WORLD/WOR4/9127335.shtml",0, +"oq ~Ͳ෽","http://udn.com/NEWS/WORLD/WOR4/9127409.shtml",0, +"Gƥ |DpuSЦnkv","http://udn.com/NEWS/WORLD/WOR4/9127339.shtml",0, +"tѲV H","http://udn.com/NEWS/WORLD/WOR4/9126852.shtml",0, +"˶ǻ ƯSǤƦWèL","http://udn.com/NEWS/WORLD/WOR4/9126853.shtml",0, +"qjQhk 򰪧ѦWeҦv","http://udn.com/NEWS/WORLD/WOR4/9126950.shtml",0, +"ְë 㺸yjSѰ","http://udn.com/NEWS/WORLD/WOR4/9126885.shtml",0, +"ʪuޡvJ i]@","http://udn.com/NEWS/WORLD/WOR4/9125807.shtml",0, +"fmӳQF yPvpl׹","http://udn.com/NEWS/WORLD/WOR4/9125804.shtml",0, +"ne¥PxWҰsT","http://udn.com/NEWS/WORLD/WOR4/9117266.shtml",0) +arMenu6_7 = new Array("դHBּƱڸ ]Itܤj","http://udn.com/NEWS/WORLD/WOR6/9127783.shtml",0, +"n6KtISFa","http://udn.com/NEWS/WORLD/WOR6/9127784.shtml",0, +"îɡG25-54kʵL~̤h","http://udn.com/NEWS/WORLD/WOR6/9126949.shtml",0, +"H 18%HG@ͭtM","http://udn.com/NEWS/WORLD/WOR6/9126162.shtml",0, +"gٴd[ HsġuXYv","http://udn.com/NEWS/WORLD/WOR6/9126339.shtml",0, +"襤Tft ॢ320Uu@","http://udn.com/NEWS/WORLD/WOR6/9126164.shtml",0, +"۴N~ 겾魥","http://udn.com/NEWS/WORLD/WOR6/9126341.shtml",0, +"_[{jB ʪߪx","http://udn.com/NEWS/WORLD/WOR6/9126340.shtml",0, +"¦{ij|U XeHɪŽn","http://udn.com/NEWS/WORLD/WOR6/9126855.shtml",0, +"UĶR i6j","http://udn.com/NEWS/WORLD/WOR6/9127134.shtml",0, +"1.1w 򲳰|qL","http://udn.com/NEWS/WORLD/WOR6/9127170.shtml",0, +"2051Hf}4 32a","http://udn.com/NEWS/WORLD/WOR6/9126463.shtml",0) +arMenu6_8 = new Array("~}a MDp","http://udn.com/NEWS/WORLD/WORS2/9125320.shtml",0, +"ڮBeX","http://udn.com/NEWS/WORLD/WORS2/9124755.shtml",0, +"LX@","http://udn.com/NEWS/WORLD/WORS2/9124048.shtml",0, +"fLCϥ","http://udn.com/NEWS/WORLD/WORS2/9122442.shtml",0, +"@MӪŸ T~","http://udn.com/NEWS/WORLD/WORS2/9120194.shtml",0, +"","http://udn.com/NEWS/WORLD/WORS2/9114845.shtml",0, +"nIfa","http://udn.com/NEWS/WORLD/WORS2/9114858.shtml",0, +"y§","http://udn.com/NEWS/WORLD/WORS2/9114859.shtml",0, +"nСIժQ","http://udn.com/NEWS/WORLD/WORS2/9114856.shtml",0, +"۩Iyؽ","http://udn.com/NEWS/WORLD/WORS2/9114855.shtml",0, +"AOQk","http://udn.com/NEWS/WORLD/WORS2/9114864.shtml",0) +arMenu6_9 = new Array("ĬնQ[IūǮ֨ӱHD","http://udn.com/NEWS/WORLD/OUT/9124577.shtml",0, +"ıyHMl","http://udn.com/NEWS/WORLD/OUT/9124578.shtml",0, +"o@^oʥ@ UQ","http://udn.com/NEWS/WORLD/OUT/9119145.shtml",0, +"Pظ[I֤}","http://udn.com/NEWS/WORLD/OUT/9115208.shtml",0) +arMenu7 = new Array("udnH","http://udn.com/NEWS/OPINION/OPI3/",1, +"","http://udn.com/NEWS/OPINION/OPI1/",1, +"N׾","http://udn.com/NEWS/OPINION/X1/",1, +"pXWH","http://udn.com/NEWS/OPINION/OPI4/",1, +"pXn","http://udn.com/NEWS/OPINION/OPI2/",1, +"CWHBlogs","http://udn.com/NEWS/OPINION/OUT2/",1, +"ȶ}","http://udn.com/NEWS/OPINION/OUT1/",1) +arMenu7_1 = new Array("H󭺭n","http://udn.com/NEWS/OPINION/OPI3/9104784.shtml",0, +"Oǡ{OpwDI","http://udn.com/NEWS/OPINION/OPI3/9126316.shtml",0, +"{yƤUuvt","http://udn.com/NEWS/OPINION/OPI3/9126034.shtml",0, +"J}լO̦MIC","http://udn.com/NEWS/OPINION/OPI3/9125485.shtml",0, +"ֿġӤӺަWHUbH","http://udn.com/NEWS/OPINION/OPI3/9124261.shtml",0, +"ŮԪFKsDu|u~OvܡH","http://udn.com/NEWS/OPINION/OPI3/9124037.shtml",0, +"w@wnLHñWܡH","http://udn.com/NEWS/OPINION/OPI3/9124036.shtml",0, +"TW߯SuAxWٷ||̶ܡH","http://udn.com/NEWS/OPINION/OPI3/9123664.shtml",0, +"`nǪv}ۤv","http://udn.com/NEWS/OPINION/OPI3/9122109.shtml",0, +"yݥΥ~ҡAxWNqѤHqܥqH","http://udn.com/NEWS/OPINION/OPI3/9122098.shtml",0, +"ֿġ_y߷|O_PSsH","http://udn.com/NEWS/OPINION/OPI3/9121183.shtml",0) +arMenu7_2 = new Array("̤pܰʤզp󭱹̤jܰʬF","http://udn.com/NEWS/OPINION/OPI1/9127260.shtml",0, +"߷|򥻱w","http://udn.com/NEWS/OPINION/OPI1/9127261.shtml",0, +"_P{H gFvCWh","http://udn.com/NEWS/OPINION/OPI1/9127208.shtml",0, +"q׾ ݥiҪӾ","http://udn.com/NEWS/OPINION/OPI1/9127754.shtml",0) +arMenu7_3 = new Array("ĥ|׭R ը_ڡH","http://udn.com/NEWS/OPINION/X1/9127332.shtml",0, +"gB AA]uUF","http://udn.com/NEWS/OPINION/X1/9127323.shtml",0, +"׾ˡ2016 ijD","http://udn.com/NEWS/OPINION/X1/9127336.shtml",0, +"߭ۦҥDu ڴݡI","http://udn.com/NEWS/OPINION/X1/9127338.shtml",0, +"½îæ DbRĥ","http://udn.com/NEWS/OPINION/X1/9127334.shtml",0, +"pXOv諸OT","http://udn.com/NEWS/OPINION/X1/9127325.shtml",0, +"פy pGoͦbK","http://udn.com/NEWS/OPINION/X1/9127324.shtml",0, +"_yK 󭫴H","http://udn.com/NEWS/OPINION/X1/9127341.shtml",0, +" DpNnH","http://udn.com/NEWS/OPINION/X1/9127340.shtml",0, +"Pzﭺ̰i}ܶܡH","http://udn.com/NEWS/OPINION/X1/9114487.shtml",0, +"WaaעuQvJR","http://udn.com/NEWS/OPINION/X1/9114485.shtml",0) +arMenu7_4 = new Array("Y_͡FBFvHBFBFv","http://udn.com/NEWS/OPINION/OPI4/9127329.shtml",0, +"xpT槽 p󦨤j","http://udn.com/NEWS/OPINION/OPI4/9125296.shtml",0, +"ءuiHvANuӡv","http://udn.com/NEWS/OPINION/OPI4/9123111.shtml",0, +"P@Ш||","http://udn.com/NEWS/OPINION/OPI4/9120723.shtml",0, +"͡qբww`Ϊ̫@i","http://udn.com/NEWS/OPINION/OPI4/9118304.shtml",0, +"B۪߭ҥ","http://udn.com/NEWS/OPINION/OPI4/9116113.shtml",0, +"U@BNOaV","http://udn.com/NEWS/OPINION/OPI4/9114525.shtml",0) +arMenu7_5 = new Array("}Sjph","http://udn.com/NEWS/OPINION/OPI2/9126781.shtml",0, +"IPϡGKPnܶ","http://udn.com/NEWS/OPINION/OPI2/9124744.shtml",0, +"}ͪo","http://udn.com/NEWS/OPINION/OPI2/9122709.shtml",0, +"ֿڦVU@@NƬF","http://udn.com/NEWS/OPINION/OPI2/9120795.shtml",0, +"hΤ~]p","http://udn.com/NEWS/OPINION/OPI2/9118028.shtml",0, +"l˳ݤѦZ̪L op","http://udn.com/NEWS/OPINION/OPI2/9115976.shtml",0, +"FxBҨ @I]嫬","http://udn.com/NEWS/OPINION/OPI2/9114249.shtml",0) +arMenu7_6 = new Array("mFvWHBlogsn","http://udn.com/NEWS/OPINION/OUT2/8839858.shtml",0, +"f{lFIĪGuv","http://udn.com/NEWS/OPINION/OUT2/9125806.shtml",0, +"Ӵfi NgUbaG","http://udn.com/NEWS/OPINION/OUT2/9121263.shtml",0, +"mjCBlogsn","http://udn.com/NEWS/OPINION/OUT2/7068437.shtml",0, +"DangernFFoD uOk~l","http://udn.com/NEWS/OPINION/OUT2/9125805.shtml",0, +"ȥߪ񥭧ﭲ 𤤵ؤƥy","http://udn.com/NEWS/OPINION/OUT2/9125803.shtml",0, +"whitekHMerry Xmas ڪp§U","http://udn.com/NEWS/OPINION/OUT2/9125797.shtml",0, +"{pOWƨ§ФMDd","http://udn.com/NEWS/OPINION/OUT2/9125796.shtml",0, +"ȡߨ઺ĭ&Snooby's }ߥ@","http://udn.com/NEWS/OPINION/OUT2/9125795.shtml",0, +"Ӷvgl{q","http://udn.com/NEWS/OPINION/OUT2/9121262.shtml",0, +"dqǯٯuۼ","http://udn.com/NEWS/OPINION/OUT2/9121260.shtml",0) +arMenu7_7 = new Array("ӶkiogZܡH߮viDA","http://udn.com/NEWS/OPINION/OUT1/9125794.shtml",0, +"vWK tʮ毻P۷","http://udn.com/NEWS/OPINION/OUT1/9125793.shtml",0, +"үfçHjᤣú|o˹","http://udn.com/NEWS/OPINION/OUT1/9125792.shtml",0, +"xWqOӽխH","http://udn.com/NEWS/OPINION/OUT1/9125791.shtml",0, +"fqѱϫj~","http://udn.com/NEWS/OPINION/OUT1/9125790.shtml",0, +"ڭ̪FO]jsܡH","http://udn.com/NEWS/OPINION/OUT1/9125788.shtml",0, +"C~ ۳¤pƷnD","http://udn.com/NEWS/OPINION/OUT1/9125787.shtml",0, +"v󤣩Zۻ{H|}ʥXH","http://udn.com/NEWS/OPINION/OUT1/9125786.shtml",0, +"ӶkP_n IO۫HI","http://udn.com/NEWS/OPINION/OUT1/9125785.shtml",0, +"xWQ̿Ѿi~HoۨH","http://udn.com/NEWS/OPINION/OUT1/9125784.shtml",0) +arMenu8 = new Array("ЦaIR","http://udn.com/NEWS/FINANCE/AD1/",1, +"pX]g","http://udn.com/NEWS/FINANCE/X1/",1, +"]gJI","http://udn.com/NEWS/FINANCE/FIN1/",1, +"޲~","http://udn.com/NEWS/FINANCE/FIN3/",1, +"ĭnD","http://udn.com/NEWS/FINANCE/FIN4/",1, +"|Ȫk","http://udn.com/NEWS/FINANCE/FIN10/",1, +"~X","http://udn.com/NEWS/FINANCE/FIN9/",1, +"ӷ~","http://udn.com/NEWS/FINANCE/FIN11/",1, +"]gH","http://udn.com/NEWS/FINANCE/FIN12/",1) +arMenu8_1 = new Array("ijA[5%?wBsαNU","http://udn.com/NEWS/FINANCE/AD1/8758199.shtml",0, +"sƳ߳í?~jGI","http://udn.com/NEWS/FINANCE/AD1/8758198.shtml",0, +"خ׾PJ~V ijŶܤj","http://udn.com/NEWS/FINANCE/AD1/8758197.shtml",0, +"ga л|U^?","http://udn.com/NEWS/FINANCE/AD1/8758195.shtml",0, +"O@Х ޷|:ﵦw","http://udn.com/NEWS/FINANCE/AD1/8758194.shtml",0) +arMenu8_2 = new Array("ꤺ~]gWa }ygͶ","http://udn.com/NEWS/FINANCE/X1/8774253.shtml",0, +"Ҩ饫 xߵBӾ","http://udn.com/NEWS/FINANCE/X1/8774258.shtml",0, +"лHݤj@RХ","http://udn.com/NEWS/FINANCE/X1/8774254.shtml",0, +"Bƾڤ@ ꪺ̨Τu","http://udn.com/NEWS/FINANCE/X1/8775972.shtml",0, +"sDu O̳A","http://udn.com/NEWS/FINANCE/X1/8774255.shtml",0) +arMenu8_3 = new Array("ҤuȭW ~ϭ","http://udn.com/NEWS/FINANCE/FIN1/9127776.shtml",0, +"u~L׸ꥻ Ҥutv","http://udn.com/NEWS/FINANCE/FIN1/9127777.shtml",0, +"sy~ ~+2.86%","http://udn.com/NEWS/FINANCE/FIN1/9127654.shtml",0, +"qT ~1.69","http://udn.com/NEWS/FINANCE/FIN1/9127664.shtml",0, +"p U@Ů","http://udn.com/NEWS/FINANCE/FIN1/9127656.shtml",0, +"}Gq^X ~e","http://udn.com/NEWS/FINANCE/FIN1/9127139.shtml",0, +"ITA 2w ưO","http://udn.com/NEWS/FINANCE/FIN1/9127218.shtml",0, +"}FTAê aouU_͡v","http://udn.com/NEWS/FINANCE/FIN1/9127220.shtml",0, +"ITA 2ͧPY EGX]JC","http://udn.com/NEWS/FINANCE/FIN1/9127221.shtml",0, +"g٧i׾ UPn","http://udn.com/NEWS/FINANCE/FIN1/9126883.shtml",0, +"^K BЦpͥyͶ","http://udn.com/NEWS/FINANCE/FIN1/9126774.shtml",0, +"]gsD g٤|","http://udn.com/NEWS/FINANCE/FIN1/9127142.shtml",0, +"nF״xd Lз~so easyI","http://udn.com/NEWS/FINANCE/FIN1/9104161.shtml",0, +"nyOȬwΦqJmx","http://udn.com/NEWS/FINANCE/FIN1/9086794.shtml",0, +"n`JF󥫳 Wɾ̧C8","http://udn.com/NEWS/FINANCE/FIN1/9102021.shtml",0) +arMenu8_4 = new Array("TP14`̧벣 Dԥxn","http://udn.com/NEWS/FINANCE/FIN3/9127150.shtml",0, +"xn_l tZNYp","http://udn.com/NEWS/FINANCE/FIN3/9127153.shtml",0, +"qGspW","http://udn.com/NEWS/FINANCE/FIN3/9127147.shtml",0, +"TжϪžUPʤu sطsѦa","http://udn.com/NEWS/FINANCE/FIN3/9127148.shtml",0, +"IdL׼t զAX","http://udn.com/NEWS/FINANCE/FIN3/9127154.shtml",0, +"LnU _w","http://udn.com/NEWS/FINANCE/FIN3/9127156.shtml",0, +"]g[I4GɥNзsA ʹqlѬݦn","http://udn.com/NEWS/FINANCE/FIN3/9126911.shtml",0, +"xW ʻʹܫa","http://udn.com/NEWS/FINANCE/FIN3/9127162.shtml",0, +"O3 yG~ݩ","http://udn.com/NEWS/FINANCE/FIN3/9126101.shtml",0, +"ӶϲקP hȩȡBq","http://udn.com/NEWS/FINANCE/FIN3/9126099.shtml",0) +arMenu8_5 = new Array("~ץX xaqS","http://udn.com/NEWS/FINANCE/FIN4/9127215.shtml",0, +"IG~g٩馨4%","http://udn.com/NEWS/FINANCE/FIN4/9127110.shtml",0, +"xW~gټW4.3% ̧Q3ɮ","http://udn.com/NEWS/FINANCE/FIN4/9127111.shtml",0, +"ķ~~ ̰̭Ӥ","http://udn.com/NEWS/FINANCE/FIN4/9127113.shtml",0, +"Ȯ xs]S۫H","http://udn.com/NEWS/FINANCE/FIN4/9127117.shtml",0, +"Ȥu|G]z {P","http://udn.com/NEWS/FINANCE/FIN4/9127121.shtml",0, +"ػȼx~ _~հ","http://udn.com/NEWS/FINANCE/FIN4/9126878.shtml",0, +"ķ~}ǥʹ","http://udn.com/NEWS/FINANCE/FIN4/9127302.shtml",0, +"]GĤTI ij","http://udn.com/NEWS/FINANCE/FIN4/9127331.shtml",0, +"WӹqlB9105 ִT׬12.16%","http://udn.com/NEWS/FINANCE/FIN4/9126126.shtml",0, +"nɦ~̰3.2%Dɰ]IsI","http://udn.com/NEWS/FINANCE/FIN4/9126395.shtml",0) +arMenu8_6 = new Array("LB׽͵| ӧN","http://udn.com/NEWS/FINANCE/FIN10/9127216.shtml",0, +"ЦaX@| _BP]O","http://udn.com/NEWS/FINANCE/FIN10/9124996.shtml",0, +"IЦaX@ Х~Gȭ˳~","http://udn.com/NEWS/FINANCE/FIN10/9124998.shtml",0, +"|ȧְTúӳ O|24","http://udn.com/NEWS/FINANCE/FIN10/9125002.shtml",0, +"|Ȱݵtվlɲ Gn","http://udn.com/NEWS/FINANCE/FIN10/9125000.shtml",0) +arMenu8_7 = new Array("૬[ ˤl~sŮ","http://udn.com/NEWS/FINANCE/FIN9/9126868.shtml",0, +"UzաKШ|P _|d","http://udn.com/NEWS/FINANCE/FIN9/9126871.shtml",0, +"~C j¾঳e","http://udn.com/NEWS/FINANCE/FIN9/9126874.shtml",0, +"ʪBذӵ Oл","http://udn.com/NEWS/FINANCE/FIN9/9126882.shtml",0, +"xWjhSGS","http://udn.com/NEWS/FINANCE/FIN9/9127114.shtml",0, +"Ψm rJZ","http://udn.com/NEWS/FINANCE/FIN9/9127160.shtml",0, +"axsQ Lj̧֩~3Xf","http://udn.com/NEWS/FINANCE/FIN9/9126134.shtml",0, +"OP ~si","http://udn.com/NEWS/FINANCE/FIN9/9126130.shtml",0, +"e~Nu n^L","http://udn.com/NEWS/FINANCE/FIN9/9126112.shtml",0, +"^_12 xWөuf","http://udn.com/NEWS/FINANCE/FIN9/9126117.shtml",0, +"ne¥PxWҰsT","http://udn.com/NEWS/FINANCE/FIN9/9117267.shtml",0) +arMenu8_8 = new Array("ȦtīaäWï] C䴰hn","http://udn.com/NEWS/FINANCE/FIN11/9124975.shtml",0, +"LGTǻȦ AȪr𳻺ݫȤ","http://udn.com/NEWS/FINANCE/FIN11/9124976.shtml",0, +"ǰs PIJVȬw","http://udn.com/NEWS/FINANCE/FIN11/9124970.shtml",0) +arMenu8_9 = new Array("d yѤɳ߮","http://udn.com/NEWS/FINANCE/FIN12/9125112.shtml",0, +"u@˪kHv ^ang","http://udn.com/NEWS/FINANCE/FIN12/9125216.shtml",0, +"~ȸۤ@b ^anGe}","http://udn.com/NEWS/FINANCE/FIN12/9125307.shtml",0, +"xuv HyʪloзN","http://udn.com/NEWS/FINANCE/FIN12/9125158.shtml",0, +"lGܥ@ɪOqb䶫","http://udn.com/NEWS/FINANCE/FIN12/9124797.shtml",0, +"L֬P yʬɥxn","http://udn.com/NEWS/FINANCE/FIN12/9115452.shtml",0, +"n͡u򥻥\v q@J}l","http://udn.com/NEWS/FINANCE/FIN12/9115880.shtml",0, +"߫jȤjǥ͡Gۤv","http://udn.com/NEWS/FINANCE/FIN12/9123056.shtml",0, +"ǥXgz uзs","http://udn.com/NEWS/FINANCE/FIN12/9122769.shtml",0, +"h 30~a","http://udn.com/NEWS/FINANCE/FIN12/9115630.shtml",0) +arMenu9 = new Array("Х걡","http://udn.com/NEWS/STOCK/AD1/",1, +"ѥnD","http://udn.com/NEWS/STOCK/STO2/",1, +"Wql","http://udn.com/NEWS/STOCK/STO3/",1, +"Wq","http://udn.com/NEWS/STOCK/STO4/",1, +"YW","http://udn.com/NEWS/STOCK/STO5/",1, +"vҴf","http://udn.com/NEWS/STOCK/STO6/",1, +"Х","http://udn.com/NEWS/STOCK/ST08/",1, +"C]p","http://udn.com/NEWS/STOCK/STO9/",1) +arMenu9_1 = new Array("p]nBvIݨDX","http://udn.com/NEWS/STOCK/AD1/8455007.shtml",0, +"[tﭲAХ^u","http://udn.com/NEWS/STOCK/AD1/8455008.shtml",0, +"YɾAC`pv٤","http://udn.com/NEWS/STOCK/AD1/8455009.shtml",0, +"g١IA","http://udn.com/NEWS/STOCK/AD1/8455010.shtml",0, +"xɧUAYzI","http://udn.com/NEWS/STOCK/AD1/8455011.shtml",0) +arMenu9_2 = new Array("¦PF UPx񫨵","http://udn.com/NEWS/STOCK/STO2/9127764.shtml",0, +"Χ@bKҰIF","http://udn.com/NEWS/STOCK/STO2/9127698.shtml",0, +"W@P콦KNNV","http://udn.com/NEWS/STOCK/STO2/9127699.shtml",0, +"15ɴuP N","http://udn.com/NEWS/STOCK/STO2/9127158.shtml",0, +"Hl 10ɤpѤW","http://udn.com/NEWS/STOCK/STO2/9126903.shtml",0, +"~ֺH pql","http://udn.com/NEWS/STOCK/STO2/9126906.shtml",0, +"d xѩ_ʤϼu","http://udn.com/NEWS/STOCK/STO2/9127213.shtml",0, +"߭۷ ءBЫGI","http://udn.com/NEWS/STOCK/STO2/9127132.shtml",0, +"Ѯnw2015ѳN ݤUݤW","http://udn.com/NEWS/STOCK/STO2/9127144.shtml",0, +"~污 o˿ѴNF","http://udn.com/NEWS/STOCK/STO2/9125729.shtml",0, +"ªeGѥ_PA ","http://udn.com/NEWS/STOCK/STO2/9125725.shtml",0, +"@b污n Hx","http://udn.com/NEWS/STOCK/STO2/9125719.shtml",0, +"nɦ~̰3.2%Dɰ]IsI","http://udn.com/NEWS/STOCK/STO2/9126402.shtml",0) +arMenu9_3 = new Array("xpQ4Q W2.4","http://udn.com/NEWS/STOCK/STO3/9126927.shtml",0, +"TPK~~ZKŷŪ","http://udn.com/NEWS/STOCK/STO3/9126928.shtml",0, +"p̨ ߼~ѥb","http://udn.com/NEWS/STOCK/STO3/9127000.shtml",0, +"REU FqBi","http://udn.com/NEWS/STOCK/STO3/9127002.shtml",0, +"ӵ N2,360H","http://udn.com/NEWS/STOCK/STO3/9127015.shtml",0, +"Ⱚqj po즬L440","http://udn.com/NEWS/STOCK/STO3/9126088.shtml",0, +"ڸ128 ߶qWp","http://udn.com/NEWS/STOCK/STO3/9126091.shtml",0, +"PYq~EPS t~Uצ9.09","http://udn.com/NEWS/STOCK/STO3/9126103.shtml",0, +"ڸ۶RP ؼл48","http://udn.com/NEWS/STOCK/STO3/9126114.shtml",0, +"~դ ~EPS","http://udn.com/NEWS/STOCK/STO3/9126170.shtml",0) +arMenu9_4 = new Array("Τ@Bs UuRK","http://udn.com/NEWS/STOCK/STO4/9127032.shtml",0, +"Τ@T ~վlķs","http://udn.com/NEWS/STOCK/STO4/9127033.shtml",0, +"˯B ϼuL","http://udn.com/NEWS/STOCK/STO4/9127027.shtml",0, +"afd Ȫ10","http://udn.com/NEWS/STOCK/STO4/9127029.shtml",0, +"ۤƷ~wsz Ұʴ","http://udn.com/NEWS/STOCK/STO4/9127036.shtml",0, +"t ÿڸs","http://udn.com/NEWS/STOCK/STO4/9126945.shtml",0, +"Cݤd xdȪdnhigh","http://udn.com/NEWS/STOCK/STO4/9127038.shtml",0, +"ALLO3% ڹFd꺦","http://udn.com/NEWS/STOCK/STO4/9126118.shtml",0, +"~ꤣݦn β~N","http://udn.com/NEWS/STOCK/STO4/9126109.shtml",0, +"۶Ra ߬ݫݲΤ@","http://udn.com/NEWS/STOCK/STO4/9126102.shtml",0) +arMenu9_5 = new Array("dR@PA ݸɶq","http://udn.com/NEWS/STOCK/STO5/9127700.shtml",0, +"dR NfWxPqC","http://udn.com/NEWS/STOCK/STO5/9127112.shtml",0, +"Yp ~禬s","http://udn.com/NEWS/STOCK/STO5/9127020.shtml",0, +"˷ǤݨD YpOm","http://udn.com/NEWS/STOCK/STO5/9127017.shtml",0, +"ICBa ~Z[","http://udn.com/NEWS/STOCK/STO5/9127011.shtml",0, +"s OUu","http://udn.com/NEWS/STOCK/STO5/9127013.shtml",0, +"sAppU_ |Zu","http://udn.com/NEWS/STOCK/STO5/9127004.shtml",0, +"ͧ޻x dRPus3","http://udn.com/NEWS/STOCK/STO5/9126121.shtml",0, +"մQ4禬 зs","http://udn.com/NEWS/STOCK/STO5/9126132.shtml",0, +"fPCB~^ nw","http://udn.com/NEWS/STOCK/STO5/9126125.shtml",0, +"WdqL pHw","http://udn.com/NEWS/STOCK/STO5/9126128.shtml",0) +arMenu9_6 = new Array("f@PdRpL lGI","http://udn.com/NEWS/STOCK/STO6/9127704.shtml",0, +"v̤j 9Zsqܫa","http://udn.com/NEWS/STOCK/STO6/9126970.shtml",0, +"BP D~10%","http://udn.com/NEWS/STOCK/STO6/9126971.shtml",0, +"jߥBFq Ѵ","http://udn.com/NEWS/STOCK/STO6/9126972.shtml",0, +"̤@FoG B3תg","http://udn.com/NEWS/STOCK/STO6/9126974.shtml",0, +"vmʸUȡBԼw vҦY","http://udn.com/NEWS/STOCK/STO6/9126976.shtml",0, +"vmʸUxpBسq ɰӫ~l","http://udn.com/NEWS/STOCK/STO6/9126978.shtml",0, +"qjz xftXj","http://udn.com/NEWS/STOCK/STO6/9126087.shtml",0, +"nj uu_","http://udn.com/NEWS/STOCK/STO6/9126111.shtml",0) +arMenu9_7 = new Array("_}LЫ Hqϳ̦h","http://udn.com/NEWS/STOCK/ST08/9127350.shtml",0, +"]I sжUQv2.4H_","http://udn.com/NEWS/STOCK/ST08/9127253.shtml",0, +"ʪBذӵ Oл","http://udn.com/NEWS/STOCK/ST08/9127259.shtml",0, +"I~ N[X~ʲ","http://udn.com/NEWS/STOCK/ST08/9127351.shtml",0, +"sYe s_sGI","http://udn.com/NEWS/STOCK/ST08/9127359.shtml",0, +"YeϾລ pWq","http://udn.com/NEWS/STOCK/ST08/9127361.shtml",0, +"WHӮaLλT ²R","http://udn.com/NEWS/STOCK/ST08/9127364.shtml",0, +"KB 쯸л~14.7%","http://udn.com/NEWS/STOCK/ST08/9127366.shtml",0, +"_Qsuuu pWƲ~P","http://udn.com/NEWS/STOCK/ST08/9127367.shtml",0, +"[ؿvBN س]q","http://udn.com/NEWS/STOCK/ST08/9127365.shtml",0) +arMenu9_8 = new Array("80Wװc o֧lޤO","http://udn.com/NEWS/STOCK/STO9/9126532.shtml",0, +"ĦXh jWƨpvΦPװ","http://udn.com/NEWS/STOCK/STO9/9126528.shtml",0, +"j½s@W y²ɮa","http://udn.com/NEWS/STOCK/STO9/9126527.shtml",0, +"ŤѥնBAsP fڷQ۵M֩~","http://udn.com/NEWS/STOCK/STO9/9126104.shtml",0, +"HM ɩ|𶢤pv","http://udn.com/NEWS/STOCK/STO9/9126084.shtml",0, +"QD§Y u~aŶuǦaav","http://udn.com/NEWS/STOCK/STO9/9126083.shtml",0, +"l Ư෽x","http://udn.com/NEWS/STOCK/STO9/9126062.shtml",0, +"115W{NHjv ӯKagNɥ","http://udn.com/NEWS/STOCK/STO9/9126037.shtml",0, +"[^١IA8W15W","http://udn.com/NEWS/STOCK/STO9/9126035.shtml",0, +"ŶL zѦvi{jv","http://udn.com/NEWS/STOCK/STO9/9126122.shtml",0, +"ݤ平 s_¡tE","http://udn.com/NEWS/STOCK/STO9/9126124.shtml",0) +arMenu10 = new Array("JI","http://udn.com/NEWS/FUND/FUN1/",1, +"","http://udn.com/NEWS/FUND/FUN2/",1, +"xѰ","http://udn.com/NEWS/FUND/FUN11/",1, +"Ũf","http://udn.com/NEWS/FUND/FUN7/",1, +"H[I","http://udn.com/NEWS/FUND/FUN10/",1, +"ӤHz]","http://udn.com/NEWS/FUND/FUND5/",1, +"ȦOI","http://udn.com/NEWS/FUND/FUN8/",1, +"~׶","http://udn.com/NEWS/FUND/FUND4/",1) +arMenu10_1 = new Array("Lp 񺸴","http://udn.com/NEWS/FUND/FUN1/9125367.shtml",0, +"Kf ѤݲH","http://udn.com/NEWS/FUND/FUN1/9125370.shtml",0, +"sȪ ֤GjQh","http://udn.com/NEWS/FUND/FUN1/9125371.shtml",0, +"Ѱ ܾ_Oj","http://udn.com/NEWS/FUND/FUN1/9123181.shtml",0, +"άȪ ȤF","http://udn.com/NEWS/FUND/FUN1/9123168.shtml",0, +"þuFv ڪѵuu","http://udn.com/NEWS/FUND/FUN1/9123180.shtml",0, +"ū ܶìy","http://udn.com/NEWS/FUND/FUN1/9120847.shtml",0, +" 露污","http://udn.com/NEWS/FUND/FUN1/9120849.shtml",0, +"ް `yDq","http://udn.com/NEWS/FUND/FUN1/9120852.shtml",0, +"L׿cfդ","http://udn.com/NEWS/FUND/FUN1/9120854.shtml",0, +"nɦ~̰3.2%Dɰ]IsI","http://udn.com/NEWS/FUND/FUN1/9126405.shtml",0) +arMenu10_2 = new Array("ڻȫѲ ","http://udn.com/NEWS/FUND/FUN2/9125368.shtml",0, +"ު W⭷","http://udn.com/NEWS/FUND/FUN2/9125365.shtml",0, +"tDí qu`Sv׬","http://udn.com/NEWS/FUND/FUN2/9123183.shtml",0, +"ū 겣tmu׭v ","http://udn.com/NEWS/FUND/FUN2/9123182.shtml",0, +"겣 e@ua","http://udn.com/NEWS/FUND/FUN2/9123184.shtml",0, +"Lתѥ ݦh","http://udn.com/NEWS/FUND/FUN2/9123179.shtml",0, +"~O {G","http://udn.com/NEWS/FUND/FUN2/9123178.shtml",0, +"Х^ REITso","http://udn.com/NEWS/FUND/FUN2/9123177.shtml",0, +"[IζŰȸѨMŰȦMK椣q","http://udn.com/NEWS/FUND/FUN2/9123176.shtml",0, +"HG~ѻY xBBLתѩ","http://udn.com/NEWS/FUND/FUN2/9122179.shtml",0, +"MaGo^g٧Qj","http://udn.com/NEWS/FUND/FUN2/9119720.shtml",0, +"~Gx̧֩~9ɮ","http://udn.com/NEWS/FUND/FUN2/9119723.shtml",0) +arMenu10_3 = new Array("W50 L","http://udn.com/NEWS/FUND/FUN11/9127370.shtml",0, +"«AѰ RQ","http://udn.com/NEWS/FUND/FUN11/9123175.shtml",0, +"滙סGj ٦bWb","http://udn.com/NEWS/FUND/FUN11/9123171.shtml",0, +"ѺhԦ^ [Xp","http://udn.com/NEWS/FUND/FUN11/9121522.shtml",0, +"ѦhY xѱҰʦ污","http://udn.com/NEWS/FUND/FUN11/9119729.shtml",0) +arMenu10_4 = new Array("HGܬɮ 怜q","http://udn.com/NEWS/FUND/FUN7/9126450.shtml",0, +"෽ W^","http://udn.com/NEWS/FUND/FUN7/9125369.shtml",0, +"° mfHC","http://udn.com/NEWS/FUND/FUN7/9125366.shtml",0, +"ť~ s25Pl","http://udn.com/NEWS/FUND/FUN7/9123174.shtml",0, +" yO","http://udn.com/NEWS/FUND/FUN7/9120846.shtml",0, +"굥Ŷ l","http://udn.com/NEWS/FUND/FUN7/9120851.shtml",0, +"[Xs nŦ","http://udn.com/NEWS/FUND/FUN7/9119736.shtml",0, +"gzHGũ~í","http://udn.com/NEWS/FUND/FUN7/9119677.shtml",0, +"Ȭw~ {G","http://udn.com/NEWS/FUND/FUN7/9118420.shtml",0) +arMenu10_5 = new Array("ѱjl x2015ݦn򥻭","http://udn.com/NEWS/FUND/FUN10/9126462.shtml",0, +"ū 11ҤɼW4","http://udn.com/NEWS/FUND/FUN10/9126451.shtml",0, +"2015ѤE sͶ","http://udn.com/NEWS/FUND/FUN10/9125768.shtml",0, +"| f","http://udn.com/NEWS/FUND/FUN10/9125507.shtml",0, +"sqi Ѷש~j","http://udn.com/NEWS/FUND/FUN10/9120848.shtml",0, +"o^ QO@[]","http://udn.com/NEWS/FUND/FUN10/9125508.shtml",0, +"~i CҤMu","http://udn.com/NEWS/FUND/FUN10/9116989.shtml",0, +"Pg((12/1-12/4)","http://udn.com/NEWS/FUND/FUN10/9119161.shtml",0, +"fõ|}x Ȭެݩ","http://udn.com/NEWS/FUND/FUN10/9119612.shtml",0, +"w 2015ʯ","http://udn.com/NEWS/FUND/FUN10/9121523.shtml",0) +arMenu10_6 = new Array("ӶR@IܡHSӫDHI","http://udn.com/NEWS/FUND/FUND5/9124112.shtml",0, +"pڷӹL F]IۥѦ","http://udn.com/NEWS/FUND/FUND5/9125718.shtml",0) +arMenu10_7 = new Array("RȥI dNTO","http://udn.com/NEWS/FUND/FUN8/9124995.shtml",0, +"sثij I","http://udn.com/NEWS/FUND/FUN8/9124977.shtml",0, +"K`C duf","http://udn.com/NEWS/FUND/FUN8/9124997.shtml",0, +"O 5dw","http://udn.com/NEWS/FUND/FUN8/9122736.shtml",0, +"Iؤ@ bopɰOd","http://udn.com/NEWS/FUND/FUN8/9123055.shtml",0) +arMenu10_8 = new Array("H i7:3tm","http://udn.com/NEWS/FUND/FUND4/9124999.shtml",0, +"Qws Y","http://udn.com/NEWS/FUND/FUND4/9122665.shtml",0, +"x SOj","http://udn.com/NEWS/FUND/FUND4/9122964.shtml",0, +"t}1,200","http://udn.com/NEWS/FUND/FUND4/9120856.shtml",0, +"cBBڤ S10wѼֳ","http://udn.com/NEWS/FUND/FUND4/9117810.shtml",0, +"x4~sC áBD^½","http://udn.com/NEWS/FUND/FUND4/9117808.shtml",0) +arMenu11 = new Array("¾","http://udn.com/NEWS/SPORTS/SPO5/",1, +"βy","http://udn.com/NEWS/SPORTS/SPO1/",1, +"H԰","http://udn.com/NEWS/SPORTS/SPO4/",1, +"NBA","http://udn.com/NEWS/SPORTS/SP7/",1, +"°ʺA","http://udn.com/NEWS/SPORTS/SPO2/",1, +"Bʱm","http://udn.com/NEWS/SPORTS/SPO7/",1, +"JIy","http://udn.com/NEWS/SPORTS/OUT/",1) +arMenu11_1 = new Array("nPorsche Macan qܱz{ਮ","http://udn.com/NEWS/SPORTS/SPO5/9118780.shtml",0, +"iԴ Qehiv","http://udn.com/NEWS/SPORTS/SPO5/9127718.shtml",0, +"O̹G SۥѤU","http://udn.com/NEWS/SPORTS/SPO5/9127732.shtml",0, +"uv ätyCML","http://udn.com/NEWS/SPORTS/SPO5/9127720.shtml",0, +"Ȥ pSTGʸ","http://udn.com/NEWS/SPORTS/SPO5/9127733.shtml",0, +"m ФhAm̴y","http://udn.com/NEWS/SPORTS/SPO5/9127721.shtml",0, +"Vu|ijKpmCS iù","http://udn.com/NEWS/SPORTS/SPO5/9127211.shtml",0, +"3~1000U ųݤWq","http://udn.com/NEWS/SPORTS/SPO5/9127719.shtml",0, +"a iԴܴ鰪~","http://udn.com/NEWS/SPORTS/SPO5/9125992.shtml",0, +"OD_ Фh","http://udn.com/NEWS/SPORTS/SPO5/9125994.shtml",0, +"CsHh~D ~SR","http://udn.com/NEWS/SPORTS/SPO5/9125997.shtml",0, +"񱼲׵ùB v򪺺ǽL","http://udn.com/NEWS/SPORTS/SPO5/9125474.shtml",0) +arMenu11_2 = new Array("}ͩMִɸ tsp^ax","http://udn.com/NEWS/SPORTS/SPO1/9127196.shtml",0, +"}ͩM@QfG }vj֩","http://udn.com/NEWS/SPORTS/SPO1/9127198.shtml",0, +"}ͩMpy@ fw","http://udn.com/NEWS/SPORTS/SPO1/9127204.shtml",0, +"°\Xا _M;","http://udn.com/NEWS/SPORTS/SPO1/9127200.shtml",0, +"°\X۵tAT n^8j","http://udn.com/NEWS/SPORTS/SPO1/9127203.shtml",0, +"¾qjﭲ RkĥO","http://udn.com/NEWS/SPORTS/SPO1/9126079.shtml",0, +"iݯȡjjOjDAAPqjQ","http://udn.com/NEWS/SPORTS/SPO1/9124536.shtml",0, +"¾yAXGMH Xպd","http://udn.com/NEWS/SPORTS/SPO1/9123549.shtml",0) +arMenu11_3 = new Array("HGڭ̤|\","http://udn.com/NEWS/SPORTS/SPO4/9127727.shtml",0, +"[Lѻ w_ӡI","http://udn.com/NEWS/SPORTS/SPO4/9127728.shtml",0, +"LѻX԰ XɯS","http://udn.com/NEWS/SPORTS/SPO4/9126313.shtml",0, +"uåͯȡvܵwF LѻBzo ","http://udn.com/NEWS/SPORTS/SPO4/9127843.shtml",0, +"p} |ͳnww","http://udn.com/NEWS/SPORTS/SPO4/9127299.shtml",0, +"ߧ^H dWإ\","http://udn.com/NEWS/SPORTS/SPO4/9126072.shtml",0, +"å@B Lѻnd","http://udn.com/NEWS/SPORTS/SPO4/9125869.shtml",0, +"벼GHu{СAָӭt̤jdH","http://udn.com/NEWS/SPORTS/SPO4/9125772.shtml",0, +"Lѻ2014-15yuXɦZ","http://udn.com/NEWS/SPORTS/SPO4/9056903.shtml",0, +"H12ɵ{q༽","http://udn.com/NEWS/SPORTS/SPO4/9096415.shtml",0) +arMenu11_4 = new Array("wFk J10s","http://udn.com/NEWS/SPORTS/SP7/9127730.shtml",0, +"n^ @","http://udn.com/NEWS/SPORTS/SP7/9127294.shtml",0, +"jҥL p^_Mhs","http://udn.com/NEWS/SPORTS/SP7/9127297.shtml",0, +"jçNk ihϦYj","http://udn.com/NEWS/SPORTS/SP7/9126076.shtml",0) +arMenu11_5 = new Array("`~`MɡWԤ йܫa","http://udn.com/NEWS/SPORTS/SPO2/9127292.shtml",0, +"SBLvN FY٦bS","http://udn.com/NEWS/SPORTS/SPO2/9127729.shtml",0, +"SBLL}h Iߦ3s","http://udn.com/NEWS/SPORTS/SPO2/9127288.shtml",0, +"SBLغ20 FYKlD","http://udn.com/NEWS/SPORTS/SPO2/9127290.shtml",0, +"M`D 13","http://udn.com/NEWS/SPORTS/SPO2/9127209.shtml",0, +"|xC`ت","http://udn.com/NEWS/SPORTS/SPO2/7274865.shtml",0) +arMenu11_6 = new Array("y `Ӿj","http://udn.com/NEWS/SPORTS/SPO7/9127116.shtml",0, +"xy` ǰݤj","http://udn.com/NEWS/SPORTS/SPO7/9127122.shtml",0, +"^Wu|v ݦnpo","http://udn.com/NEWS/SPORTS/SPO7/9127120.shtml",0, +"Bm`gzͬܨpɺ |KO","http://udn.com/NEWS/SPORTS/SPO7/9127123.shtml",0, +"ڬOBmw 13jvݥx","http://udn.com/NEWS/SPORTS/SPO7/9127646.shtml",0, +"NBA10Ĺ9L","http://udn.com/NEWS/SPORTS/SPO7/9127712.shtml",0, +"NBAII ֦","http://udn.com/NEWS/SPORTS/SPO7/9127716.shtml",0, +"NBAbD 1j10p","http://udn.com/NEWS/SPORTS/SPO7/9127715.shtml",0, +"NBAOi{ilj","http://udn.com/NEWS/SPORTS/SPO7/9126012.shtml",0, +"NBA76HLLt","http://udn.com/NEWS/SPORTS/SPO7/9126011.shtml",0, +"ڬOBmw 9_}","http://udn.com/NEWS/SPORTS/SPO7/9116916.shtml",0) +arMenu11_7 = new Array("NBAO GObڦaLo","http://udn.com/NEWS/SPORTS/OUT/9124352.shtml",0, +"NBApk vp^fհH","http://udn.com/NEWS/SPORTS/OUT/9124357.shtml",0, +"MLB{ v׵","http://udn.com/NEWS/SPORTS/OUT/9124356.shtml",0, +"¾HԾi LJD¾P","http://udn.com/NEWS/SPORTS/OUT/9124353.shtml",0, +"NBAHyƦW LѻȲ8","http://udn.com/NEWS/SPORTS/OUT/9119635.shtml",0, +"MLBmHjԱҰ JtIhѨ","http://udn.com/NEWS/SPORTS/OUT/9119636.shtml",0, +"¾˰h Q坂BlӪmA_","http://udn.com/NEWS/SPORTS/OUT/9117484.shtml",0, +"קK]ɶq ~_տf","http://udn.com/NEWS/SPORTS/OUT/9117483.shtml",0) + + + + +arMenu12_1 = new Array( +'Galaxy S6iħس]pH','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550506',0 +,'SonyAy̤pzQrio','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550499',0 +,'غӴz 24nx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550487',0 +,'Lnʪ iΤS','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550480',0 +,'Τw īGO@߳Wз','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550464',0 +,'HTC re Camera[uf ܩ~2멳','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550453',0 +,'C^UұNi[JӷLާ@','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550451',0 +,'ùGalaxy S6 iੵΨX','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550450',0 +,'Xbox Onef 11bĹPlayStation 4','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550436',0 +,'Xs Project ArauWөGlobant','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550428',0 +) + +arMenu12_2 = new Array( +'1212ұNi[JӷLާ@','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550451',0 +,'1211xWʺͶդ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550278',0 +,'1210Intelۦpx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550080',0 +,'1209ȤӹqH4GBBsiPadnx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549883',0 +,'1208ȤӹqH4GAȡBsiPadnx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549689',0 +,'1205Windows 10Ǥ䴩Android App','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549300',0 +,'1204poݮiy','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549095',0 +,'1203īGǩKiPhone 6s','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548881',0 +,'1202PChomejƾڷsDʪA','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548627',0 +,'1201ChromecastnxBXbae','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548445',0 +) + +arMenu12_3 = new Array( +'nNb!12/10Ƕ}siPad','http://ad3.udn.com/RealMedia/ads/click_lx.ads/pulldown.com/main3/1462387218/x08/news-pd-108/pd-001.gif/33636661383539373462313336346330?http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550018',0 +,'ùGalaxy S6 iੵΨX','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550450',0 +,'Snapdragon 410Bz Galaxy E5BE7n','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550277',0 +,'GALAXY S6sTn DY16MP','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550081',0 +,'Galaxy Note 4ǩ~BzɯŴ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549973',0 +,'֩~szBWindows Phones','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549964',0 +,'ow saģZ4XN16}','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549892',0 +,'⤤عqBpo mkʤ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549821',0 +,'iPhone 6SN[@RAMH','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549813',0 +,'Xù ۴}','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549699',0 +,'G Pro}oiत LGNM`GtC~','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549697',0 +,'ؤoLkT{ æHTC HimaeOn','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549688',0 +) + +arMenu12_4 = new Array( +'Τw īGO@߳Wз','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550464',0 +,'Xs Project ArauWөGlobant','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550428',0 +,'Yahoo!Jr DDG','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550376',0 +,'Android 5.0MiOS 8 AR@H','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550373',0 +,'Google Play̦hUAppBGamesιqv','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550366',0 +,'450MbpsUt S810䴩LTE Cat.9Wd','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550276',0 +,'īGhGoogle iCloudAȥΦۮaaϡI','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550186',0 +,'īGXiOS 8.1.2A״_anBugPо!','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550185',0 +,'PhoneArenaX2014Tj޳зs','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550010',0 +,'LINEp\ ]|X{ijK','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550007',0 +) + +arMenu12_5 = new Array( +'nC饻 KOsuWIFII','http://ad3.udn.com/RealMedia/ads/click_lx.ads/pulldown.com/main1/1524436597/Left2/news-pd-41/pd-001.gif/33636661383539373462313336346330?http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549293',0 +,'nɩ|PUͬpT','http://ad3.udn.com/RealMedia/ads/click_lx.ads/pulldown.com/main3/2033822098/x05/news-pd-105/pd-001.gif/30613132336334333439613738356530?http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549298',0 +,'HTC re Camera[uf ܩ~2멳','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550453',0 +,'C^UұNi[JӷLާ@','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550451',0 +,'Lnөq}SIO','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550409',0 +,'غӭڴz ZenWatchtϸ`einx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550408',0 +,'p̥IMQO EricssonGXG','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550403',0 +,'eBay ~ƤdH','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550365',0 +,'Oculusҧ޳N N[Jާ@','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550364',0 +,'FlickrjƥΤ ɤJhQҦ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550362',0 +,'iIntel}B Samsung 14nms{}l벣','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550347',0 +,'SecurePadqIJOѧO','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550282',0 +,'RazerJ Iqv༽ݨD','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550285',0 +) + +arMenu12_6 = new Array( +'2014~Instagram̦hHgӤO...','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550372',0 +,'GooglejO~ xWʺʤ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550164',0 +,'Yahoo_G ̪֪Rrsi','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550162',0 +,'VyѩxѨơI','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550005',0 +,'y̤jBTQU ADĵ覩d','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549980',0 +,'~YouTube j絛B͸ͺ~a','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549904',0 +,'eiKX Google󴺲{b','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549891',0 +,'v^ Facebook}K夺ejM','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549878',0 +,'Facebook~צ^U @ɬ׸D̤','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549837',0 +,'xW~YouTubev HB|ƥ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549742',0 +,'Youtubeo jH@','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549701',0 +) + +arMenu12_7 = new Array( +'Studio Am}iPad Air 2Bmini 3','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549772',0 +,'Nxs̤jeq Seagate Archive HDD 8TB','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549750',0 +,'ʸˤؤop MarvellsSSDhDRAM','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549749',0 +,'TPXĥ۾NX1nx jէ֡BB','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549644',0 +,'Xperia Z3 Tablet Compact LTEnx','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549276',0 +,'Ǥp̭ns4GO un3ipB','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549197',0 +,'CASIOAs۩篫 tX譱iR۩','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549091',0 +,'ʪGeForce GTX 965M T{sb','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549094',0 +,'Dell UltraSharp 5Kùbxѳf','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548875',0 +,'Seagets~NASw íw','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548870',0 +) + +arMenu12_8 = new Array( +'}App q`ئba','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550400',0 +,'Win 10hӸ`Tw1봦 ۭ','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550395',0 +,'Googleڪa о','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550371',0 +,'mSleep BetternAίv','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550184',0 +,'Ф{ dz檽','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549896',0 +,'LnApp KOWGoogle','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549895',0 +,'b]Qpu uDrizlyvea','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549529',0 +,'Windows 10䴩ϥAndroid App ~','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549292',0 +,'Firefox 35 beta ²ƽuWT\श','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549182',0 +,'OperatCssWҤɥ\','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=548805',0 +) + +arMenu12_9 = new Array( +'Xbox Onef 11bĹPlayStation 4','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550436',0 +,'PS4~1/11W Xbat','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550267',0 +,'Xbox Onewi tCj@2015~X','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550265',0 +,'The Order: 1886~2/20W DP','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550240',0 +,'PlayStation 4 ǤH2999','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=550056',0 +,'PS4Jnɾ] [ؤTڹCBOT','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549949',0 +,'CNCES 2015sڹC','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549702',0 +,'mԨ@ɡG{ԡnAndroidX','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549681',0 +,'jө_L1&2 App StoreW[','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549655',0 +,'PStCs@o PS4DO󴫭peX','http://mag.udn.com/mag/digital/storypage.jsp?f_ART_ID=549488',0 +) + +arMenu12_10 = new Array( +'uZO^xWvϳQdWjͳ','http://mag.udn.com/mag/digital/549361/',0 +,'dwa]pnD uO3_vܽd','http://mag.udn.com/mag/digital/549363/',0 +,'kܩ }󥿥XͱҨ','http://mag.udn.com/mag/digital/549364/',0 +,'ʼLHiH kHҥkͦ۩ȭ','http://mag.udn.com/mag/digital/549367/',0 +,'P7wij H@XְPq','http://mag.udn.com/mag/digital/549365/',0 +,'un1 ݯuHiܦʦ~vt','http://mag.udn.com/mag/digital/549366/',0 +,'xWMjǥ͡K TjtI','http://mag.udn.com/mag/digital/549362/',0 +) + +arMenu12 = new Array('̷s峹','http://mag.udn.com/mag/digital/article_ord.jsp?f_ORDER_BY=D',1,'iH]','http://mag.udn.com/mag/digital/itempage.jsp?f_SUB_ID=6137',1,'zQ','http://mag.udn.com/mag/digital/itempage.jsp?f_SUB_ID=4280',1,'qT@','http://mag.udn.com/mag/digital/main_page.jsp?f_MAIN_ID=323',1,'Ʀͬ','http://mag.udn.com/mag/digital/itempage.jsp?f_MAIN_ID=320&f_SUB_ID=2943',1,'ں','http://mag.udn.com/mag/digital/main_page.jsp?f_MAIN_ID=319',1,'wS`','http://mag.udn.com/mag/digital/main_page.jsp?f_MAIN_ID=320',1,'n鱡','http://mag.udn.com/mag/digital/main_page.jsp?f_MAIN_ID=322',1,'qʺA','http://mag.udn.com/mag/digital/main_page.jsp?f_MAIN_ID=321',1,'sj','http://mag.udn.com/mag/digital/itempage.jsp?f_SUB_ID=6028',1) +//DONE + + + + +// created on wm@cmdes.udn.com 2014/12/13 17:20:2 1 5 + +arMenu13 = new Array("vWK","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/",1, +"xBҨ","http://udn.com/NEWS/ENTERTAINMENT/ENT4/",1, +"PD","http://udn.com/NEWS/ENTERTAINMENT/ENT1/",1, +"Pŵ","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/",1, +"HʺA","http://udn.com/NEWS/ENTERTAINMENT/ENT2/",1, +"lP","http://udn.com/NEWS/ENTERTAINMENT/OUT2/",1, +"qv@","http://udn.com/NEWS/ENTERTAINMENT/ENT3/",1, +"~P","http://udn.com/NEWS/ENTERTAINMENT/ENT5/",1, +"y歵","http://udn.com/NEWS/ENTERTAINMENT/ENT6/",1, +"sqWD","http://udn.com/NEWS/ENTERTAINMENT/ENT7/",1, +"䳰ǯu","http://udn.com/NEWS/ENTERTAINMENT/ENT8/",1, +"v@Blogs","http://udn.com/NEWS/ENTERTAINMENT/OUT3/",1) +arMenu13_1 = new Array("vhXH gq_{","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126824.shtml",0, +"v10y FDɡG۴N","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126806.shtml",0, +"vnkHKusoj","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126159.shtml",0, +"vg{ ޭGGkHI","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9124818.shtml",0, +"PkWK vGuOuJv","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123079.shtml",0, +"ͻĤS|Gv ˳zx","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123089.shtml",0, +"upvı LƦޯHH","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123087.shtml",0, +"IoƥuukHv ʥǡK","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123084.shtml",0, +"ݲHvg{ duGNnYNn","http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9122831.shtml",0) +arMenu13_2 = new Array("nPorsche Macan mH","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9118788.shtml",0, +"dB]Nv lkۦ","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9125460.shtml",0, +"dB 1ܤִ6y","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9124773.shtml",0, +"xBɩ|ŦKors] kHe","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9125783.shtml",0, +"xBuҥܡvLoAn O̦n_","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9123569.shtml",0, +"uxBҨơvP@ӷsAXl","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9124155.shtml",0, +"uxBvЦ ]ƤӤJG","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9120309.shtml",0, +"uCvʶ 20~}õ","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9115918.shtml",0, +"Ÿu@ ̷Q|H","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9114239.shtml",0, +"ʦRx@uxB_v a[xB","http://udn.com/NEWS/ENTERTAINMENT/ENT4/9126040.shtml",0) +arMenu13_3 = new Array("n饻ȹCAPP HɤWWK","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9112175.shtml",0, +"n@s@ɦWpPb","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9112123.shtml",0, +"nCavalia ۰ P ޡuzvAU","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9086732.shtml",0, +"mL Wޡupretty tightv","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126802.shtml",0, +"ѪInܶA@γoǰWbK","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127401.shtml",0, +"nӸرiIḺDZ¦۩5j","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127400.shtml",0, +"AsD30~ zD|o","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127405.shtml",0, +"봣帡 |\","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126829.shtml",0, +"jRӥx jܻĵBpŢ]","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126821.shtml",0, +"AzkO kDDD","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9125423.shtml",0, +"ǹBkǪkIQG次ӤFH","http://udn.com/NEWS/ENTERTAINMENT/ENT1/9124027.shtml",0) +arMenu13_4 = new Array("MHͮɳt qu~֮ɥNvXo","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9127655.shtml",0, +"ZkζHK","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9125733.shtml",0, +"_WKQ] vjĹEM","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9123267.shtml",0, +"ĬvP ߴYD","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9118475.shtml",0, +"Cj珉uAv̪L AܡH","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9116261.shtml",0, +"K@\iǤ nټM̪ߤ@q","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9114877.shtml",0, +"_iaت̻ysC","http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9108812.shtml",0) +arMenu13_5 = new Array("nK!ڥPֵNWHggQu","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9125644.shtml",0, +"n} a]ShoppingI","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9104159.shtml",0, +"ʲok Ŷǡuä}Av","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127563.shtml",0, +"ܺAIPQPⱡ dtĵ","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127399.shtml",0, +"ԩ`S ťh߰T","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127404.shtml",0, +"BreezeJ]i ۤvȳ̹b","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126798.shtml",0, +"LULU{֩Ժ XEʥs","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126804.shtml",0, +"Ū@ۭѨ mǵe","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127251.shtml",0, +"kΦ{~y","http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126284.shtml",0) +arMenu13_6 = new Array("BIGBANGӶƤUx påbF","http://udn.com/NEWS/ENTERTAINMENT/OUT2/9126069.shtml",0, +"p̧̡uvXS","http://udn.com/NEWS/ENTERTAINMENT/OUT2/9126024.shtml",0, +"nܡHPŶǬʮX","http://udn.com/NEWS/ENTERTAINMENT/OUT2/9125924.shtml",0, +"G-DRAGONnPӶ~֫C߷","http://udn.com/NEWS/ENTERTAINMENT/OUT2/9125845.shtml",0, +"cf@ޱ unʷPn","http://udn.com/NEWS/ENTERTAINMENT/OUT2/9118450.shtml",0) +arMenu13_7 = new Array("u۷RCس]pv \޳ڬL鲼","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126875.shtml",0, +"3a3ɩuZv fM1H3","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126870.shtml",0, +"a uзsTuv","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9124463.shtml",0, +"uHv̧ y7J","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9125959.shtml",0, +"ʵevq wg7W","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9125656.shtml",0, +"hڡIqvu}kұ","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126381.shtml",0, +"Фj~̿ Ƴ500UĪG","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126865.shtml",0, +"72y qvJW","http://udn.com/NEWS/ENTERTAINMENT/ENT3/9127348.shtml",0) +arMenu13_8 = new Array("qvM|ʲk pNdW}","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9127785.shtml",0, +"DZI7sͥNkP ̾AXtQl","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9127398.shtml",0, +"ʲHӳǧJ pSWn","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126873.shtml",0, +"uY Rsfʴfl","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126350.shtml",0, +"کԤɼsi@j Qг¨l]o","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126347.shtml",0, +"RS2ʱ 12UX","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125654.shtml",0, +"AnX]Hƺ갰Q˥iRK ","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125489.shtml",0, +"ܬAJ MO]ɤW\ҡI","http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125486.shtml",0) +arMenu13_9 = new Array("pʦX} jʦXBi{","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126825.shtml",0, +"ѰduMV Wth","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126823.shtml",0, +"GENTLEMAN _갪ۥNӶ","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126866.shtml",0, +"KTԿM HjɦʸU","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126827.shtml",0, +"P12d a¡tW","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124780.shtml",0, +"ѺɡuXOjv zK10","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124771.shtml",0, +"squѭvMV ɭۤv","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124763.shtml",0, +"L{oNөMV w16p","http://udn.com/NEWS/ENTERTAINMENT/ENT6/9127286.shtml",0) +arMenu13_10 = new Array("ukKǡv ipPiv","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126810.shtml",0, +"ؼ@juRWӧڡvQ̨w@","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126830.shtml",0, +"y^} qsqѱN","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126863.shtml",0, +"y༽x xWݤ","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126858.shtml",0, +"yq] unaxvsJ","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9125961.shtml",0, +"@gs @ɼ@dq","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126808.shtml",0, +"OJuv g~Nɮv","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126805.shtml",0, +"[Ju@v ]ӴNU","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126799.shtml",0, +"GVSq Өk̷|kH","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126314.shtml",0, +"PȬwq xW^y","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9125398.shtml",0, +"Ҩq VkkxW","http://udn.com/NEWS/ENTERTAINMENT/ENT7/9124783.shtml",0) +arMenu13_11 = new Array("uǩhQv ȤkͦYL","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9127254.shtml",0, +"ͤwӷP BŬ¬ͬ","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9126879.shtml",0, +"ifۻP๳Q SfW","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124265.shtml",0, +"BŬ¥ͤw d","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124231.shtml",0, +"u¯vcdl dtoۧi","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9126691.shtml",0, +"HѴing pݲr","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124333.shtml",0, +"´@@}tϭw ܾW@_^a","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124266.shtml",0, +"SBBSuݡv U10~Qa","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124263.shtml",0, +"G@aHwBy","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124335.shtml",0, +"BP~u@ JԤ䲼d","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124332.shtml",0, +"qv aӶR","http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124277.shtml",0) +arMenu13_12 = new Array("mXJΰO:Ѧa̡nHbAѦb","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126299.shtml",0, +"mӥ:å@B͡nOtEԪv","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126298.shtml",0, +"mE^ڡngݭnгy OQҥ","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126295.shtml",0, +"mS𶤡n@ɩM quԡv}l⮩","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126294.shtml",0, +"m~֮ɥNnVLsCAFwhFT","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126293.shtml",0, +"mҰʡn@hhU wڹҪa","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126289.shtml",0, +"ޱۮɶ]NvwJhֿ","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126288.shtml",0, +" BR]BpDШ|Bä","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126287.shtml",0, +"muRC@ѡnɪ Nɤ@~H","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126286.shtml",0, +"muRDlnaϨkӤk PߺAo~","http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126285.shtml",0) + +arMenu14_1 = new Array( +'三菱參展台中資訊月 購物滿萬抽電動車','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=47&f_ART_ID=22369',0,'歐風MPV新勢力 國產KIA Carens 76.88萬起','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22368',0,'塑膠車能開嗎? Mazda開發汽車外觀用生物塑膠','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22367',0,'三門與鋼砲車型入列 Hyundai i30改款亮相','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22366',0,'優雅與野性兼具 賓士推出全新轎跑休旅GLE','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22365',0,'Audi主題車款 點亮新北市歡樂耶誕城','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22364',0,'華麗之戰台南開打 賓士10億打造最奢華據點','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22363',0,'合唱往日多美好 經典老車齊聚獻寶','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22361',0,'Audi S1、RS4 Avant獲選年度最佳運動車款','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22360',0,'全新Outlander節能出眾 PHEV油電款199萬','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22358',0) + +arMenu14_2 = new Array( +'熱門》Porsche Macan 敬邀您親臨賞車','http://ad3.udn.com/RealMedia/ads/click_lx.ads/pulldown.com/main2/1379804446/Left3/news-pd-72/pd-001.gif/33636661383539373462313336346330?https://www.porsche-tw.com/index.php?media=UDN_02',0,'Audi主題車款 點亮新北市歡樂耶誕城','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22364',0,'歐風MPV新勢力 國產KIA Carens 76.88萬起','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22368',0,'華麗之戰台南開打 賓士10億打造最奢華據點','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22363',0,'合唱往日多美好 經典老車齊聚獻寶','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22361',0,'全新Outlander節能出眾 PHEV油電款199萬','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22358',0,'現代安全科技體驗會 SPAS自動停車科技曝光','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22356',0,'優雅極速殺手 McLaren亞洲限定625C攻台','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22353',0,'全球僅此一台 McLaren P1台灣客製版亮相 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22354',0,'Outlander上市奏鳴曲 晶鑽聖誕樹盛大展出','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=45&f_ART_ID=22348',0) + +arMenu14_3 = new Array( +'優雅與野性兼具 賓士推出全新轎跑休旅GLE','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22365',0,'三門與鋼砲車型入列 Hyundai i30改款亮相','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22366',0,'塑膠車能開嗎? Mazda開發汽車外觀用生物塑膠','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22367',0,'Audi S1、RS4 Avant獲選年度最佳運動車款','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22360',0,'007新座駕 Aston Martin打造DB10未來車','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22355',0,'1050匹馬力的震撼 法拉利道路版賽車FXX K','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22347',0,'快如賽車卻超省油 VW Polo GTI改款現身','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22330',0,'Subaru雙雄現身 Legacy&Outback亞洲首發','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22328',0,'車型再衍生 賓士CLA 45 AMG獵跑誕生','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22325',0,'氫能源車它最猛 Audi A7 Sportback h‑tron','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=46&f_ART_ID=22317',0) + +arMenu14_4 = new Array( +'台11線64K 石梯坪聽稻浪與海潮的合聲','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22263',0,'療癒住宿撫慰人心 君品酒店重現動漫美食','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22258',0,'鳳林「月盧」 讓吃飯不只是味覺與視覺的交錯','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22254',0,'收藏竹28豐收喜悅 Peugeot 5008深秋浪漫行','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22239',0,'三芝北15線紫花爭艷 神祕花園坐擁無敵海景','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22229',0,'不擁擠的小確幸 新店屈尺水岸生態漫遊','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22155',0,'花蓮水璉灣岸 封存一段段美好的記憶','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22142',0,'格上租車歡慶30 旅遊趣優惠30%','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22129',0,'海外租車行/便宜好玩 沖繩悠閒自駕遊(下)','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22121',0,'膏黃飽滿肉質鮮 來君品一嚐美味大閘蟹','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=76&f_ART_ID=22116',0) + +arMenu14_5 = new Array( +'充滿療癒風味 全新三代Outlander公路大體驗','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22352',0,'療癒系休旅 解讀3代Outlander的內在與外在','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22337',0,'面子裡子都好樣 小改款Nissan JUKE試駕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22334',0,'魅力超強時尚小車 KIA morning公路小試','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22321',0,'爽快俐落的玩樂主義 Volvo V40 T5','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22296',0,'給你大幸福 Honda FIT設計機能徹底體驗','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22288',0,'大幸福非小確幸 Honda FIT公路試駕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22289',0,'一車好料輕負擔 現代Elantra EX路試','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22250',0,'暗黑視覺系豪華休旅 Infiniti QX70 S特仕版試駕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22241',0,'知道你想玩更大 Audi S3 sedan 2.0 TFSI試駕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=48&f_ART_ID=22223',0) + +arMenu14_6 = new Array( +'品牌故事/KIA 深厚造車工藝傳承','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=67&f_ART_ID=22332',0,'品牌故事/Mazda 兼具個性與東方人文特色','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=67&f_ART_ID=19657',0,'品牌故事/Honda精神 原創與發明 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=67&f_ART_ID=19432',0,'品牌故事/Luxgen 創新智慧感動人心','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=67&f_ART_ID=19059',0,'品牌故事/Skoda 百年綠翼','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=67&f_ART_ID=18734',0) + +arMenu14_7 = new Array( +'Audi Taiwan李勇德奪下OTGP組別冠軍','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22327',0,'哈利王子認定傳奇 Hamilton摘下F1世界冠軍','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22320',0,'Audi R8 LMS Cup統規賽升級 2015精彩可期','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22302',0,'Audi被Toyota打掛? WEC耐久賽日本站實況','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22224',0,'F1俄羅斯站Hamilton建功 賓士隊提前封王','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22211',0,'三芒星給力 蓮花F1明年改用賓士動力系統','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22206',0,'Honda新F1引擎官方照公佈 預計11月底測試','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22194',0,'F1日本站蒙陰影 Bianchi重傷、Hamilton摘冠','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22193',0,'亞洲賽車最亮眼 明日巨星董荷斌專訪','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22168',0,'華夏賽車大獎賽第二站 廣東肇慶夜戰精彩落幕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=70&f_ART_ID=22153',0) + +arMenu14_8 = new Array( +'固特異EGP豪華房車胎 強調操控安全與節能','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22266',0,'米其林Pilot Sport H4 / S4競技胎 征服WRC','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22231',0,'米其林攜手FIA 參與Formula E電動方程式錦標賽','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22186',0,'固特異發表稻米穀殼合成矽膠技術 輪胎更強韌','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22163',0,'極致駕馭、7日鑑賞 體驗米其林Pilot Super Sport','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22133',0,'米其林Pilot Sport Cup 2頂級競技胎 正式上市','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22127',0,'專才當道 汽車與建築隔熱紙技師班開始招生 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22035',0,'打蠟DIY正夯 三歲小娃教你如何打蠟 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22025',0,'登祿普引進兩款新胎 使用壽命更長','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=22006',0,'德國馬牌輪胎宜蘭大慶旗艦店 盛大開幕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=68&f_ART_ID=21977',0) + +arMenu14_9 = new Array( +'買賓士精選中古車 提供全方位保固再津貼','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=22323',0,'火辣車模搭悍馬車掀高潮 承德二手車博覽會落幕','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=22209',0,'電影車、傳奇跑車齊聚 承德二手車博覽會吸睛','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=22178',0,'5525認證保固 SAVE首創中古車高標準 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=22169',0,'SUM賞車網選購中古車 保障消費者權益','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=21945',0,'搶攻中古車市 福特啟動原廠認證中古車','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=21915',0,'認證加保固 中古車最安心保證','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=21875',0,'SUM中古車聯盟 一家買車、全省服務 ','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=21559',0,'原廠認證把關 Audi中古車高雄展示間正式營運','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=21568',0,'歡慶SAVE周年慶 買認證車享150%超優貸','http://autos.udn.com/topic/car/news/article.jsp?type=article&f_SUB_ID=69&f_ART_ID=19990',0) + +arMenu14 = new Array('最新文章','http://autos.udn.com/topic/car/index.jsp',1,'國內車訊','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=45',1,'國際車訊','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=46',1,'開車旅遊','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=76',1,'試駕精選','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=48',1,'品牌故事','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=67',1,'賽車運動','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=70',1,'DIY&配件','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=68',1,'中古車訊','http://autos.udn.com/topic/car/news/article_directory.jsp?type=newsM&f_SUB_ID=69',1) + +//DONE + + + +// created on wm@cmdes.udn.com 2014/12/13 17:13:4 1 453 + +arMenu15 = new Array("ͬsD","http://udn.com/NEWS/LIFE/LIF1/",1, +"Ѯֳz","http://udn.com/NEWS/LIFE/LIF2/",1, +"PyB","http://udn.com/NEWS/LIFE/LIF7/",1, +"ʪPy","http://udn.com/NEWS/LIFE/LIF10/",1, +"¾[","http://udn.com/NEWS/LIFE/LIF6/",1, +"ysA","http://udn.com/NEWS/LIFE/LIFS1/",1, +"axPk","http://udn.com/NEWS/LIFE/X1/",1, +"CϯS","http://udn.com/NEWS/LIFE/LIFS2/",1, +"O馩","http://udn.com/NEWS/LIFE/LIF3/",1, +"DIY","http://udn.com/NEWS/LIFE/LIF5/",1, +"KߤUȯ","http://udn.com/NEWS/LIFE/LIFS5/",1) +arMenu15_1 = new Array("n} a]ShoppingI","http://udn.com/NEWS/LIFE/LIF1/9104160.shtml",0, +"nĬnPŶж}ww","http://udn.com/NEWS/LIFE/LIF1/9112121.shtml",0, +"nCavalia ۰ P ޡuzvAU","http://udn.com/NEWS/LIFE/LIF1/9086747.shtml",0, +"wť| q`gzG̨S","http://udn.com/NEWS/LIFE/LIF1/9127217.shtml",0, +"ѮN ӦUBu3","http://udn.com/NEWS/LIFE/LIF1/9127264.shtml",0, +"Q CRU","http://udn.com/NEWS/LIFE/LIF1/9127266.shtml",0, +"K`q UPG}q","http://udn.com/NEWS/LIFE/LIF1/9127243.shtml",0, +"x_xF ̧C1299","http://udn.com/NEWS/LIFE/LIF1/9127222.shtml",0, +"ToUP0.9 o2rYI","http://udn.com/NEWS/LIFE/LIF1/9127245.shtml",0, +"Ӥߡu[Qv NF","http://udn.com/NEWS/LIFE/LIF1/9127046.shtml",0, +"۴~ 76}I","http://udn.com/NEWS/LIFE/LIF1/9127314.shtml",0, +"sƾǪnO UW","http://udn.com/NEWS/LIFE/LIF1/9127248.shtml",0) +arMenu15_2 = new Array("nq Xҳ樮w","http://udn.com/NEWS/LIFE/LIF2/9126267.shtml",0, +"NIWH]","http://udn.com/NEWS/LIFE/LIF2/9127242.shtml",0, +"Ѯw","http://udn.com/NEWS/LIFE/LIF2/8298874.shtml",0, +"ȹCѮ","http://udn.com/NEWS/LIFE/LIF2/8298875.shtml",0, +"ìP","http://udn.com/NEWS/LIFE/LIF2/8298876.shtml",0, +"ֳz`","http://udn.com/NEWS/LIFE/LIF2/7924294.shtml",0, +"o","http://udn.com/NEWS/LIFE/LIF2/7924065.shtml",0) +arMenu15_3 = new Array("PyBա AXMnͽͤ","http://udn.com/NEWS/LIFE/LIF7/9111974.shtml",0, +"ѪŬPù(W)Bky ݭnҮɶ","http://udn.com/NEWS/LIFE/LIF7/9116239.shtml",0, +"ѪŬPù(U)gy Ʒ~~GH","http://udn.com/NEWS/LIFE/LIF7/9116242.shtml",0, +"}TPBազϡB u@Wqg","http://udn.com/NEWS/LIFE/LIF7/9114623.shtml",0, +"psù2015~ùBդjR","http://udn.com/NEWS/LIFE/LIF7/9118908.shtml",0, +"psùhͤlAAЦhH","http://udn.com/NEWS/LIFE/LIF7/9109715.shtml",0, +"psùPWگʤ֭ʷR]l?","http://udn.com/NEWS/LIFE/LIF7/9109039.shtml",0, +"psùmuAvI12B","http://udn.com/NEWS/LIFE/LIF7/9088943.shtml",0, +"LPPy2015~12PydBա]W^","http://udn.com/NEWS/LIFE/LIF7/9069384.shtml",0, +"LPPy2015~12PydBա]U^","http://udn.com/NEWS/LIFE/LIF7/9123270.shtml",0, +"}T2015~12PyB(W)","http://udn.com/NEWS/LIFE/LIF7/9028459.shtml",0, +"}T2015~12PyB(U)","http://udn.com/NEWS/LIFE/LIF7/9046417.shtml",0, +"weP2015~12PyӫuܽGvH","http://udn.com/NEWS/LIFE/LIF7/9114629.shtml",0, +"weP̷sI2015~12PyBդR","http://udn.com/NEWS/LIFE/LIF7/9106853.shtml",0) +arMenu15_4 = new Array("Nc޲vзs 21ӽ","http://udn.com/NEWS/LIFE/LIF10/9127014.shtml",0, +"s__`K O|ojj","http://udn.com/NEWS/LIFE/LIF10/9127072.shtml",0, +"dΫ~i ɪӰ","http://udn.com/NEWS/LIFE/LIF10/9127063.shtml",0, +"nUG QlB","http://udn.com/NEWS/LIFE/LIF10/9127127.shtml",0, +"ѧNHʮHlHKs","http://udn.com/NEWS/LIFE/LIF10/9127184.shtml",0, +"_}hsa MP","http://udn.com/NEWS/LIFE/LIF10/9127317.shtml",0, +"i1ӥb Lt","http://udn.com/NEWS/LIFE/LIF10/9125249.shtml",0, +"pɨ~˦n ϴʤ൥","http://udn.com/NEWS/LIFE/LIF10/9124252.shtml",0, +"_}R JǮ","http://udn.com/NEWS/LIFE/LIF10/9125149.shtml",0) +arMenu15_5 = new Array("jͲ~e 30UmH","http://udn.com/NEWS/LIFE/LIF6/9126048.shtml",0, +"uU @~֤W6ѯZ","http://udn.com/NEWS/LIFE/LIF6/9125241.shtml",0, +"v] ~4U_","http://udn.com/NEWS/LIFE/LIF6/9125168.shtml",0, +"ҰʳլdGu ~̦~sC","http://udn.com/NEWS/LIFE/LIF6/9120753.shtml",0, +"x_C~¾P yS԰ӫ","http://udn.com/NEWS/LIFE/LIF6/9120372.shtml",0, +"Rj 27@}M䨮","http://udn.com/NEWS/LIFE/LIF6/9120567.shtml",0, +"A]W]FܡHUH¾欰NOKK","http://udn.com/NEWS/LIFE/LIF6/9123303.shtml",0, +"jگʹBN 26o}n","http://udn.com/NEWS/LIFE/LIF6/9120751.shtml",0) +arMenu15_6 = new Array("nC饻APPWIFIKOsu","http://udn.com/NEWS/LIFE/LIFS1/9112080.shtml",0, +"Michael Kors ssi Cù","http://udn.com/NEWS/LIFE/LIFS1/9127194.shtml",0, +"p۶ ŲBVLGARIů]_","http://udn.com/NEWS/LIFE/LIFS1/9127224.shtml",0, +"2015Fʵo DiorVfXsg","http://udn.com/NEWS/LIFE/LIFS1/9127225.shtml",0, +"L棤UPS ɳӰe§","http://udn.com/NEWS/LIFE/LIFS1/9127133.shtml",0, +"ɩ|ex SٰeS]","http://udn.com/NEWS/LIFE/LIFS1/9124968.shtml",0, +"KLHOGAN }WD","http://udn.com/NEWS/LIFE/LIFS1/9124961.shtml",0, +"LOUIS VUITTON2015KLtC ӽɪŮȦ","http://udn.com/NEWS/LIFE/LIFS1/9124784.shtml",0, +"Q ʹFBR101vy̤jI","http://udn.com/NEWS/LIFE/LIFS1/9122737.shtml",0, +"`3⭻^ CHANCEq§ӤF","http://udn.com/NEWS/LIFE/LIFS1/9123169.shtml",0) +arMenu15_7 = new Array("nq Xҳ樮w","http://udn.com/NEWS/LIFE/X1/9126270.shtml",0, +"n򳥥ͤpӡIWHߧ]Ѱ","http://udn.com/NEWS/LIFE/X1/9125655.shtml",0, +"nba۵Mn Τ߬ݪ","http://udn.com/NEWS/LIFE/X1/9112028.shtml",0, +"ADܡHkHNRoǡK","http://udn.com/NEWS/LIFE/X1/9123497.shtml",0, +"Ob责I6ӳVɾ ","http://udn.com/NEWS/LIFE/X1/9123486.shtml",0, +"Ĥlоilh","http://udn.com/NEWS/LIFE/X1/9126745.shtml",0, +"ˤlʡP¤kֿB§","http://udn.com/NEWS/LIFE/X1/9126749.shtml",0, +"HYnͬMzH","http://udn.com/NEWS/LIFE/X1/9126747.shtml",0, +"ͬIwQqFAMOH","http://udn.com/NEWS/LIFE/X1/9126746.shtml",0, +"eaweGȴB ڧwyۤv","http://udn.com/NEWS/LIFE/X1/9115269.shtml",0, +"קKjоiAڷuv","http://udn.com/NEWS/LIFE/X1/9100928.shtml",0) +arMenu15_8 = new Array("4̰y s_Cϥ½","http://udn.com/NEWS/LIFE/LIFS2/9127166.shtml",0, +"CpwǷR ¨uHR|͡v","http://udn.com/NEWS/LIFE/LIFS2/9127049.shtml",0, +"ﱵC OrisBѱBus","http://udn.com/NEWS/LIFE/LIFS2/9124766.shtml",0, +"ɭC PǻV^","http://udn.com/NEWS/LIFE/LIFS2/9124767.shtml",0, +"զC ]_~»ȭ","http://udn.com/NEWS/LIFE/LIFS2/9124768.shtml",0, +"Cϱʽ ʳf§P","http://udn.com/NEWS/LIFE/LIFS2/9124777.shtml",0, +"wyCϸ~ t~ﭭw\I","http://udn.com/NEWS/LIFE/LIFS2/9124770.shtml",0, +"ƭC ɬ٥i洫§","http://udn.com/NEWS/LIFE/LIFS2/9124772.shtml",0, +"O16حCϾ O","http://udn.com/NEWS/LIFE/LIFS2/9125244.shtml",0, +"]LEDCϾ {NP","http://udn.com/NEWS/LIFE/LIFS2/9125126.shtml",0) +arMenu15_9 = new Array("Fi ʤOsBOBਮY","http://udn.com/NEWS/LIFE/LIF3/9127057.shtml",0, +"ͬf~ ĤJӰS","http://udn.com/NEWS/LIFE/LIF3/9126915.shtml",0, +"11R ʷ~12PP","http://udn.com/NEWS/LIFE/LIF3/9126924.shtml",0, +"HomeboxnծaPP 5.3_","http://udn.com/NEWS/LIFE/LIF3/9126925.shtml",0, +"Google~PjM sx","http://udn.com/NEWS/LIFE/LIF3/9124893.shtml",0, +"ʳfP~y ~ZW","http://udn.com/NEWS/LIFE/LIF3/9124889.shtml",0, +"Allez Voyager{GP pXŪ̻3","http://udn.com/NEWS/LIFE/LIF3/9124881.shtml",0, +"ܴH Fa֫Oxӫ~1_","http://udn.com/NEWS/LIFE/LIF3/9125052.shtml",0) +arMenu15_10 = new Array("ڽNβD t","http://udn.com/NEWS/LIFE/LIF5/9127623.shtml",0, +"xWkB\ģ зsf","http://udn.com/NEWS/LIFE/LIF5/9124158.shtml",0, +"DIYĿkn","http://udn.com/NEWS/LIFE/LIF5/9124160.shtml",0, +"DIYiͥҳ","http://udn.com/NEWS/LIFE/LIF5/9124159.shtml",0, +"DIYVfvs","http://udn.com/NEWS/LIFE/LIF5/9124161.shtml",0, +"DIYlxG","http://udn.com/NEWS/LIFE/LIF5/9124156.shtml",0, +"DIYjkªoy","http://udn.com/NEWS/LIFE/LIF5/9123717.shtml",0, +"\jvù۴ƪۣ","http://udn.com/NEWS/LIFE/LIF5/9119521.shtml",0, +"\jvIQ״","http://udn.com/NEWS/LIFE/LIF5/9119528.shtml",0, +"\jvA}Ųu","http://udn.com/NEWS/LIFE/LIF5/9119527.shtml",0, +"\jvĨF","http://udn.com/NEWS/LIFE/LIF5/9119526.shtml",0, +"sAK ЧANP","http://udn.com/NEWS/LIFE/LIF5/9123541.shtml",0, +"poD ɤlPDIY","http://udn.com/NEWS/LIFE/LIF5/9123523.shtml",0) +arMenu15_11 = new Array("Ӧ۪Fʪ","http://udn.com/NEWS/LIFE/LIFS5/9126407.shtml",0, +"Hhuv","http://udn.com/NEWS/LIFE/LIFS5/9126406.shtml",0, +"]eX@ɦWe","http://udn.com/NEWS/LIFE/LIFS5/9126404.shtml",0, +"...ڭ̳ѰOFӫּ","http://udn.com/NEWS/LIFE/LIFS5/9126403.shtml",0, +"QιsHɶּ","http://udn.com/NEWS/LIFE/LIFS5/9126396.shtml",0, +"Ip PX@ptϷ","http://udn.com/NEWS/LIFE/LIFS5/9126394.shtml",0, +"o˵LPq Ĥlߥû줣","http://udn.com/NEWS/LIFE/LIFS5/9126393.shtml",0, +"ǵLY...ݦVݤa","http://udn.com/NEWS/LIFE/LIFS5/9126389.shtml",0, +"WwM| Ӷaʷλa","http://udn.com/NEWS/LIFE/LIFS5/9126388.shtml",0, +"W§dwItϥJOJ|y","http://udn.com/NEWS/LIFE/LIFS5/9126387.shtml",0) +arMenu16 = new Array("Bʳo@~","http://udn.com/NEWS/HEALTH/AD1/",1, +"VmH","http://udn.com/NEWS/HEALTH/HEA11/",1, +"ķsD","http://udn.com/NEWS/HEALTH/HEA1/",1, +"dѦa","http://udn.com/NEWS/HEALTH/HEA2/",1, +"dD","http://udn.com/NEWS/HEALTH/HEA3/",1, +"dְT","http://udn.com/NEWS/HEALTH/HEA10/",1, +"E","http://udn.com/NEWS/HEALTH/HEA7/",1) +arMenu16_1 = new Array("dyyGAѨXBH","http://udn.com/NEWS/HEALTH/AD1/9126256.shtml",0, +"pYP Bʧ󦳮","http://udn.com/NEWS/HEALTH/AD1/9126253.shtml",0, +"ά޳гydsͬ","http://udn.com/NEWS/HEALTH/AD1/9126251.shtml",0, +"̨ιBʪk 5","http://udn.com/NEWS/HEALTH/AD1/9126486.shtml",0, +"3DP TRBʶq","http://udn.com/NEWS/HEALTH/AD1/9126489.shtml",0) +arMenu16_2 = new Array("ŮtjII7ZO@ߦ ","http://udn.com/NEWS/HEALTH/HEA11/9125650.shtml",0, +"ujh w̦wߪw","http://udn.com/NEWS/HEALTH/HEA11/9125653.shtml",0, +"ܴHʰ_ |۸۰","http://udn.com/NEWS/HEALTH/HEA11/9118560.shtml",0, +"ѧNY~Ŀ ɿꥢv ","http://udn.com/NEWS/HEALTH/HEA11/9125662.shtml",0, +"}NBBHNܡue۶ǯv ","http://udn.com/NEWS/HEALTH/HEA11/9118563.shtml",0, +"ܴHds nxTJh@I","http://udn.com/NEWS/HEALTH/HEA11/9118556.shtml",0) +arMenu16_3 = new Array("nyPӶլ PVֵoͪ","http://udn.com/NEWS/HEALTH/HEA1/9119438.shtml",0, +"neɫ~էK?`o@!","http://udn.com/NEWS/HEALTH/HEA1/9119437.shtml",0, +"nNIyP޵oͪy","http://udn.com/NEWS/HEALTH/HEA1/9116930.shtml",0, +"ѧNHĵ夣 ӬOy","http://udn.com/NEWS/HEALTH/HEA1/9127778.shtml",0, +"CKkX kjͳs@E","http://udn.com/NEWS/HEALTH/HEA1/9127235.shtml",0, +"ymIhѤn ixJ{g","http://udn.com/NEWS/HEALTH/HEA1/9127185.shtml",0, +"֤kYhOI _h@wF","http://udn.com/NEWS/HEALTH/HEA1/9127051.shtml",0, +"Х@xF|ҥ wiӪH","http://udn.com/NEWS/HEALTH/HEA1/9127031.shtml",0, +"֥i|q ηUU}","http://udn.com/NEWS/HEALTH/HEA1/9127167.shtml",0, +"~ C~]n`NuOv","http://udn.com/NEWS/HEALTH/HEA1/9126172.shtml",0, +"uKYVF xjеLͳN","http://udn.com/NEWS/HEALTH/HEA1/9125229.shtml",0) +arMenu16_4 = new Array("nq Xҳ樮w","http://udn.com/NEWS/HEALTH/HEA2/9126260.shtml",0, +"nwCOPDͪy߭I8","http://udn.com/NEWS/HEALTH/HEA2/9119450.shtml",0, +"]V ܦѤf ֤ͬl","http://udn.com/NEWS/HEALTH/HEA2/9127616.shtml",0, +"OvIߴ͸ Dg","http://udn.com/NEWS/HEALTH/HEA2/9127624.shtml",0, +"u@xŦ aۤví","http://udn.com/NEWS/HEALTH/HEA2/9127626.shtml",0, +"ͯfwɨB X۫H","http://udn.com/NEWS/HEALTH/HEA2/9127780.shtml",0, +"ѤHť[ Y~{B","http://udn.com/NEWS/HEALTH/HEA2/9126778.shtml",0, +"Uťjn ̾AΦձ","http://udn.com/NEWS/HEALTH/HEA2/9126783.shtml",0, +"dAڥL1ˤfS DzۤWNi","http://udn.com/NEWS/HEALTH/HEA2/9126786.shtml",0) +arMenu16_5 = new Array("iNA߶}NFH","http://udn.com/NEWS/HEALTH/HEA3/9125639.shtml",0, +"`oӳ Y","http://udn.com/NEWS/HEALTH/HEA3/9123480.shtml",0, +"5j~ ŤBQsW]","http://udn.com/NEWS/HEALTH/HEA3/9123478.shtml",0, +"MHBsA νwgeA","http://udn.com/NEWS/HEALTH/HEA3/9120990.shtml",0, +"pߡI¾~{gW","http://udn.com/NEWS/HEALTH/HEA3/9120989.shtml",0, +"TH w}I","http://udn.com/NEWS/HEALTH/HEA3/9125643.shtml",0, +"ĥoM ADDLʯg","http://udn.com/NEWS/HEALTH/HEA3/9121125.shtml",0) +arMenu16_6 = new Array("x_yDiͼ֬y","http://udn.com/NEWS/HEALTH/HEA10/9124730.shtml",0, +"s_ygfwg","http://udn.com/NEWS/HEALTH/HEA10/9124935.shtml",0, +"y~վi","http://udn.com/NEWS/HEALTH/HEA10/9124936.shtml",0, +"s_yͶA","http://udn.com/NEWS/HEALTH/HEA10/9124934.shtml",0, +"x_yLhzG","http://udn.com/NEWS/HEALTH/HEA10/9124933.shtml",0, +"y}f~h","http://udn.com/NEWS/HEALTH/HEA10/9124930.shtml",0, +"ydߥͬDuߦJB","http://udn.com/NEWS/HEALTH/HEA10/9124931.shtml",0, +"yղz","http://udn.com/NEWS/HEALTH/HEA10/9124932.shtml",0, +"x_yPVvDּ֥ͬ","http://udn.com/NEWS/HEALTH/HEA10/9110672.shtml",0) +arMenu16_7 = new Array("gӦnJļIӦYνwAH","http://udn.com/NEWS/HEALTH/HEA7/9126473.shtml",0, +"YɽոgHgָI6apɫ~","http://udn.com/NEWS/HEALTH/HEA7/9126474.shtml",0, +"hgܥ| i|hI","http://udn.com/NEWS/HEALTH/HEA7/9126475.shtml",0, +"ghh 85V","http://udn.com/NEWS/HEALTH/HEA7/9126476.shtml",0, +"WʥkhHlcٽF@ ","http://udn.com/NEWS/HEALTH/HEA7/9126478.shtml",0, +"WB oZ_~F10","http://udn.com/NEWS/HEALTH/HEA7/9126479.shtml",0) + +arMenu17 = new Array('̷s峹','http://udn.com/news/cindex/1013',0, 'Xm','http://udn.com/news/ccate/1013/7112#sub_7168',0, 'Yba','http://udn.com/news/ccate/1013/7114',0, 'Cť','http://udn.com/news/ccate/1013/7114',0, 'PȦ','http://udn.com/news/ccate/1013/7111#sub_7148',0, '~pC','http://udn.com/news/ccate/1013/7112',0, '|u','http://udn.com/news/ccate/1013/7110#sub_7119',0, 'BD˩Il','http://udn.com/news/ccate/1013/7111#sub_7159',0, 'g饻','http://udn.com/news/ccate/1013/7112#sub_7170',0) +//DONE + + + + +// created on wm@cmdes.udn.com 2014/12/13 11:20:3 1 3 + + + +arMenu18 = new Array('̷s峹','http://udn.com/news/cindex/1012',0, 'ЬF','http://udn.com/news/ccate/1012/6876#sub_6913',0, 'Ч','http://udn.com/news/ccate/1012/6876#sub_6914',0, 'nŪP','http://udn.com/news/ccate/1012/6880#sub_6947',0, 'ݷsDǭ^','http://udn.com/news/ccate/1012/6880#sub_6948',0) +//DONE + + + + +// created on wm@cmdes.udn.com 2014/12/13 11:19:5 1 2 + +arMenu19 = new Array("T}","http://udn.com/NEWS/READING/REA8/",1, +"}ɡE߱","http://udn.com/NEWS/READING/X4/",1, +"pơEЧ@","http://udn.com/NEWS/READING/X5/",1, +"ŪEѡEHM","http://udn.com/NEWS/READING/TOPIC2/",1, +"sѷmŪ","http://udn.com/NEWS/READING/NEWBOOK/",1, +"@aBlogs","http://udn.com/NEWS/READING/OUT1/",1, +"sp","http://udn.com/NEWS/READING/OUT2/",1, +"udnŪp","http://udn.com/NEWS/READING/REA2/",1) +arMenu19_6 = new Array("Eeڪ|[OЦҸ","http://udn.com/NEWS/READING/OUT1/9124237.shtml",0, +"vyNF itЧ@lDV","http://udn.com/NEWS/READING/OUT1/9124236.shtml",0, +"ݤӧڭ̨Lo","http://udn.com/NEWS/READING/OUT1/9124235.shtml",0, +"ֶּɨA{pbժ]ɨޮaA","http://udn.com/NEWS/READING/OUT1/9124234.shtml",0, +"sN˪U","http://udn.com/NEWS/READING/OUT1/9124233.shtml",0, +"DAӰb̪","http://udn.com/NEWS/READING/OUT1/9124232.shtml",0, +"²¡wdA","http://udn.com/NEWS/READING/OUT1/9124217.shtml",0, +"{XHxZ","http://udn.com/NEWS/READING/OUT1/9124209.shtml",0, +"iڭ̻ǤH","http://udn.com/NEWS/READING/OUT1/9124208.shtml",0, +"\ģO2015~12PyƷ~u@B","http://udn.com/NEWS/READING/OUT1/9124207.shtml",0) +arMenu19_7 = new Array("]檺[ߡŢm","http://udn.com/NEWS/READING/OUT2/9079184.shtml",0, +"Hl⩤_t","http://udn.com/NEWS/READING/OUT2/9079183.shtml",0, +"CaribouϪ","http://udn.com/NEWS/READING/OUT2/9079174.shtml",0) +arMenu19_8 = new Array("oOF_kӪkAohWFp","http://udn.com/NEWS/READING/REA2/9123772.shtml",0, +"lHߡAP~ġAͦM_AsĤH","http://udn.com/NEWS/READING/REA2/9119726.shtml",0, +"Lk͡AMb@iܦF","http://udn.com/NEWS/READING/REA2/9117362.shtml",0, +"¬rޤjVSb޳nzڲC","http://udn.com/NEWS/READING/REA2/9117311.shtml",0) + + + +arMenu20 = new Array("̷sWu峹","http://udn.com/news/cindex/1015",0, +"sDɨ","http://udn.com/news/ccate/1015/6818",0, +"]gѥ","http://udn.com/news/ccate/1015/6819",0, +"ӷ~","http://udn.com/news/ccate/1015/6821",0, +"Ѭ","http://udn.com/news/ccate/1015/6823",0, +"TֹB","http://udn.com/news/ccate/1015/6826",0, +"ȹC","http://udn.com/news/ccate/1015/6826",0, +"a","http://udn.com/news/ccate/1015/6829",0, +"Oɩ|","http://udn.com/news/ccate/1015/6830",0, +"]p~","http://udn.com/news/ccate/1015/6830",0, +"d֬","http://udn.com/news/ccate/1015/6832",0, +"ˤl|","http://udn.com/news/ccate/1015/6832",0, +"\Ū","http://udn.com/news/ccate/1015/6834",0) + + + + + +// created on wm@cmdes.udn.com 2014/12/13 10:50:6 1 6 + +arMenu21 = new Array("<!--@-->eQgy'Y>e","http://shopping.udn.com/mall/Cc1a00.do?sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",1, +"<!--@-->3C[}Y^1X","http://shopping.udn.com/mall/Cc1a00.do?sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",1, +"<!--@-->AmLBf\'Yތ","http://shopping.udn.com/mall/Cc1a00.do?sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",1, +"<!--@-->|vqe","http://shopping.udn.com/mall/Cc1a00.do?sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",1) + +arMenu21_1 = new Array("<!--@-->}egT&gؚ1200","http://shopping.udn.com/mall/cus/event/eventPage.do?url=http://img.udn.com/art/201412/newmember/index.html&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->hQl6dhs[5br&kePϑ NT","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=201501041pMJdMr5OBL&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->}Y6y&1\b^yyVyv","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=201412281OlzNcdSWPV&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->_ZZ_UN&2bRhT150bP8R","http://shopping.udn.com/mall/cus/event/eventPage.do?url=http://img.udn.com/art/20141027_MrRightWanted/index.html&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0) + +arMenu21_2 = new Array("<!--@-->njerk!F{hQ(gؚb5000","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=250012011N91qwSTLMK&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->P}3^9bw%gؚ5000&iPhone 6s","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202501016D1PFiC7Z8f&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->[[P}3^88b%gؚ5000ё","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202012021kGMs6Qiyd2&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->ss(u3CSbP8R%1\ߘK","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202012021kGMs6Qiyd2&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0) + +arMenu21_3 = new Array("<!--@-->EASYSHOPgQc250/\298%t^B}okyrg","http://shopping.udn.com/mall/cus/cat/Cc1c01.do?dc_cateid_0=C_009_008_024&dc_maxproductnum_0=60&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->agnes b.~v>kSS!79bQ150bP8R%sb","http://shopping.udn.com/mall/cus/cat/Cc1c01.do?dc_cateid_0=B_013_023_039&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->sYS"Y{^y%wv4lvhS3b!Pk2NsJ5b!","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=888812021q9XaM3tAeW&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->6}Yy6dHQhQb3bUP!Y8Rsb$150","http://shopping.udn.com/mall/cus/cat/Cc1c01.do?dc_cateid_0=A_004_026_002",0) + +arMenu21_4 = new Array("<!--@-->1350sb8R%3Myrf46b!p{","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202412071t7Vx1FHqj3&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->nM9600%_jʎKb_j!lon8R48b","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202412041qHwUXnBGRi&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->qi%[X[799!Ԛ849","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=2024120318JmQCMbSTg&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0, +"<!--@-->6y%swQ#">m \ gyr㌘!299up","http://shopping.udn.com/mall/cus/event/eventPage.do?header=true&UrlRefXuid=202412023EdMXOK5pUq&sid=94&utm_source=udn.com&utm_medium=referral_L_list&utm_content=L_list&utm_campaign=201408_udn.com(sid91.94)",0) + + + + + + + +arMenu22_1 = new Array( +'pGbqWu\a@ѡAڷ|amӹڡn','http://reading.udn.com/v2/bookDesc.do?id=66051&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_66051',0 +,'uebookvD686ҰXqūŧi','http://reading.udn.com/v2/bookDesc.do?id=67043&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_67043',0 +,'ͩRPͤĵ@JmҪFn','http://reading.udn.com/v2/bookDesc.do?id=66371',0 +,'bA@̬_ťեءI','http://reading.udn.com/v2/search.do?k=%E9%A6%AE%E5%85%89%E9%81%A0&pt=B',0 +,'XqӳaðӡAunVۤvN','http://reading.udn.com/v2/bookDesc.do?id=67064&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_67064',0 +,'̨iAֳtWOƲzGd','http://reading.udn.com/v2/bookDesc.do?id=66370&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_66370',0 +,'@ɳ̷RꪺʪmJ獴Ƿ|Rn','http://reading.udn.com/v2/bookDesc.do?id=66592',0 +,'jOWHG@RF״IP꺡Hڤ','http://reading.udn.com/v2/bookDesc.do?id=18915&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_18915',0 +,'mwfбŶinLMLūKKH','http://reading.udn.com/v2/bookDesc.do?id=30833&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_30833',0 +,'_ۤpm׷ҡnѤ֫wyQOJKùYI','http://reading.udn.com/v2/bookDesc.do?id=63020&utm_source=udnNews_cmebook&utm_medium=news&utm_campaign=book_63020',0 +) + +arMenu22_2 = new Array( +'ѤUxnХXȥѪ@N','http://reading.udn.com/v2/magDesc.do?mag_id=1019&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1019',0 +,'ӷ~PZnLॴѤTPH','http://reading.udn.com/v2/magDesc.do?mag_id=1024&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1024',0 +,'ssDgZn|GAL̳oˬݡKK','http://reading.udn.com/v2/magDesc.do?mag_id=1115&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1115',0 +,'sA饻nżvVuAWMA饻','http://reading.udn.com/v2/magDesc.do?mag_id=1074&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1074',0 +,'ʸxn}HߪK߫~P','http://reading.udn.com/v2/magDesc.do?mag_id=1164&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1164',0 +,'PZn108Iqqȿpe','http://reading.udn.com/v2/magDesc.do?mag_id=1028&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1028',0 +,'xWxnSҥЫ','http://reading.udn.com/v2/magDesc.do?mag_id=1163&utm_source=udnNews&utm_medium=news&utm_campaign=1163',0 +,'CTIMESsեnHJM`ʩma','http://reading.udn.com/v2/magDesc.do?mag_id=1091&utm_source=udnNews&utm_medium=news&utm_campaign=1091',0 +,'gZnqqvs|ɧO','http://reading.udn.com/v2/magDesc.do?mag_id=1026&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1026',0 +,'^yq English IslandnΥ@ɸ귽Ш|ۤv@~','http://reading.udn.com/v2/magDesc.do?mag_id=1245&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1245',0 +,'TVBSPZn^_ˢwníA߱o','http://reading.udn.com/v2/magDesc.do?mag_id=1216&utm_source=udnNews&utm_medium=news&utm_campaign=1216',0 +,'HOW IT WORKSѤjϸѡn]','http://reading.udn.com/v2/magDesc.do?mag_id=1254&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1254',0 +,'ja^ynChristmas Treats!','http://reading.udn.com/v2/magDesc.do?mag_id=1231&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1231',0 +,'BBC Knowledge 媩nH|X{kץĶܡH','http://reading.udn.com/v2/magDesc.do?mag_id=1206&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1206',0 +,'nxnЦaX@|Ұ','http://reading.udn.com/v2/magDesc.do?mag_id=1157&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1157',0 +,'gZnQ{ڪ̡AsMXMxW겣','http://reading.udn.com/v2/magDesc.do?mag_id=1241&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1241',0 +,'tWPyn VuP­\O]}lF','http://reading.udn.com/v2/magDesc.do?mag_id=1205&utm_source=udnNews_cmemag&utm_medium=news&utm_campaign=1205',0 +,'çnLVMHNO','http://reading.udn.com/v2/magDesc.do?mag_id=1079&utm_source=udnNews&utm_medium=news&utm_campaign=1079',0 +,'|anQsu̥OHCafe§','http://reading.udn.com/v2/magDesc.do?mag_id=1217&utm_source=udnNews&utm_medium=news&utm_campaign=1217',0 +,'design]pxn~rRPsT','http://reading.udn.com/v2/magDesc.do?mag_id=1224&utm_source=udnNews&utm_medium=news&utm_campaign=1224',0 +) + +arMenu22_3 = new Array( +'pXnMԤxWA׮tZ16ӦʤI ݦn Ls48%]ӭJӱj24%','http://reading.udn.com/v2/paperDesc.do?f_id=1&utm_source=udnNews_cmenewspaper&utm_medium=news&utm_campaign=united',0 +,'g٤nҳYަb~uɶO','http://reading.udn.com/v2/paperDesc.do?f_id=2&utm_source=udnNews_cmenewspaper&utm_medium=news&utm_campaign=economic',0 +,'pX߳n]PQXM101hXxW','http://reading.udn.com/v2/paperDesc.do?f_id=5&utm_source=udnNews_newspaper&utm_medium=news&utm_campaign=newspaper_5',0 +,'UpapernˡB U5 Ѱ','http://reading.udn.com/v2/paperDesc.do?f_id=4&utm_source=udnNews_newspaper&utm_medium=news&utm_campaign=newspaper_4',0 +,'ͬPn49]n ŬGs','http://reading.udn.com/v2/paperDesc.do?f_id=3&utm_source=udnNews_newspaper&utm_medium=news&utm_campaign=newspaper_3',0 +,'PneB} ӫиnH','http://reading.udn.com/v2/paperDesc.do?f_id=6',0 +,'îɩPnAwash In Apps,Returning To Science','http://reading.udn.com/v2/paperDesc.do?f_id=8',0 +) + +arMenu22 = new Array('ql','http://reading.udn.com/reading/index_ebook.do',1,'qlx','http://reading.udn.com/reading/index_emag.do',1,'ql','http://reading.udn.com/reading/index_enews.do',1) +//DONE + + + + +// created on wm@cmdes.udn.com 2014/12/13 17:21:7 1 7 + + + +arMenu23 = new Array("電腦資訊課程","http://learning.udn.com/learn/course/cate.jsp?area=18&main=56",1, +"語言進修課程","http://learning.udn.com/learn/course/cate.jsp?area=18&main=58",1, +"管理金融課程","http://learning.udn.com/learn/course/cate.jsp?area=18&main=57",1, +"證照考試課程","http://learning.udn.com/learn/course/cate.jsp?area=11",1, +"免費職場講座","http://learning.udn.com/learn/course/cate.jsp?area=12",1, +"課程優惠下載","http://learning.udn.com/learn/coupon/",1) +arMenu23_1 = new Array("互動式網站與Mobile App設計師","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2698",0, +"ASP.NET Web Form實務開","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2691",0, +"使用jQuery UI整合ASP.NE","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2685",0, +"VMware Horizon View","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2676",0, +" [獨家] SharePoint Se","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2671",0, +"ISO 27003資訊安全管理系統建置","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2604",0) + +arMenu23_2 = new Array("社交英文基礎班 ","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2792",0, +"提升學生英語能力","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2754",0, +"103年企業國際化人才培訓計畫~免費登記","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2348",0, +"背包客必學!旅遊日文讓你暢行無阻","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2036",0, +"線上免費課程-休閒運動篇","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=1988",0, +"免費線上課程-CNN新聞篇","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=1987",0) + +arMenu23_3 = new Array("透析Apple Watch科技商機!【","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2924",0, +"投資企業新商機【11/18新事業市場分","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2923",0, +"實現成為明星講師之夢!【12/5 T3","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2922",0, +"政府補助!【12/04 ITIS研習班","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2921",0, +"管理階層最重要的一堂課【12/06產業","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2920",0, +"Valeri 發展創造性想像力3","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2919",0) + +arMenu23_4 = new Array("Valeri萃智系統化商業管理創新1","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2916",0, +"PMP®國際專案管理師培訓課程(PMP","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2614",0, +"ISO 27001資訊安全管理系統主導","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2613",0, +"ITIL® V3 Foundation","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2612",0, +"EC-Council ECSP .NE","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2611",0, +"EC-Council ECSA資安分析","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2610",0) + +arMenu23_5 = new Array("宅博士系列講座-太神啦! 讓你投資沒在怕","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2926",0, +"宅博士系列講座-超強談判密技大公開","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2925",0, +"免費:互動式網站與Mobile App","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2579",0, +"Java 全方位 Web 程式設計師養","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2578",0, +"<免費>App 開發講座:智慧型手機應","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2558",0, +"<免費管理講座>PMP®國際專案管理師","http://learning.udn.com/learn/course/class.jsp?f_COURSE_ID=2556",0) + +arMenu23_6 = new Array("線上美語課程800堂","http://learning.udn.com/learn/coupon/coupon_content.jsp?f_fun=QUY&COUPON_ID=29",0, +"預約免費試讀_就送線上電腦課程12000堂","http://learning.udn.com/learn/coupon/coupon_content.jsp?f_fun=QUY&COUPON_ID=8",0) + + + +// created on wm@cmdes.udn.com 2014/12/13 17:18:10 1 386 + + + +arMenu24 = new Array("¾ssD","http://pro.udnjob.com/mag2/pro/itempage.jsp?f_MAIN_ID=70&f_SUB_ID=199",1, +"ĪѮw","http://pro.udnjob.com/mag2/fn/main_page.jsp?f_MAIN_ID=102",1, +"޲~","http://pro.udnjob.com/mag2/it/main_page.jsp?f_MAIN_ID=96",1, +"з~[","http://pro.udnjob.com/mag2/enter/index.jsp",1, +"N¾","http://pro.udnjob.com/mag2/pro/itempage.jsp?f_MAIN_ID=70&f_SUB_ID=643",1, +"Hꭱ[","http://pro.udnjob.com/mag2/hr/main_page.jsp?f_MAIN_ID=120",1, +"Ū¾","http://pro.udnjob.com/mag2/pro/itempage.jsp?f_MAIN_ID=70&f_SUB_ID=623",1) +arMenu24_1 = new Array("IЦaX@ Х~Gȭ˳~","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101157",0, +"xW̨O~GBݡBH","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101155",0, +"u`GƱuɦu","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101150",0, +"uU @~֤W6ѯZ","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101138",0, +"OɥROO Ae ","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101136",0, +"eis[Y [j^y","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=199&f_ART_ID=101135",0) + +arMenu24_2 = new Array("׻ yu²ġv","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=369&f_ART_ID=101170",0, +"xgTX@׾¢BЦp ij⩤T","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=348&f_ART_ID=101169",0, +"xgTX@׾¢Ӥ ~ñgTX@","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=348&f_ART_ID=101168",0, +"x HӾ","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=348&f_ART_ID=101167",0, +"޷|I~GxsB]MӦ@v","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=348&f_ART_ID=101166",0, +"Ȯ~aùH ~ۺM","http://pro.udnjob.com/mag2/fn/storypage.jsp?f_MAIN_ID=102&f_SUB_ID=369&f_ART_ID=101165",0) + +arMenu24_3 = new Array("poPKq ~Q2M","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=638&f_ART_ID=101158",0, +"poNu xnBpqf","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=638&f_ART_ID=101149",0, +"qո` 600H","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=638&f_ART_ID=101148",0, +"LGD8K~ xtƾ","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=639&f_ART_ID=101146",0, +"˸mNGۡHFq","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=639&f_ART_ID=101144",0, +"~ҴS xFquAqZv","http://pro.udnjob.com/mag2/it/storypage.jsp?f_MAIN_ID=96&f_SUB_ID=639&f_ART_ID=101143",0) + +arMenu24_4 = new Array("з~g͢pxФp Qۤv@|","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=690&f_ART_ID=101112",0, +"\T ~un񰵤jnv","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=690&f_ART_ID=101111",0, +"«aGQѶ ﰵp̦վj","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=654&f_ART_ID=101110",0, +"Ԥ@ zհkXs","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=690&f_ART_ID=101034",0, +"Ѥ~ oЮW","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=654&f_ART_ID=100921",0, +"3C~з~ ޶iֳtвy","http://pro.udnjob.com/mag2/enter/storypage.jsp?f_MAIN_ID=179&f_SUB_ID=654&f_ART_ID=100920",0) + +arMenu24_5 = new Array("D¾Q hPMPR{","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101173",0, +"xW150WŪA UP@_W","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101172",0, +"c10x~ 1628¾","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101062",0, +"~eQ¾HW¾ʹO30K","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101032",0, +"ǧu 泾]ܱMa","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101014",0, +"̬ MXҰʥͩR","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=643&f_ART_ID=101010",0) + +arMenu24_6 = new Array("޲zY ~gU","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=448&f_ART_ID=101081",0, +"^O oį","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=448&f_ART_ID=100888",0, +"U~ȦP׹L","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=449&f_ART_ID=100764",0, +"DޡKnгyֹּζ","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=448&f_ART_ID=100621",0, +"U~yP YpƮt","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=449&f_ART_ID=100382",0, +"Dz߰","http://pro.udnjob.com/mag2/hr/storypage.jsp?f_MAIN_ID=120&f_SUB_ID=448&f_ART_ID=100198",0) + +arMenu24_7 = new Array("UȪ߸","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100952",0, +"b@ɪߡAIۥ","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100951",0, +"ӳW̭nݤO","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100857",0, +"mߤߥR","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100459",0, +"mߩ֤u@","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100458",0, +"μgN ","http://pro.udnjob.com/mag2/pro/storypage.jsp?f_MAIN_ID=70&f_SUB_ID=623&f_ART_ID=100373",0) + + + +// created on wm@cmdes.udn.com 2014/12/13 17:21:6 1 141 + +arMenu26 = new Array("最新文章","http://style.udn.com/mag/Style/article_list.jsp",1, +"女星婚紗比一比","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11465",1, +"氣質女星魅力大","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11463",1, +"秋冬底妝示範","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11464",1, +"幸福耶誕禮","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11462",1, +"名人時尚","http://style.udn.com/mag/Style/article_list.jsp?MAIN_ID=201",1, +"服裝造型","http://style.udn.com/mag/Style/article_list.jsp?MAIN_ID=202",1, +"美妝保養","http://style.udn.com/mag/Style/article_list.jsp?MAIN_ID=203",1, +"鞋包配件","http://style.udn.com/mag/Style/article_list.jsp?MAIN_ID=204",1, +"都會女性.饗樂","http://style.udn.com/mag/Style/article_list.jsp?MAIN_ID=206",1, +"時尚討論.贈獎","http://style.udn.com/mag/Style/forum_main.jsp",1) + + +arMenu26_1 = new Array("「嬰兒藍」大衣 秋冬淺色新寵","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152487",0, +"流線、鏤空設計飾品 引領風騷","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152319",0, +"露出半個屁屁 超模熱跳「巧克力鋼管」舞","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152463",0, +"陶福媛/冷酷時尚 同志溫情","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152467",0, +"羅杰杜彼腕錶 絕美耶誕禮吸睛","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152359",0, +"10分鐘完成!孫芸芸電眼化妝術","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152480",0, +"GUCCI設計師Giannini 閃電去職!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152496",0, +"溫慶珠5套公主裝 迪士尼展登場","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152493",0, +"徵婚時尚/隋棠自購Kors包 不必男人送","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152477",0, +"動物「萌」入鏡 女星超模閃邊站","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152484",0, +"名牌也要搭得巧 年輕時尚正夯!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152441",0, +"米蘭達飛東京賣包 耶誕和前夫一起過","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152482",0, +"唇膏才是重點!明年「莓果色」最夯","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152481",0, +"精靈味十足!VALENTINO秀雪白世界","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152483",0) + + +arMenu26_2 = new Array("女星婚紗比一比/徐若瑄 優雅飄仙氣","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152157",0, +"女星婚紗比一比/高圓圓 女人味十足","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152156",0, +"女星婚紗比一比/周迅 唯美浪漫","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152155",0, +"女星婚紗比一比/許茹芸 低調奢華","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152154",0, +"女星婚紗比一比","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11465",0) + + +arMenu26_3 = new Array("熱門》性感塔塔不做菜改吃麵大呼Q彈","http://style.udn.com/mag/Style/article_story_preview.jsp?ART_ID=152356",0, +"氣質女星/凱莉穆莉根 著魔的魅力","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152040",0, +"氣質女星/Felicity 才子都愛她","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152041",0, +"氣質女星/梅蘭妮洛宏 脫俗才女","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152042",0, +"氣質女星/Emilia 性感純真味","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152043",0, +"前往專題:氣質女星魅力大","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11463",0) + + +arMenu26_4 = new Array("秋冬底妝/油性肌 保溼控油都重要","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152115",0, +"秋冬底妝/混合肌 思考「區塊分隔」","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152113",0, +"秋冬底妝/乾性肌 首重「油包水」","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152114",0, +"持妝功臣 底妝產品推薦!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152116",0, +"前往專題:秋冬底妝示範","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11464",0) + + +arMenu26_5 = new Array("幸福耶誕禮/保暖時尚 「圍」住你","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=151955",0, +"幸福耶誕禮/莞爾一笑 「萌」翻天","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152015",0, +"幸福耶誕禮/珍藏所愛 「包」開心","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=151954",0, +"幸福耶誕禮/抓住每一刻 「表」心意","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=151953",0, +"幸福耶誕禮/閃閃發亮 「金」喜氣","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=151952",0, +"前往專題:幸福耶誕禮","http://style.udn.com/mag/Style/topic_story.jsp?TOPIC_ID=11462",0) + + +arMenu26_6 = new Array("露出半個屁屁 超模熱跳「巧克力鋼管」舞","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152463",0, +"陶福媛/冷酷時尚 同志溫情","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152467",0, +"GUCCI設計師Giannini 閃電去職!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152496",0, +"米蘭達飛東京賣包 耶誕和前夫一起過","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152482",0, +"喬治小王子穿球衣 詹姆士秀修圖技","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152479",0, +"跟耶誕老公公許願 潔米金想要胸部長大","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152478",0, +"好萊塢遇高手 王力宏擦出美麗火花","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152388",0, +"有「痣」才叫美!盤點9女星、超模","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152366",0, +"怕有樣學樣?小布夫婦不准孩子刺青","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152462",0, +"超模榜TOP 3 劉雯迷暈歐美時尚圈","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=144081",0) + + +arMenu26_7 = new Array("「嬰兒藍」大衣 秋冬淺色新寵","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152487",0, +"溫慶珠5套公主裝 迪士尼展登場","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152493",0, +"徵婚時尚/隋棠自購Kors包 不必男人送","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152477",0, +"動物「萌」入鏡 女星超模閃邊站","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152484",0, +"名牌也要搭得巧 年輕時尚正夯!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152441",0, +"精靈味十足!VALENTINO秀雪白世界","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152483",0, +"LV2015春夏系列 來趟時空旅行","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152475",0, +"亞洲男生穿衣特色 誰最帥氣?","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=143889",0) + + +arMenu26_8 = new Array("10分鐘完成!孫芸芸電眼化妝術","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152480",0, +"唇膏才是重點!明年「莓果色」最夯","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152481",0, +"不用卡卡計較!專家教你「吃到飽」減肥法","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152461",0, +"香奈兒3色香氛 限量禮盒來了","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152447",0, +"彩妝跟韓風 氣墊粉餅掀買氣","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152444",0, +"天使超模愛揪咪!3Tips學會嘟嘟唇","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152398",0, +"琉璃藍睫毛膏 向聖羅蘭致敬","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152404",0, +"一洗定情! 「潔顏慕斯」使用正解","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=142438",0) + + +arMenu26_9 = new Array("流線、鏤空設計飾品 引領風騷","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152319",0, +"羅杰杜彼腕錶 絕美耶誕禮吸睛","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152359",0, +"Tom Ford金項鍊 「好害羞」上市","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152466",0, +"OMEGA耶誕獻禮 慶祝美好時刻 ","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152365",0, +"霸氣百達翡麗 「真心愛表」才賣給你","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152455",0, +"百達翡麗101最大經銷專賣店 「溫暖」開幕","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152440",0, +"保暖又流行 秋冬「毛怪時尚」一覽","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152152",0, +"PUMA復古麂皮鞋 「千頌伊弟」代言","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152296",0) + + +arMenu26_10 = new Array("愛馬仕首推家居香氛 打造生活好品味","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152299",0, +"音響老牌回春!Bose找五月天代言","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152298",0, +"學起來!換季衣物3大收納保養訣竅","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=151644",0, +"為討愛人歡心 情侶1年看5部爛片","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152151",0, +"5地點加速發胖 千萬別在這吃東西!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152269",0, +"失戀不只33天!分手三個月較不難過","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152265",0, +"KENZO x evian紀念瓶 幾何動感登場!","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152266",0, +"徵婚「啟示」/愛情備胎 變「爆胎」","http://style.udn.com/mag/Style/article_story.jsp?ART_ID=152189",0) + + +arMenu26_11 = new Array("得獎/「珍藏VOGUE 百年時尚禮服大揭祕」得獎公佈","http://style.udn.com/mag/Style/forum_topic.jsp?b=109&t=1687",0, +"聰明買/丹麥髮飾特賣會 折扣歷年最低","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1688",0, +"聰明買/CROSS年終特賣會 過季商品1折起","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1689",0, +"聰明買/KOOKAI聯名 限量針織品溫暖冬季","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1690",0, +"聰明買/SWATCH「翻轉聖誕」表 限量240組","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1691",0, +"聰明買/Repetto尖頭平底鞋 玩色亮相","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1692",0, +"聰明買/經典皮革靴 重現80年代頹廢","http://style.udn.com/mag/Style/forum_topic.jsp?b=111&t=1693",0) + + + +// created on wm@cmdes.udn.com 2014/12/13 17:15:6 1 371 + diff --git a/tests/models/Crawler/UDN/data/listing.json b/tests/models/Crawler/UDN/data/listing.json new file mode 100644 index 0000000..071942e --- /dev/null +++ b/tests/models/Crawler/UDN/data/listing.json @@ -0,0 +1,1076 @@ +[ + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127738.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127751.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127820.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127855.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127858.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127865.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127873.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127876.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127916.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127947.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127952.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9127977.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128003.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128009.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS1/9128018.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127703.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127838.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127841.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127842.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127846.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127857.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127874.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127888.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127891.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127922.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127941.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127972.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9127976.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9128011.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS2/9128019.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127933.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127935.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127936.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127951.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127955.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127970.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127971.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127974.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127981.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127982.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9127994.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128012.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128015.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128016.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS3/9128024.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127620.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127628.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127629.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127633.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127645.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127774.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127822.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127860.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127863.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127907.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127953.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127973.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127980.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9127992.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS4/9128008.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127870.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127871.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127875.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127883.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127893.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127906.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127910.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127915.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127923.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127948.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127961.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127978.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9127990.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9128014.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS5/9128017.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127770.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127814.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127830.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127835.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127839.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127847.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127849.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127851.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127852.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127881.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127903.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127942.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127949.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9127991.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS6/9128023.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127416.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127551.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127566.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127567.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127568.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127573.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127574.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127575.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127630.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127649.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127828.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127886.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127940.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9127946.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS7/9128010.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127561.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127617.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127637.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127643.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127697.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127836.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127844.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127885.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127889.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127892.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127937.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127944.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS8/9127979.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127831.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127859.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127905.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127911.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127924.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127934.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127938.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127939.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127943.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127945.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127957.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127958.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9127959.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9128013.shtml", + "http://udn.com/NEWS/BREAKINGNEWS/BREAKINGNEWS9/9128022.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9126975.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127012.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127099.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127125.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127175.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127179.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM1/9127233.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9126998.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9126999.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127001.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127021.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127064.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127074.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127163.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127169.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127229.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127237.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM2/9127782.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127039.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127040.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127041.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127044.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127050.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127052.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127180.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127186.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127188.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM3/9127214.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM4/9127048.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM4/9127126.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM4/9127128.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM4/9127171.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM4/9127274.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127096.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127102.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127174.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127177.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127191.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127280.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127282.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM5/9127284.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM6/9127037.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM6/9127066.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM6/9127068.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM6/9127071.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM6/9127219.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9126973.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9126977.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9126979.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127022.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127028.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127195.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127199.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127228.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127240.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127241.shtml", + "http://udn.com/NEWS/DOMESTIC/DOM7/9127263.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9086732.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9112123.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9112175.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9124027.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9125423.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126802.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126821.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9126829.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127400.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127401.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT1/9127405.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9104159.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9125644.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126284.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126798.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9126804.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127251.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127399.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127404.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT2/9127563.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9124463.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9125656.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9125959.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126381.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126865.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126870.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9126875.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT3/9127348.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9114239.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9115918.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9118788.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9120309.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9123569.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9124155.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9124773.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9125460.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9125783.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT4/9126040.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125486.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125489.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9125654.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126347.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126350.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9126873.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9127398.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT5/9127785.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124763.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124771.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9124780.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126823.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126825.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126827.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9126866.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT6/9127286.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9124783.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9125398.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9125961.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126314.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126799.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126805.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126808.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126810.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126830.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126858.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT7/9126863.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124231.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124263.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124265.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124266.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124277.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124332.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124333.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9124335.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9126691.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9126879.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENT8/9127254.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9122831.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123079.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123084.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123087.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9123089.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9124818.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126159.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126806.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS2/9126824.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9108812.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9114877.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9116261.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9118475.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9123267.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9125733.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/ENTS3/9127655.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT2/9118450.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT2/9125845.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT2/9125924.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT2/9126024.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT2/9126069.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126285.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126286.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126287.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126288.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126289.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126293.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126294.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126295.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126298.shtml", + "http://udn.com/NEWS/ENTERTAINMENT/OUT3/9126299.shtml", + "http://udn.com/NEWS/FINANCE/AD1/8758194.shtml", + "http://udn.com/NEWS/FINANCE/AD1/8758195.shtml", + "http://udn.com/NEWS/FINANCE/AD1/8758197.shtml", + "http://udn.com/NEWS/FINANCE/AD1/8758198.shtml", + "http://udn.com/NEWS/FINANCE/AD1/8758199.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9086794.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9102021.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9104161.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9126774.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9126883.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127139.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127142.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127218.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127220.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127221.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127654.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127656.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127664.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127776.shtml", + "http://udn.com/NEWS/FINANCE/FIN1/9127777.shtml", + "http://udn.com/NEWS/FINANCE/FIN10/9124996.shtml", + "http://udn.com/NEWS/FINANCE/FIN10/9124998.shtml", + "http://udn.com/NEWS/FINANCE/FIN10/9125000.shtml", + "http://udn.com/NEWS/FINANCE/FIN10/9125002.shtml", + "http://udn.com/NEWS/FINANCE/FIN10/9127216.shtml", + "http://udn.com/NEWS/FINANCE/FIN11/9124970.shtml", + "http://udn.com/NEWS/FINANCE/FIN11/9124975.shtml", + "http://udn.com/NEWS/FINANCE/FIN11/9124976.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9115452.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9115630.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9115880.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9122769.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9123056.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9124797.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9125112.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9125158.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9125216.shtml", + "http://udn.com/NEWS/FINANCE/FIN12/9125307.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9126099.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9126101.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9126911.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127147.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127148.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127150.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127153.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127154.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127156.shtml", + "http://udn.com/NEWS/FINANCE/FIN3/9127162.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9126126.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9126395.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9126878.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127110.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127111.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127113.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127117.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127121.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127215.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127302.shtml", + "http://udn.com/NEWS/FINANCE/FIN4/9127331.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9117267.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126112.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126117.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126130.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126134.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126868.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126871.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126874.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9126882.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9127114.shtml", + "http://udn.com/NEWS/FINANCE/FIN9/9127160.shtml", + "http://udn.com/NEWS/FINANCE/X1/8774253.shtml", + "http://udn.com/NEWS/FINANCE/X1/8774254.shtml", + "http://udn.com/NEWS/FINANCE/X1/8774255.shtml", + "http://udn.com/NEWS/FINANCE/X1/8774258.shtml", + "http://udn.com/NEWS/FINANCE/X1/8775972.shtml", + "http://udn.com/NEWS/FUND/FUN1/9120847.shtml", + "http://udn.com/NEWS/FUND/FUN1/9120849.shtml", + "http://udn.com/NEWS/FUND/FUN1/9120852.shtml", + "http://udn.com/NEWS/FUND/FUN1/9120854.shtml", + "http://udn.com/NEWS/FUND/FUN1/9123168.shtml", + "http://udn.com/NEWS/FUND/FUN1/9123180.shtml", + "http://udn.com/NEWS/FUND/FUN1/9123181.shtml", + "http://udn.com/NEWS/FUND/FUN1/9125367.shtml", + "http://udn.com/NEWS/FUND/FUN1/9125370.shtml", + "http://udn.com/NEWS/FUND/FUN1/9125371.shtml", + "http://udn.com/NEWS/FUND/FUN1/9126405.shtml", + "http://udn.com/NEWS/FUND/FUN10/9116989.shtml", + "http://udn.com/NEWS/FUND/FUN10/9119161.shtml", + "http://udn.com/NEWS/FUND/FUN10/9119612.shtml", + "http://udn.com/NEWS/FUND/FUN10/9120848.shtml", + "http://udn.com/NEWS/FUND/FUN10/9121523.shtml", + "http://udn.com/NEWS/FUND/FUN10/9125507.shtml", + "http://udn.com/NEWS/FUND/FUN10/9125508.shtml", + "http://udn.com/NEWS/FUND/FUN10/9125768.shtml", + "http://udn.com/NEWS/FUND/FUN10/9126451.shtml", + "http://udn.com/NEWS/FUND/FUN10/9126462.shtml", + "http://udn.com/NEWS/FUND/FUN11/9119729.shtml", + "http://udn.com/NEWS/FUND/FUN11/9121522.shtml", + "http://udn.com/NEWS/FUND/FUN11/9123171.shtml", + "http://udn.com/NEWS/FUND/FUN11/9123175.shtml", + "http://udn.com/NEWS/FUND/FUN11/9127370.shtml", + "http://udn.com/NEWS/FUND/FUN2/9119720.shtml", + "http://udn.com/NEWS/FUND/FUN2/9119723.shtml", + "http://udn.com/NEWS/FUND/FUN2/9122179.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123176.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123177.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123178.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123179.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123182.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123183.shtml", + "http://udn.com/NEWS/FUND/FUN2/9123184.shtml", + "http://udn.com/NEWS/FUND/FUN2/9125365.shtml", + "http://udn.com/NEWS/FUND/FUN2/9125368.shtml", + "http://udn.com/NEWS/FUND/FUN7/9118420.shtml", + "http://udn.com/NEWS/FUND/FUN7/9119677.shtml", + "http://udn.com/NEWS/FUND/FUN7/9119736.shtml", + "http://udn.com/NEWS/FUND/FUN7/9120846.shtml", + "http://udn.com/NEWS/FUND/FUN7/9120851.shtml", + "http://udn.com/NEWS/FUND/FUN7/9123174.shtml", + "http://udn.com/NEWS/FUND/FUN7/9125366.shtml", + "http://udn.com/NEWS/FUND/FUN7/9125369.shtml", + "http://udn.com/NEWS/FUND/FUN7/9126450.shtml", + "http://udn.com/NEWS/FUND/FUN8/9122736.shtml", + "http://udn.com/NEWS/FUND/FUN8/9123055.shtml", + "http://udn.com/NEWS/FUND/FUN8/9124977.shtml", + "http://udn.com/NEWS/FUND/FUN8/9124995.shtml", + "http://udn.com/NEWS/FUND/FUN8/9124997.shtml", + "http://udn.com/NEWS/FUND/FUND4/9117808.shtml", + "http://udn.com/NEWS/FUND/FUND4/9117810.shtml", + "http://udn.com/NEWS/FUND/FUND4/9120856.shtml", + "http://udn.com/NEWS/FUND/FUND4/9122665.shtml", + "http://udn.com/NEWS/FUND/FUND4/9122964.shtml", + "http://udn.com/NEWS/FUND/FUND4/9124999.shtml", + "http://udn.com/NEWS/FUND/FUND5/9124112.shtml", + "http://udn.com/NEWS/FUND/FUND5/9125718.shtml", + "http://udn.com/NEWS/HEALTH/AD1/9126251.shtml", + "http://udn.com/NEWS/HEALTH/AD1/9126253.shtml", + "http://udn.com/NEWS/HEALTH/AD1/9126256.shtml", + "http://udn.com/NEWS/HEALTH/AD1/9126486.shtml", + "http://udn.com/NEWS/HEALTH/AD1/9126489.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9116930.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9119437.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9119438.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9125229.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9126172.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127031.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127051.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127167.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127185.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127235.shtml", + "http://udn.com/NEWS/HEALTH/HEA1/9127778.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9110672.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124730.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124930.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124931.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124932.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124933.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124934.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124935.shtml", + "http://udn.com/NEWS/HEALTH/HEA10/9124936.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9118556.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9118560.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9118563.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9125650.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9125653.shtml", + "http://udn.com/NEWS/HEALTH/HEA11/9125662.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9119450.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9126260.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9126778.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9126783.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9126786.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9127616.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9127624.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9127626.shtml", + "http://udn.com/NEWS/HEALTH/HEA2/9127780.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9120989.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9120990.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9121125.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9123478.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9123480.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9125639.shtml", + "http://udn.com/NEWS/HEALTH/HEA3/9125643.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126473.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126474.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126475.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126476.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126478.shtml", + "http://udn.com/NEWS/HEALTH/HEA7/9126479.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9086747.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9104160.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9112121.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127046.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127217.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127222.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127243.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127245.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127248.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127264.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127266.shtml", + "http://udn.com/NEWS/LIFE/LIF1/9127314.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9124252.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9125149.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9125249.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127014.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127063.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127072.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127127.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127184.shtml", + "http://udn.com/NEWS/LIFE/LIF10/9127317.shtml", + "http://udn.com/NEWS/LIFE/LIF2/7924065.shtml", + "http://udn.com/NEWS/LIFE/LIF2/7924294.shtml", + "http://udn.com/NEWS/LIFE/LIF2/8298874.shtml", + "http://udn.com/NEWS/LIFE/LIF2/8298875.shtml", + "http://udn.com/NEWS/LIFE/LIF2/8298876.shtml", + "http://udn.com/NEWS/LIFE/LIF2/9126267.shtml", + "http://udn.com/NEWS/LIFE/LIF2/9127242.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9124881.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9124889.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9124893.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9125052.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9126915.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9126924.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9126925.shtml", + "http://udn.com/NEWS/LIFE/LIF3/9127057.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9119521.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9119526.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9119527.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9119528.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9123523.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9123541.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9123717.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9124156.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9124158.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9124159.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9124160.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9124161.shtml", + "http://udn.com/NEWS/LIFE/LIF5/9127623.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9120372.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9120567.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9120751.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9120753.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9123303.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9125168.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9125241.shtml", + "http://udn.com/NEWS/LIFE/LIF6/9126048.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9028459.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9046417.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9069384.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9088943.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9106853.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9109039.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9109715.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9111974.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9114623.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9114629.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9116239.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9116242.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9118908.shtml", + "http://udn.com/NEWS/LIFE/LIF7/9123270.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9112080.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9122737.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9123169.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9124784.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9124961.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9124968.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9127133.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9127194.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9127224.shtml", + "http://udn.com/NEWS/LIFE/LIFS1/9127225.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124766.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124767.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124768.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124770.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124772.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9124777.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9125126.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9125244.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9127049.shtml", + "http://udn.com/NEWS/LIFE/LIFS2/9127166.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126387.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126388.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126389.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126393.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126394.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126396.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126403.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126404.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126406.shtml", + "http://udn.com/NEWS/LIFE/LIFS5/9126407.shtml", + "http://udn.com/NEWS/LIFE/X1/9100928.shtml", + "http://udn.com/NEWS/LIFE/X1/9112028.shtml", + "http://udn.com/NEWS/LIFE/X1/9115269.shtml", + "http://udn.com/NEWS/LIFE/X1/9123486.shtml", + "http://udn.com/NEWS/LIFE/X1/9123497.shtml", + "http://udn.com/NEWS/LIFE/X1/9125655.shtml", + "http://udn.com/NEWS/LIFE/X1/9126270.shtml", + "http://udn.com/NEWS/LIFE/X1/9126745.shtml", + "http://udn.com/NEWS/LIFE/X1/9126746.shtml", + "http://udn.com/NEWS/LIFE/X1/9126747.shtml", + "http://udn.com/NEWS/LIFE/X1/9126749.shtml", + "http://udn.com/NEWS/MAINLAND/AD1/9097064.shtml", + "http://udn.com/NEWS/MAINLAND/AD1/9097065.shtml", + "http://udn.com/NEWS/MAINLAND/AD1/9097066.shtml", + "http://udn.com/NEWS/MAINLAND/AD1/9097087.shtml", + "http://udn.com/NEWS/MAINLAND/AD1/9097088.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9102025.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9117264.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9125909.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9125935.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9126237.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9126239.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9127034.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9127326.shtml", + "http://udn.com/NEWS/MAINLAND/MAI1/9127328.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9111214.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9124949.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9124984.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9125951.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9125952.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9125953.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9125954.shtml", + "http://udn.com/NEWS/MAINLAND/MAI2/9127337.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9117265.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127083.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127085.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127095.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127098.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127151.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127152.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127165.shtml", + "http://udn.com/NEWS/MAINLAND/MAI3/9127657.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9124942.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9124947.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9124948.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9124982.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9124983.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9125014.shtml", + "http://udn.com/NEWS/MAINLAND/MAI4/9125018.shtml", + "http://udn.com/NEWS/MAINLAND/MAIN3/9127077.shtml", + "http://udn.com/NEWS/MAINLAND/MAIN3/9127078.shtml", + "http://udn.com/NEWS/MAINLAND/MAIN3/9127164.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/8966261.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9086731.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9117259.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9126082.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127047.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127107.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127234.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127301.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127363.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127758.shtml", + "http://udn.com/NEWS/NATIONAL/NAT1/9127759.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8621612.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998923.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998924.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998925.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998928.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998929.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998932.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998933.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/8998934.shtml", + "http://udn.com/NEWS/NATIONAL/NAT2/9126386.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9126038.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127129.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127265.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127267.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127268.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127269.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127360.shtml", + "http://udn.com/NEWS/NATIONAL/NAT3/9127765.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9116779.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9118737.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9118779.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9125834.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9126055.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9126086.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127287.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127289.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127293.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127295.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127296.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127298.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127315.shtml", + "http://udn.com/NEWS/NATIONAL/NAT4/9127345.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/8567452.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9086716.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9102019.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9126054.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127054.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127239.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127247.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127304.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127309.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127313.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127319.shtml", + "http://udn.com/NEWS/NATIONAL/NAT5/9127362.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9102020.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9102044.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9117256.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9127305.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9127307.shtml", + "http://udn.com/NEWS/NATIONAL/NATS1/9127310.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9083764.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9098872.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9102855.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9107950.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9113467.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9117040.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9117774.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9119824.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9122291.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9122314.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9125703.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9125705.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9126261.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9126651.shtml", + "http://udn.com/NEWS/NATIONAL/NATS10/9127834.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9104158.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9112039.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9112072.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9126080.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127137.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127230.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127231.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127232.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127312.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127316.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127353.shtml", + "http://udn.com/NEWS/NATIONAL/NATS3/9127755.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9112037.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9116451.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9116898.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127035.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127212.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127244.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127246.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127262.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127272.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127318.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127320.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127357.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127753.shtml", + "http://udn.com/NEWS/NATIONAL/NATS4/9127757.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127291.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127300.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127303.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127306.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127308.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127322.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127356.shtml", + "http://udn.com/NEWS/NATIONAL/NATS5/9127358.shtml", + "http://udn.com/NEWS/OPINION/OPI1/9127208.shtml", + "http://udn.com/NEWS/OPINION/OPI1/9127260.shtml", + "http://udn.com/NEWS/OPINION/OPI1/9127261.shtml", + "http://udn.com/NEWS/OPINION/OPI1/9127754.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9114249.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9115976.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9118028.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9120795.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9122709.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9124744.shtml", + "http://udn.com/NEWS/OPINION/OPI2/9126781.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9104784.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9121183.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9122098.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9122109.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9123664.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9124036.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9124037.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9124261.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9125485.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9126034.shtml", + "http://udn.com/NEWS/OPINION/OPI3/9126316.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9114525.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9116113.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9118304.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9120723.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9123111.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9125296.shtml", + "http://udn.com/NEWS/OPINION/OPI4/9127329.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125784.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125785.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125786.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125787.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125788.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125790.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125791.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125792.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125793.shtml", + "http://udn.com/NEWS/OPINION/OUT1/9125794.shtml", + "http://udn.com/NEWS/OPINION/OUT2/7068437.shtml", + "http://udn.com/NEWS/OPINION/OUT2/8839858.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9121260.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9121262.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9121263.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125795.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125796.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125797.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125803.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125805.shtml", + "http://udn.com/NEWS/OPINION/OUT2/9125806.shtml", + "http://udn.com/NEWS/OPINION/X1/9114485.shtml", + "http://udn.com/NEWS/OPINION/X1/9114487.shtml", + "http://udn.com/NEWS/OPINION/X1/9127323.shtml", + "http://udn.com/NEWS/OPINION/X1/9127324.shtml", + "http://udn.com/NEWS/OPINION/X1/9127325.shtml", + "http://udn.com/NEWS/OPINION/X1/9127332.shtml", + "http://udn.com/NEWS/OPINION/X1/9127334.shtml", + "http://udn.com/NEWS/OPINION/X1/9127336.shtml", + "http://udn.com/NEWS/OPINION/X1/9127338.shtml", + "http://udn.com/NEWS/OPINION/X1/9127340.shtml", + "http://udn.com/NEWS/OPINION/X1/9127341.shtml", + "http://udn.com/NEWS/READING/OUT1/9124207.shtml", + "http://udn.com/NEWS/READING/OUT1/9124208.shtml", + "http://udn.com/NEWS/READING/OUT1/9124209.shtml", + "http://udn.com/NEWS/READING/OUT1/9124217.shtml", + "http://udn.com/NEWS/READING/OUT1/9124232.shtml", + "http://udn.com/NEWS/READING/OUT1/9124233.shtml", + "http://udn.com/NEWS/READING/OUT1/9124234.shtml", + "http://udn.com/NEWS/READING/OUT1/9124235.shtml", + "http://udn.com/NEWS/READING/OUT1/9124236.shtml", + "http://udn.com/NEWS/READING/OUT1/9124237.shtml", + "http://udn.com/NEWS/READING/OUT2/9079174.shtml", + "http://udn.com/NEWS/READING/OUT2/9079183.shtml", + "http://udn.com/NEWS/READING/OUT2/9079184.shtml", + "http://udn.com/NEWS/READING/REA2/9117311.shtml", + "http://udn.com/NEWS/READING/REA2/9117362.shtml", + "http://udn.com/NEWS/READING/REA2/9119726.shtml", + "http://udn.com/NEWS/READING/REA2/9123772.shtml", + "http://udn.com/NEWS/SOCIETY/SOC1/9126262.shtml", + "http://udn.com/NEWS/SOCIETY/SOC1/9127192.shtml", + "http://udn.com/NEWS/SOCIETY/SOC1/9127206.shtml", + "http://udn.com/NEWS/SOCIETY/SOC1/9127276.shtml", + "http://udn.com/NEWS/SOCIETY/SOC1/9127281.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127070.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127124.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127190.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127207.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127210.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127250.shtml", + "http://udn.com/NEWS/SOCIETY/SOC2/9127283.shtml", + "http://udn.com/NEWS/SOCIETY/SOC3/9127053.shtml", + "http://udn.com/NEWS/SOCIETY/SOC3/9127168.shtml", + "http://udn.com/NEWS/SOCIETY/SOC3/9127273.shtml", + "http://udn.com/NEWS/SOCIETY/SOC3/9127275.shtml", + "http://udn.com/NEWS/SOCIETY/SOC5/9127024.shtml", + "http://udn.com/NEWS/SOCIETY/SOC5/9127069.shtml", + "http://udn.com/NEWS/SOCIETY/SOC5/9127172.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127056.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127135.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127182.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127189.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127201.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127278.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127285.shtml", + "http://udn.com/NEWS/SOCIETY/SOC6/9127352.shtml", + "http://udn.com/NEWS/SOCIETY/SOC7/9127058.shtml", + "http://udn.com/NEWS/SOCIETY/SOC7/9127223.shtml", + "http://udn.com/NEWS/SOCIETY/SOC7/9127277.shtml", + "http://udn.com/NEWS/SOCIETY/SOC7/9127279.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9117483.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9117484.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9119635.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9119636.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9124352.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9124353.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9124356.shtml", + "http://udn.com/NEWS/SPORTS/OUT/9124357.shtml", + "http://udn.com/NEWS/SPORTS/SP7/9126076.shtml", + "http://udn.com/NEWS/SPORTS/SP7/9127294.shtml", + "http://udn.com/NEWS/SPORTS/SP7/9127297.shtml", + "http://udn.com/NEWS/SPORTS/SP7/9127730.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9123549.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9124536.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9126079.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9127196.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9127198.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9127200.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9127203.shtml", + "http://udn.com/NEWS/SPORTS/SPO1/9127204.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/7274865.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/9127209.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/9127288.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/9127290.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/9127292.shtml", + "http://udn.com/NEWS/SPORTS/SPO2/9127729.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9056903.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9096415.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9125772.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9125869.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9126072.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9126313.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9127299.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9127727.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9127728.shtml", + "http://udn.com/NEWS/SPORTS/SPO4/9127843.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9118780.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9125474.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9125992.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9125994.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9125997.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127211.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127718.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127719.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127720.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127721.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127732.shtml", + "http://udn.com/NEWS/SPORTS/SPO5/9127733.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9116916.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9126011.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9126012.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127116.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127120.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127122.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127123.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127646.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127712.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127715.shtml", + "http://udn.com/NEWS/SPORTS/SPO7/9127716.shtml", + "http://udn.com/NEWS/STOCK/AD1/8455007.shtml", + "http://udn.com/NEWS/STOCK/AD1/8455008.shtml", + "http://udn.com/NEWS/STOCK/AD1/8455009.shtml", + "http://udn.com/NEWS/STOCK/AD1/8455010.shtml", + "http://udn.com/NEWS/STOCK/AD1/8455011.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127253.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127259.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127350.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127351.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127359.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127361.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127364.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127365.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127366.shtml", + "http://udn.com/NEWS/STOCK/ST08/9127367.shtml", + "http://udn.com/NEWS/STOCK/STO2/9125719.shtml", + "http://udn.com/NEWS/STOCK/STO2/9125725.shtml", + "http://udn.com/NEWS/STOCK/STO2/9125729.shtml", + "http://udn.com/NEWS/STOCK/STO2/9126402.shtml", + "http://udn.com/NEWS/STOCK/STO2/9126903.shtml", + "http://udn.com/NEWS/STOCK/STO2/9126906.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127132.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127144.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127158.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127213.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127698.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127699.shtml", + "http://udn.com/NEWS/STOCK/STO2/9127764.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126088.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126091.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126103.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126114.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126170.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126927.shtml", + "http://udn.com/NEWS/STOCK/STO3/9126928.shtml", + "http://udn.com/NEWS/STOCK/STO3/9127000.shtml", + "http://udn.com/NEWS/STOCK/STO3/9127002.shtml", + "http://udn.com/NEWS/STOCK/STO3/9127015.shtml", + "http://udn.com/NEWS/STOCK/STO4/9126102.shtml", + "http://udn.com/NEWS/STOCK/STO4/9126109.shtml", + "http://udn.com/NEWS/STOCK/STO4/9126118.shtml", + "http://udn.com/NEWS/STOCK/STO4/9126945.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127027.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127029.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127032.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127033.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127036.shtml", + "http://udn.com/NEWS/STOCK/STO4/9127038.shtml", + "http://udn.com/NEWS/STOCK/STO5/9126121.shtml", + "http://udn.com/NEWS/STOCK/STO5/9126125.shtml", + "http://udn.com/NEWS/STOCK/STO5/9126128.shtml", + "http://udn.com/NEWS/STOCK/STO5/9126132.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127004.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127011.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127013.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127017.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127020.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127112.shtml", + "http://udn.com/NEWS/STOCK/STO5/9127700.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126087.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126111.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126970.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126971.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126972.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126974.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126976.shtml", + "http://udn.com/NEWS/STOCK/STO6/9126978.shtml", + "http://udn.com/NEWS/STOCK/STO6/9127704.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126035.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126037.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126062.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126083.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126084.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126104.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126122.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126124.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126527.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126528.shtml", + "http://udn.com/NEWS/STOCK/STO9/9126532.shtml", + "http://udn.com/NEWS/WORLD/AD2/9116291.shtml", + "http://udn.com/NEWS/WORLD/AD2/9116293.shtml", + "http://udn.com/NEWS/WORLD/AD2/9116412.shtml", + "http://udn.com/NEWS/WORLD/AD2/9116433.shtml", + "http://udn.com/NEWS/WORLD/AD2/9116434.shtml", + "http://udn.com/NEWS/WORLD/OUT/9115208.shtml", + "http://udn.com/NEWS/WORLD/OUT/9119145.shtml", + "http://udn.com/NEWS/WORLD/OUT/9124577.shtml", + "http://udn.com/NEWS/WORLD/OUT/9124578.shtml", + "http://udn.com/NEWS/WORLD/WOR1/9127086.shtml", + "http://udn.com/NEWS/WORLD/WOR1/9127089.shtml", + "http://udn.com/NEWS/WORLD/WOR1/9127094.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9125739.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9126392.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9126860.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127130.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127136.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127138.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127161.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127202.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127705.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127706.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127707.shtml", + "http://udn.com/NEWS/WORLD/WOR2/9127708.shtml", + "http://udn.com/NEWS/WORLD/WOR3/8611697.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9102024.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9118781.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9125901.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9125902.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9125933.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9125934.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9125984.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9126850.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9127333.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9127766.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9127772.shtml", + "http://udn.com/NEWS/WORLD/WOR3/9127773.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9117266.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9125804.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9125807.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9126852.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9126853.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9126885.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9126950.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9127335.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9127339.shtml", + "http://udn.com/NEWS/WORLD/WOR4/9127409.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126162.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126164.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126339.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126340.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126341.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126463.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126855.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9126949.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9127134.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9127170.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9127783.shtml", + "http://udn.com/NEWS/WORLD/WOR6/9127784.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9125715.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9125773.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9125822.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9125887.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9125993.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9126036.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9126195.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9126300.shtml", + "http://udn.com/NEWS/WORLD/WOR7/9126990.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114845.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114855.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114856.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114858.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114859.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9114864.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9120194.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9122442.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9124048.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9124755.shtml", + "http://udn.com/NEWS/WORLD/WORS2/9125320.shtml" +] \ No newline at end of file diff --git a/tests/run-all.php b/tests/run-all.php new file mode 100644 index 0000000..095d115 --- /dev/null +++ b/tests/run-all.php @@ -0,0 +1,16 @@ + $info){ + require_once $file; +} diff --git a/webdata/init.inc.php b/webdata/init.inc.php index 3cc77c1..8130d00 100644 --- a/webdata/init.inc.php +++ b/webdata/init.inc.php @@ -2,34 +2,159 @@ error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE); -include(__DIR__ . '/stdlibs/pixframework/Pix/Loader.php'); +// 設定 include path 及 autoload +require_once(__DIR__ . '/stdlibs/diff_match_patch-php-master/diff_match_patch.php'); +require_once(__DIR__ . '/stdlibs/pixframework/Pix/Loader.php'); set_include_path(__DIR__ . '/stdlibs/pixframework/' . PATH_SEPARATOR . __DIR__ . '/models' . PATH_SEPARATOR . __DIR__ . '/stdlibs/Dropbox-master/' ); -require_once(__DIR__ . '/stdlibs/diff_match_patch-php-master/diff_match_patch.php'); - Pix_Loader::registerAutoLoad(); -if (file_exists(__DIR__ . '/config.php')) { - include(__DIR__ . '/config.php'); -} // TODO: 之後要搭配 geoip date_default_timezone_set('Asia/Taipei'); mb_internal_encoding("UTF-8"); -if (!getenv('DATABASE_URL')) { - die('need DATABASE_URL'); +// 如有設定檔,使用該檔設定 +if (file_exists(__DIR__ . '/config.php')) { + include(__DIR__ . '/config.php'); } -if (!preg_match('#mysql://([^:]*):([^@]*)@([^/]*)/(.*)#', strval(getenv('DATABASE_URL')), $matches)) { - die('mysql only'); + +// 在測試模式下,跳過資料庫連結程序 +if (UNITTEST_MODE !== true) { + if (!getenv('DATABASE_URL')) { + die('need DATABASE_URL'); + } + if (!preg_match('#mysql://([^:]*):([^@]*)@([^/]*)/(.*)#', strval(getenv('DATABASE_URL')), $matches)) { + die('mysql only'); + } + + $db = new StdClass; + $db->host = $matches[3]; + $db->username = $matches[1]; + $db->password = $matches[2]; + $db->dbname = $matches[4]; + $config = new StdClass; + $config->master = $config->slave = $db; + Pix_Table::setDefaultDb(new Pix_Table_Db_Adapter_MysqlConf(array($config))); } -$db = new StdClass; -$db->host = $matches[3]; -$db->username = $matches[1]; -$db->password = $matches[2]; -$db->dbname = $matches[4]; -$config = new StdClass; -$config->master = $config->slave = $db; -Pix_Table::setDefaultDb(new Pix_Table_Db_Adapter_MysqlConf(array($config))); +// define news sources +NewsSourcesCfg::setAll(array( + 1 => array( + 'name' => '蘋果', + 'class' => 'Crawler_Appledaily', + 'parsers' => array( + 'www.appledaily.com.tw' => 'parse', + ), + ), + 2 => array( + 'name' => '中時', + 'class' => 'Crawler_Chinatimes', + 'parsers' => array( + 'www.chinatimes.com' => 'parse', + ), + ), + 3 => array( + 'name' => '中央社', + 'class' => 'Crawler_CNA', + 'parsers' => array( + 'www.cna.com.tw' => 'parse', + ), + ), + 4 => array( + 'name' => '東森', + 'class' => 'Crawler_Ettoday', + 'parsers' => array( + 'www.ettoday.net' => 'parse', + ), + ), + 5 => array( + 'name' => '自由', + 'class' => 'Crawler_Libertytimes', + 'parsers' => array( + 'iservice.libertytimes.com.tw' => 'parse', + 'news.ltn.com.tw' => 'parse', + 'www.libertytimes.com.tw' => 'parse2', + ), + ), + 6 => array( + 'name' => '新頭殼', + 'class' => 'Crawler_Newtalk', + 'parsers' => array( + 'newtalk.tw' => 'parse', + ), + ), + 7 => array( + 'name' => 'NowNews', + 'class' => 'Crawler_Nownews', + 'parsers' => array( + 'www.nownews.com' => 'parse', + ), + ), + 8 => array( + 'name' => '聯合', + 'class' => 'Crawler_UDN', + 'parsers' => array( + 'udn.com' => 'parse', + ), + ), + 9 => array( + 'name' => 'TVBS', + 'class' => 'Crawler_TVBS', + 'parsers' => array( + 'news.tvbs.com.tw' => 'parse', + ), + ), + 10 => array( + 'name' => '中廣新聞網', + 'class' => 'Crawler_BCC', + 'parsers' => array( + 'www.bcc.com.tw' => 'parse', + ), + ), + 11 => array( + 'name' => '公視新聞網', + 'class' => 'Crawler_PTS', + 'parsers' => array( + 'news.pts.org.tw' => 'parse', + ), + ), + 12 => array( + 'name' => '台視', + 'class' => 'Crawler_TTV', + 'parsers' => array( + 'www.ttv.com.tw' => 'parse', + ), + ), + 13 => array( + 'name' => '華視', + 'class' => 'Crawler_CTS', + 'parsers' => array( + 'news.cts.com.tw' => 'parse', + ), + ), + 14 => array( + 'name' => '民視', + 'class' => 'Crawler_FTV', + 'parsers' => array( + 'news.ftv.com.tw' => 'parse', + ), + ), + /* + 15 => array( + 'name' => '三立', + 'class' => 'Crawler_SETNews', + 'parsers' => array( + 'www.setnews.net' => 'parse', + ), + ), + */ + 16 => array( + 'name' => '風傳媒', + 'class' => 'Crawler_StormMediaGroup', + 'parsers' => array( + 'www.stormmediagroup.com' => 'parse', + ), + ), +)); diff --git a/webdata/models/Crawler.php b/webdata/models/Crawler.php index 8a12082..2bd4141 100644 --- a/webdata/models/Crawler.php +++ b/webdata/models/Crawler.php @@ -74,13 +74,19 @@ public static function getBody($url, $wait = 0.5, $throw_exception = true, $retr return $content; } - public static function updateContent($news, $content, $header) + public static function prepareContent($content) { - $now = time(); - if (preg_match('/content="text\/html; charset=big5/', $content)) { $content = iconv('big5', 'utf-8', $content); } + return $content; + } + + public static function updateContent($news, $content, $header) + { + $now = time(); + + $content = self::prepareContent($content); $last_info = $news->infos->order('`time` DESC')->first(); $ret = NewsRaw::getInfo($content, $news->url); @@ -303,4 +309,18 @@ public static function getTextFromDom($node) } return $ret; } + + public static function crawl($id, $class, $insert_limit) { + $content = call_user_func(array($class, 'crawlIndex')); + $links = call_user_func(array($class, 'findLinksIn'), $content); + $insert = $update = 0; + foreach ($links as $link) { + $url = Crawler::standardURL($link); + $update ++; + $insert += News::addNews($url, $id); + if ($insert_limit <= $insert) { + break; + } + } + } } diff --git a/webdata/models/Crawler/Appledaily.php b/webdata/models/Crawler/Appledaily.php index 092f7fd..80b7a55 100644 --- a/webdata/models/Crawler/Appledaily.php +++ b/webdata/models/Crawler/Appledaily.php @@ -1,8 +1,9 @@ 404<\/title>/', $body)) { - $ret = new StdClass; - $ret->title = '404'; - $ret->body = '404'; - return $ret; - } + // add \n after end of paragraphs, ease to separate paragrahs later + $body = preg_replace('/(\|\|\<\/p\>|\<\/div\>)/', "$1\n", $body); + $doc = new DOMDocument('1.0', 'UTF-8'); @$doc->loadHTML($body); $ret = new StdClass; - foreach ($doc->getElementsByTagName('div') as $div_dom) { - if ($div_dom->getAttribute('class') == 'news_content') { - if ($div_dom->getElementsByTagName('h1')->item(0)) { - $ret->title = $div_dom->getElementsByTagName('h1')->item(0)->nodeValue; - } else { - $ret->title = $div_dom->getElementsByTagName('h2')->item(0)->nodeValue; - } - foreach ($div_dom->getElementsByTagName('div') as $child_div_dom) { - if ($child_div_dom->getAttribute('class') == 'box_2') { - $ret->body = ''; - foreach ($child_div_dom->getElementsByTagName('p')->item(0)->childNodes as $childNode) { - if (trim($childNode->nodeValue) == '※你可能還想看:') { - break; - } - $ret->body .= Crawler::getTextFromDom($childNode); - } - break; - } - } - break; + // get data, if exists + $item = $doc->getElementById('ctl00_ctl00_cph_container_cph_primary_View2014_PnlCont'); + if ($item === NULL) { + return NULL; + } + + // parse title + $og_title = FALSE; + foreach ($doc->getElementsByTagName('meta') as $meta) { + if ($meta->getAttribute('property') == 'og:title') { + $og_title = $meta->getAttribute('content'); } } - $ret->body = trim($ret->body); + $ret->title = preg_replace('/^(.+?)[ ]*\|.*$/', '$1', $og_title); + // parse body + $ret->body = $item->nodeValue; + $ret->body = preg_replace('/[\n\r\t ]*(\n|\r)[\n\r\t ]*/', "\n\n", $ret->body); // fix line breaks + $ret->body = trim($ret->body); return $ret; } } diff --git a/webdata/models/Crawler/CTS.php b/webdata/models/Crawler/CTS.php index 2219752..00e56f5 100644 --- a/webdata/models/Crawler/CTS.php +++ b/webdata/models/Crawler/CTS.php @@ -1,8 +1,8 @@ loadHTML($body); + @$doc->loadHTML(mb_convert_encoding($body, 'HTML-ENTITIES', 'UTF-8')); $ret = new StdClass; if (!$doc->getElementById('newsti')){ // 新版 diff --git a/webdata/models/Crawler/Newtalk.php b/webdata/models/Crawler/Newtalk.php index 6217dad..6c4ac1e 100644 --- a/webdata/models/Crawler/Newtalk.php +++ b/webdata/models/Crawler/Newtalk.php @@ -1,26 +1,21 @@ = 14; $i ++) { $content .= Crawler::getBody('http://newtalk.tw/rss_news.php?oid=' . $i); } + return $content; + } + public static function findLinksIn($content) + { preg_match_all('#http://newtalk.tw\/news/\d+/\d+/\d+/\d+\.html#', $content, $matches); - $insert = $update = 0; - foreach ($matches[0] as $link) { - $update ++; - $link = Crawler::standardURL($link); - $insert += News::addNews($link, 6); - if ($insert_limit <= $insert) { - break; - } - } - return array($update, $insert); + return array_unique($matches[0]); } public static function parse($body) diff --git a/webdata/models/Crawler/Nownews.php b/webdata/models/Crawler/Nownews.php index 46c8768..2b752fc 100644 --- a/webdata/models/Crawler/Nownews.php +++ b/webdata/models/Crawler/Nownews.php @@ -1,24 +1,20 @@ |\|\<\/p\>|\<\/div\>)/', "$1\n", $body); + $doc = new DOMDocument('1.0', 'UTF-8'); @$doc->loadHTML($body); $ret = new StdClass; - foreach ($doc->getElementsByTagName('meta') as $meta_dom) { - if ('og:title' == $meta_dom->getAttribute('property')) { - $ret->title = preg_replace('#-公視新聞網$#', '', $meta_dom->getAttribute('content')); - } + + // read content + $content = ''; + $finder = new DomXPath($doc); + + // find title + $itemList = $finder->query("//td[@class='News_page_tittle']/table/tr/table/td"); + if ($itemList->length == 0) { + return NULL; } + $ret->title = trim($itemList->item(0)->nodeValue); - $ret->body = ''; - foreach ($doc->getElementsByTagName('p') as $p_dom) { - if ($p_dom->getAttribute('class') == 'Page') { - $ret->body .= Crawler::getTextFromDom($p_dom); - } + // find body + $content = ''; + $itemList = $finder->query("//p[@class='Page']"); + foreach ($itemList as $item) { + $content .= $item->nodeValue; } - if ($ret->title and $ret->body) { - return $ret; + $ret->body = $content; + $ret->body = preg_replace('/[\n\r\t ]*(\n|\r)[\n\r\t ]*/', "\n\n", $ret->body); // fix line breaks + $ret->body = trim($ret->body); + if (empty($ret->body)) { + return NULL; } - return null; + return $ret; } } diff --git a/webdata/models/Crawler/SETNews.php b/webdata/models/Crawler/SETNews.php index 0964f9c..f790316 100644 --- a/webdata/models/Crawler/SETNews.php +++ b/webdata/models/Crawler/SETNews.php @@ -1,22 +1,17 @@ '蘋果', - 2 => '中時', - 3 => '中央社', - 4 => '東森', - 5 => '自由', - 6 => '新頭殼', - 7 => 'NowNews', - 8 => '聯合', - 9 => 'TVBS', - 10 => '中廣新聞網', - 11 => '公視新聞網', - 12 => '台視', - 13 => '華視', - 14 => '民視', -// 15 => '三立', - 16 => '風傳媒', - ); + return NewsSourcesCfg::getNames(); } } diff --git a/webdata/models/NewsRaw.php b/webdata/models/NewsRaw.php index 19c53e7..8b2882c 100644 --- a/webdata/models/NewsRaw.php +++ b/webdata/models/NewsRaw.php @@ -49,78 +49,14 @@ public static function getInfo($raw, $url) return $ret; } - switch ($host) { - case 'www.chinatimes.com': - $ret = Crawler_Chinatimes::parse($raw); - break; - - case 'www.appledaily.com.tw': - $ret = Crawler_Appledaily::parse($raw); - break; - - case 'www.nownews.com': - $ret = Crawler_Nownews::parse($raw); - break; - - case 'www.ettoday.net': - $ret = Crawler_Ettoday::parse($raw); - break; - - case 'newtalk.tw': - $ret = Crawler_Newtalk::parse($raw); - break; - - case 'iservice.libertytimes.com.tw': - case 'news.ltn.com.tw': - $ret = Crawler_Libertytimes::parse($raw); - break; - - case 'www.libertytimes.com.tw': - $ret = Crawler_Libertytimes::parse2($raw); - break; - - case 'www.cna.com.tw': - $ret = Crawler_CNA::parse($raw); - break; - - case 'udn.com': - $ret = Crawler_UDN::parse($raw); - break; - - case 'news.tvbs.com.tw': - $ret = Crawler_TVBS::parse($raw); - break; - - case 'www.bcc.com.tw': - $ret = Crawler_BCC::parse($raw); - break; - - case 'news.pts.org.tw': - $ret = Crawler_PTS::parse($raw); - break; - - case 'www.ttv.com.tw': - $ret = Crawler_TTV::parse($raw); - break; - - case 'news.cts.com.tw': - $ret = Crawler_CTS::parse($raw); - break; - - case 'news.ftv.com.tw': - $ret = Crawler_FTV::parse($raw); - break; - - case 'www.setnews.net': - $ret = Crawler_SETNews::parse($raw); - break; - - case 'www.stormmediagroup.com': - $ret = Crawler_StormMediaGroup::parse($raw); - break; - - default: - throw new Exception('unknown host: ' . $url); + if (($callback = NewsSourcesCfg::getHostParser($host)) === FALSE) { + throw new Exception('unknown host: ' . $host); + } else { + if (!is_callable($callback)) { + throw new Exception('callback error: ' . var_export($callback, TRUE) . + ' is not callable (for '. $host . ')'); + } + $ret = call_user_func($callback, $raw); } if (!$ret->title or !$ret->body) { diff --git a/webdata/models/NewsSourcesCfg.php b/webdata/models/NewsSourcesCfg.php new file mode 100644 index 0000000..c6f00d3 --- /dev/null +++ b/webdata/models/NewsSourcesCfg.php @@ -0,0 +1,117 @@ + $def) { + // 檢模新聞來源的 class,必需為實現 Crawler_Common 的類型 + // 以確保它包含 Crawler::crawl 所需用到的方法 + if (!is_subclass_of($def['class'], 'Crawler_Common')) { + throw new Exception('Parameter "class" '.$def['class']. + ' (news id='.$id.') is not implementing interface Crawler_Common'); + return FALSE; + } + } + return TRUE; + } + + /** + * getHostParser + * @param string $host 文章 url 的 host 部份 + * @return mixed 文章解析器的 callback。若果沒有找到對應 $host 的解析器,傳回 False + */ + static function getHostParser($host) + { + if (isset(self::$parser_callbacks[$host])) + { + return self::$parser_callbacks[$host]; + } + foreach (self::$cfg as $id => $source ) + { + foreach ((array) $source['parsers'] as $parser_host => $parser_method) + { + if ($parser_host == $host) + { + self::$parser_callbacks[$host] = array($source['class'], $parser_method); + break; + } + } + if (isset(self::$parser_callbacks[$host])) return self::$parser_callbacks[$host]; + } + return FALSE; // there is no match + } + + /** + * getCrawlers + * @return string[] 新聞來源的 Crawler 類型名稱清單,key 為新聞來源的 id + */ + static function getCrawlers() + { + $crawlers = array(); + foreach (self::$cfg as $id => $source) + { + $crawlers[$id] = $source['class']; + } + return $crawlers; + } + + /** + * getNames + * @return string[] 新聞來源的名稱清單,key 為新聞來源的 id + */ + static function getNames() + { + $crawlers = array(); + foreach (self::$cfg as $id => $source) + { + $crawlers[$id] = $source['name']; + } + return $crawlers; + } + +} \ No newline at end of file diff --git a/webdata/scripts/crawler-new.php b/webdata/scripts/crawler-new.php index a12d4f6..1c96865 100644 --- a/webdata/scripts/crawler-new.php +++ b/webdata/scripts/crawler-new.php @@ -3,24 +3,7 @@ include(__DIR__ . '/../init.inc.php'); Pix_Table::$_save_memory = true; -$crawlers = array( - 1 => 'Crawler_Appledaily', - 2 => 'Crawler_Chinatimes', - 3 => 'Crawler_CNA', - 4 => 'Crawler_Ettoday', - 5 => 'Crawler_Libertytimes', - 6 => 'Crawler_Newtalk', - 7 => 'Crawler_Nownews', - 8 => 'Crawler_UDN', - 9 => 'Crawler_TVBS', - 10 => 'Crawler_BCC', - 11 => 'Crawler_PTS', - 12 => 'Crawler_TTV', - 13 => 'Crawler_CTS', - 14 => 'Crawler_FTV', -// 15 => 'Crawler_SETNews', - 16 => 'Crawler_StormMediaGroup' -); +$crawlers = NewsSourcesCfg::getCrawlers(); $insert_count = 0; $max_insert = 500; @@ -29,7 +12,7 @@ break; } try { - list($update, $insert) = call_user_func(array($class, 'crawl'), $max_insert - $insert_count); + list($update, $insert) = Crawler::crawl($id, $class, $max_insert - $insert_count); } catch (Exception $e) { error_log("$class failed: " . $e->getMessage()); continue; diff --git a/webdata/stdlibs/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE b/webdata/stdlibs/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE new file mode 100644 index 0000000..a65e83e --- /dev/null +++ b/webdata/stdlibs/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE @@ -0,0 +1,399 @@ +Simple Test interface changes +============================= +Because the SimpleTest tool set is still evolving it is likely that tests +written with earlier versions will fail with the newest ones. The most +dramatic changes are in the alpha releases. Here is a list of possible +problems and their fixes... + +assertText() no longer finds a string inside a ', 'js'); + $this->mapHandler('comment', 'ignore'); + $this->addEntryPattern('', 'comment'); + } + + /** + * Pattern matches to start and end a tag. + * @param string $tag Name of tag to scan for. + * @access private + */ + protected function addTag($tag) { + $this->addSpecialPattern("", 'text', 'acceptEndToken'); + $this->addEntryPattern("<$tag", 'text', 'tag'); + } + + /** + * Pattern matches to parse the inside of a tag + * including the attributes and their quoting. + * @access private + */ + protected function addInTagTokens() { + $this->mapHandler('tag', 'acceptStartToken'); + $this->addSpecialPattern('\s+', 'tag', 'ignore'); + $this->addAttributeTokens(); + $this->addExitPattern('/>', 'tag'); + $this->addExitPattern('>', 'tag'); + } + + /** + * Matches attributes that are either single quoted, + * double quoted or unquoted. + * @access private + */ + protected function addAttributeTokens() { + $this->mapHandler('dq_attribute', 'acceptAttributeToken'); + $this->addEntryPattern('=\s*"', 'tag', 'dq_attribute'); + $this->addPattern("\\\\\"", 'dq_attribute'); + $this->addExitPattern('"', 'dq_attribute'); + $this->mapHandler('sq_attribute', 'acceptAttributeToken'); + $this->addEntryPattern("=\s*'", 'tag', 'sq_attribute'); + $this->addPattern("\\\\'", 'sq_attribute'); + $this->addExitPattern("'", 'sq_attribute'); + $this->mapHandler('uq_attribute', 'acceptAttributeToken'); + $this->addSpecialPattern('=\s*[^>\s]*', 'tag', 'uq_attribute'); + } +} + +/** + * Converts HTML tokens into selected SAX events. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleHtmlSaxParser { + private $lexer; + private $listener; + private $tag; + private $attributes; + private $current_attribute; + + /** + * Sets the listener. + * @param SimplePhpPageBuilder $listener SAX event handler. + * @access public + */ + function __construct($listener) { + $this->listener = $listener; + $this->lexer = $this->createLexer($this); + $this->tag = ''; + $this->attributes = array(); + $this->current_attribute = ''; + } + + /** + * Runs the content through the lexer which + * should call back to the acceptors. + * @param string $raw Page text to parse. + * @return boolean False if parse error. + * @access public + */ + function parse($raw) { + return $this->lexer->parse($raw); + } + + /** + * Sets up the matching lexer. Starts in 'text' mode. + * @param SimpleSaxParser $parser Event generator, usually $self. + * @return SimpleLexer Lexer suitable for this parser. + * @access public + */ + static function createLexer(&$parser) { + return new SimpleHtmlLexer($parser); + } + + /** + * Accepts a token from the tag mode. If the + * starting element completes then the element + * is dispatched and the current attributes + * set back to empty. The element or attribute + * name is converted to lower case. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function acceptStartToken($token, $event) { + if ($event == LEXER_ENTER) { + $this->tag = strtolower(substr($token, 1)); + return true; + } + if ($event == LEXER_EXIT) { + $success = $this->listener->startElement( + $this->tag, + $this->attributes); + $this->tag = ''; + $this->attributes = array(); + return $success; + } + if ($token != '=') { + $this->current_attribute = strtolower(html_entity_decode($token, ENT_QUOTES)); + $this->attributes[$this->current_attribute] = ''; + } + return true; + } + + /** + * Accepts a token from the end tag mode. + * The element name is converted to lower case. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function acceptEndToken($token, $event) { + if (! preg_match('/<\/(.*)>/', $token, $matches)) { + return false; + } + return $this->listener->endElement(strtolower($matches[1])); + } + + /** + * Part of the tag data. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function acceptAttributeToken($token, $event) { + if ($this->current_attribute) { + if ($event == LEXER_UNMATCHED) { + $this->attributes[$this->current_attribute] .= + html_entity_decode($token, ENT_QUOTES); + } + if ($event == LEXER_SPECIAL) { + $this->attributes[$this->current_attribute] .= + preg_replace('/^=\s*/' , '', html_entity_decode($token, ENT_QUOTES)); + } + } + return true; + } + + /** + * A character entity. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function acceptEntityToken($token, $event) { + } + + /** + * Character data between tags regarded as + * important. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function acceptTextToken($token, $event) { + return $this->listener->addContent($token); + } + + /** + * Incoming data to be ignored. + * @param string $token Incoming characters. + * @param integer $event Lexer event type. + * @return boolean False if parse error. + * @access public + */ + function ignore($token, $event) { + return true; + } +} + +/** + * SAX event handler. Maintains a list of + * open tags and dispatches them as they close. + * @package SimpleTest + * @subpackage WebTester + */ +class SimplePhpPageBuilder { + private $tags; + private $page; + private $private_content_tag; + private $open_forms = array(); + private $complete_forms = array(); + private $frameset = false; + private $loading_frames = array(); + private $frameset_nesting_level = 0; + private $left_over_labels = array(); + + /** + * Frees up any references so as to allow the PHP garbage + * collection from unset() to work. + * @access public + */ + function free() { + unset($this->tags); + unset($this->page); + unset($this->private_content_tags); + $this->open_forms = array(); + $this->complete_forms = array(); + $this->frameset = false; + $this->loading_frames = array(); + $this->frameset_nesting_level = 0; + $this->left_over_labels = array(); + } + + /** + * This builder is always available. + * @return boolean Always true. + */ + function can() { + return true; + } + + /** + * Reads the raw content and send events + * into the page to be built. + * @param $response SimpleHttpResponse Fetched response. + * @return SimplePage Newly parsed page. + * @access public + */ + function parse($response) { + $this->tags = array(); + $this->page = $this->createPage($response); + $parser = $this->createParser($this); + $parser->parse($response->getContent()); + $this->acceptPageEnd(); + $page = $this->page; + $this->free(); + return $page; + } + + /** + * Creates an empty page. + * @return SimplePage New unparsed page. + * @access protected + */ + protected function createPage($response) { + return new SimplePage($response); + } + + /** + * Creates the parser used with the builder. + * @param SimplePhpPageBuilder $listener Target of parser. + * @return SimpleSaxParser Parser to generate + * events for the builder. + * @access protected + */ + protected function createParser(&$listener) { + return new SimpleHtmlSaxParser($listener); + } + + /** + * Start of element event. Opens a new tag. + * @param string $name Element name. + * @param hash $attributes Attributes without content + * are marked as true. + * @return boolean False on parse error. + * @access public + */ + function startElement($name, $attributes) { + $factory = new SimpleTagBuilder(); + $tag = $factory->createTag($name, $attributes); + if (! $tag) { + return true; + } + if ($tag->getTagName() == 'label') { + $this->acceptLabelStart($tag); + $this->openTag($tag); + return true; + } + if ($tag->getTagName() == 'form') { + $this->acceptFormStart($tag); + return true; + } + if ($tag->getTagName() == 'frameset') { + $this->acceptFramesetStart($tag); + return true; + } + if ($tag->getTagName() == 'frame') { + $this->acceptFrame($tag); + return true; + } + if ($tag->isPrivateContent() && ! isset($this->private_content_tag)) { + $this->private_content_tag = &$tag; + } + if ($tag->expectEndTag()) { + $this->openTag($tag); + return true; + } + $this->acceptTag($tag); + return true; + } + + /** + * End of element event. + * @param string $name Element name. + * @return boolean False on parse error. + * @access public + */ + function endElement($name) { + if ($name == 'label') { + $this->acceptLabelEnd(); + return true; + } + if ($name == 'form') { + $this->acceptFormEnd(); + return true; + } + if ($name == 'frameset') { + $this->acceptFramesetEnd(); + return true; + } + if ($this->hasNamedTagOnOpenTagStack($name)) { + $tag = array_pop($this->tags[$name]); + if ($tag->isPrivateContent() && $this->private_content_tag->getTagName() == $name) { + unset($this->private_content_tag); + } + $this->addContentTagToOpenTags($tag); + $this->acceptTag($tag); + return true; + } + return true; + } + + /** + * Test to see if there are any open tags awaiting + * closure that match the tag name. + * @param string $name Element name. + * @return boolean True if any are still open. + * @access private + */ + protected function hasNamedTagOnOpenTagStack($name) { + return isset($this->tags[$name]) && (count($this->tags[$name]) > 0); + } + + /** + * Unparsed, but relevant data. The data is added + * to every open tag. + * @param string $text May include unparsed tags. + * @return boolean False on parse error. + * @access public + */ + function addContent($text) { + if (isset($this->private_content_tag)) { + $this->private_content_tag->addContent($text); + } else { + $this->addContentToAllOpenTags($text); + } + return true; + } + + /** + * Any content fills all currently open tags unless it + * is part of an option tag. + * @param string $text May include unparsed tags. + * @access private + */ + protected function addContentToAllOpenTags($text) { + foreach (array_keys($this->tags) as $name) { + for ($i = 0, $count = count($this->tags[$name]); $i < $count; $i++) { + $this->tags[$name][$i]->addContent($text); + } + } + } + + /** + * Parsed data in tag form. The parsed tag is added + * to every open tag. Used for adding options to select + * fields only. + * @param SimpleTag $tag Option tags only. + * @access private + */ + protected function addContentTagToOpenTags(&$tag) { + if ($tag->getTagName() != 'option') { + return; + } + foreach (array_keys($this->tags) as $name) { + for ($i = 0, $count = count($this->tags[$name]); $i < $count; $i++) { + $this->tags[$name][$i]->addTag($tag); + } + } + } + + /** + * Opens a tag for receiving content. Multiple tags + * will be receiving input at the same time. + * @param SimpleTag $tag New content tag. + * @access private + */ + protected function openTag($tag) { + $name = $tag->getTagName(); + if (! in_array($name, array_keys($this->tags))) { + $this->tags[$name] = array(); + } + $this->tags[$name][] = $tag; + } + + /** + * Adds a tag to the page. + * @param SimpleTag $tag Tag to accept. + * @access public + */ + protected function acceptTag($tag) { + if ($tag->getTagName() == "a") { + $this->page->addLink($tag); + } elseif ($tag->getTagName() == "base") { + $this->page->setBase($tag->getAttribute('href')); + } elseif ($tag->getTagName() == "title") { + $this->page->setTitle($tag); + } elseif ($this->isFormElement($tag->getTagName())) { + for ($i = 0; $i < count($this->open_forms); $i++) { + $this->open_forms[$i]->addWidget($tag); + } + $this->last_widget = $tag; + } + } + + /** + * Opens a label for a described widget. + * @param SimpleFormTag $tag Tag to accept. + * @access public + */ + protected function acceptLabelStart($tag) { + $this->label = $tag; + unset($this->last_widget); + } + + /** + * Closes the most recently opened label. + * @access public + */ + protected function acceptLabelEnd() { + if (isset($this->label)) { + if (isset($this->last_widget)) { + $this->last_widget->setLabel($this->label->getText()); + unset($this->last_widget); + } else { + $this->left_over_labels[] = SimpleTestCompatibility::copy($this->label); + } + unset($this->label); + } + } + + /** + * Tests to see if a tag is a possible form + * element. + * @param string $name HTML element name. + * @return boolean True if form element. + * @access private + */ + protected function isFormElement($name) { + return in_array($name, array('input', 'button', 'textarea', 'select')); + } + + /** + * Opens a form. New widgets go here. + * @param SimpleFormTag $tag Tag to accept. + * @access public + */ + protected function acceptFormStart($tag) { + $this->open_forms[] = new SimpleForm($tag, $this->page); + } + + /** + * Closes the most recently opened form. + * @access public + */ + protected function acceptFormEnd() { + if (count($this->open_forms)) { + $this->complete_forms[] = array_pop($this->open_forms); + } + } + + /** + * Opens a frameset. A frameset may contain nested + * frameset tags. + * @param SimpleFramesetTag $tag Tag to accept. + * @access public + */ + protected function acceptFramesetStart($tag) { + if (! $this->isLoadingFrames()) { + $this->frameset = $tag; + } + $this->frameset_nesting_level++; + } + + /** + * Closes the most recently opened frameset. + * @access public + */ + protected function acceptFramesetEnd() { + if ($this->isLoadingFrames()) { + $this->frameset_nesting_level--; + } + } + + /** + * Takes a single frame tag and stashes it in + * the current frame set. + * @param SimpleFrameTag $tag Tag to accept. + * @access public + */ + protected function acceptFrame($tag) { + if ($this->isLoadingFrames()) { + if ($tag->getAttribute('src')) { + $this->loading_frames[] = $tag; + } + } + } + + /** + * Test to see if in the middle of reading + * a frameset. + * @return boolean True if inframeset. + * @access private + */ + protected function isLoadingFrames() { + return $this->frameset and $this->frameset_nesting_level > 0; + } + + /** + * Marker for end of complete page. Any work in + * progress can now be closed. + * @access public + */ + protected function acceptPageEnd() { + while (count($this->open_forms)) { + $this->complete_forms[] = array_pop($this->open_forms); + } + foreach ($this->left_over_labels as $label) { + for ($i = 0, $count = count($this->complete_forms); $i < $count; $i++) { + $this->complete_forms[$i]->attachLabelBySelector( + new SimpleById($label->getFor()), + $label->getText()); + } + } + $this->page->setForms($this->complete_forms); + $this->page->setFrames($this->loading_frames); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/recorder.php b/webdata/stdlibs/simpletest/recorder.php new file mode 100644 index 0000000..b3d0d01 --- /dev/null +++ b/webdata/stdlibs/simpletest/recorder.php @@ -0,0 +1,101 @@ +time, $this->breadcrumb, $this->message) = + array(time(), $breadcrumb, $message); + } +} + +/** + * A single pass captured for later. + * @package SimpleTest + * @subpackage Extensions + */ +class SimpleResultOfPass extends SimpleResult { } + +/** + * A single failure captured for later. + * @package SimpleTest + * @subpackage Extensions + */ +class SimpleResultOfFail extends SimpleResult { } + +/** + * A single exception captured for later. + * @package SimpleTest + * @subpackage Extensions + */ +class SimpleResultOfException extends SimpleResult { } + +/** + * Array-based test recorder. Returns an array + * with timestamp, status, test name and message for each pass and failure. + * @package SimpleTest + * @subpackage Extensions + */ +class Recorder extends SimpleReporterDecorator { + public $results = array(); + + /** + * Stashes the pass as a SimpleResultOfPass + * for later retrieval. + * @param string $message Pass message to be displayed + * eventually. + */ + function paintPass($message) { + parent::paintPass($message); + $this->results[] = new SimpleResultOfPass(parent::getTestList(), $message); + } + + /** + * Stashes the fail as a SimpleResultOfFail + * for later retrieval. + * @param string $message Failure message to be displayed + * eventually. + */ + function paintFail($message) { + parent::paintFail($message); + $this->results[] = new SimpleResultOfFail(parent::getTestList(), $message); + } + + /** + * Stashes the exception as a SimpleResultOfException + * for later retrieval. + * @param string $message Exception message to be displayed + * eventually. + */ + function paintException($message) { + parent::paintException($message); + $this->results[] = new SimpleResultOfException(parent::getTestList(), $message); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/reflection_php4.php b/webdata/stdlibs/simpletest/reflection_php4.php new file mode 100644 index 0000000..39801ea --- /dev/null +++ b/webdata/stdlibs/simpletest/reflection_php4.php @@ -0,0 +1,136 @@ +_interface = $interface; + } + + /** + * Checks that a class has been declared. + * @return boolean True if defined. + * @access public + */ + function classExists() { + return class_exists($this->_interface); + } + + /** + * Needed to kill the autoload feature in PHP5 + * for classes created dynamically. + * @return boolean True if defined. + * @access public + */ + function classExistsSansAutoload() { + return class_exists($this->_interface); + } + + /** + * Checks that a class or interface has been + * declared. + * @return boolean True if defined. + * @access public + */ + function classOrInterfaceExists() { + return class_exists($this->_interface); + } + + /** + * Needed to kill the autoload feature in PHP5 + * for classes created dynamically. + * @return boolean True if defined. + * @access public + */ + function classOrInterfaceExistsSansAutoload() { + return class_exists($this->_interface); + } + + /** + * Gets the list of methods on a class or + * interface. + * @returns array List of method names. + * @access public + */ + function getMethods() { + return get_class_methods($this->_interface); + } + + /** + * Gets the list of interfaces from a class. If the + * class name is actually an interface then just that + * interface is returned. + * @returns array List of interfaces. + * @access public + */ + function getInterfaces() { + return array(); + } + + /** + * Finds the parent class name. + * @returns string Parent class name. + * @access public + */ + function getParent() { + return strtolower(get_parent_class($this->_interface)); + } + + /** + * Determines if the class is abstract, which for PHP 4 + * will never be the case. + * @returns boolean True if abstract. + * @access public + */ + function isAbstract() { + return false; + } + + /** + * Determines if the the entity is an interface, which for PHP 4 + * will never be the case. + * @returns boolean True if interface. + * @access public + */ + function isInterface() { + return false; + } + + /** + * Scans for final methods, but as it's PHP 4 there + * aren't any. + * @returns boolean True if the class has a final method. + * @access public + */ + function hasFinal() { + return false; + } + + /** + * Gets the source code matching the declaration + * of a method. + * @param string $method Method name. + * @access public + */ + function getSignature($method) { + return "function &$method()"; + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/reflection_php5.php b/webdata/stdlibs/simpletest/reflection_php5.php new file mode 100644 index 0000000..43d8a7b --- /dev/null +++ b/webdata/stdlibs/simpletest/reflection_php5.php @@ -0,0 +1,386 @@ +interface = $interface; + } + + /** + * Checks that a class has been declared. Versions + * before PHP5.0.2 need a check that it's not really + * an interface. + * @return boolean True if defined. + * @access public + */ + function classExists() { + if (! class_exists($this->interface)) { + return false; + } + $reflection = new ReflectionClass($this->interface); + return ! $reflection->isInterface(); + } + + /** + * Needed to kill the autoload feature in PHP5 + * for classes created dynamically. + * @return boolean True if defined. + * @access public + */ + function classExistsSansAutoload() { + return class_exists($this->interface, false); + } + + /** + * Checks that a class or interface has been + * declared. + * @return boolean True if defined. + * @access public + */ + function classOrInterfaceExists() { + return $this->classOrInterfaceExistsWithAutoload($this->interface, true); + } + + /** + * Needed to kill the autoload feature in PHP5 + * for classes created dynamically. + * @return boolean True if defined. + * @access public + */ + function classOrInterfaceExistsSansAutoload() { + return $this->classOrInterfaceExistsWithAutoload($this->interface, false); + } + + /** + * Needed to select the autoload feature in PHP5 + * for classes created dynamically. + * @param string $interface Class or interface name. + * @param boolean $autoload True totriggerautoload. + * @return boolean True if interface defined. + * @access private + */ + protected function classOrInterfaceExistsWithAutoload($interface, $autoload) { + if (function_exists('interface_exists')) { + if (interface_exists($this->interface, $autoload)) { + return true; + } + } + return class_exists($this->interface, $autoload); + } + + /** + * Gets the list of methods on a class or + * interface. + * @returns array List of method names. + * @access public + */ + function getMethods() { + return array_unique(get_class_methods($this->interface)); + } + + /** + * Gets the list of interfaces from a class. If the + * class name is actually an interface then just that + * interface is returned. + * @returns array List of interfaces. + * @access public + */ + function getInterfaces() { + $reflection = new ReflectionClass($this->interface); + if ($reflection->isInterface()) { + return array($this->interface); + } + return $this->onlyParents($reflection->getInterfaces()); + } + + /** + * Gets the list of methods for the implemented + * interfaces only. + * @returns array List of enforced method signatures. + * @access public + */ + function getInterfaceMethods() { + $methods = array(); + foreach ($this->getInterfaces() as $interface) { + $methods = array_merge($methods, get_class_methods($interface)); + } + return array_unique($methods); + } + + /** + * Checks to see if the method signature has to be tightly + * specified. + * @param string $method Method name. + * @returns boolean True if enforced. + * @access private + */ + protected function isInterfaceMethod($method) { + return in_array($method, $this->getInterfaceMethods()); + } + + /** + * Finds the parent class name. + * @returns string Parent class name. + * @access public + */ + function getParent() { + $reflection = new ReflectionClass($this->interface); + $parent = $reflection->getParentClass(); + if ($parent) { + return $parent->getName(); + } + return false; + } + + /** + * Trivially determines if the class is abstract. + * @returns boolean True if abstract. + * @access public + */ + function isAbstract() { + $reflection = new ReflectionClass($this->interface); + return $reflection->isAbstract(); + } + + /** + * Trivially determines if the class is an interface. + * @returns boolean True if interface. + * @access public + */ + function isInterface() { + $reflection = new ReflectionClass($this->interface); + return $reflection->isInterface(); + } + + /** + * Scans for final methods, as they screw up inherited + * mocks by not allowing you to override them. + * @returns boolean True if the class has a final method. + * @access public + */ + function hasFinal() { + $reflection = new ReflectionClass($this->interface); + foreach ($reflection->getMethods() as $method) { + if ($method->isFinal()) { + return true; + } + } + return false; + } + + /** + * Whittles a list of interfaces down to only the + * necessary top level parents. + * @param array $interfaces Reflection API interfaces + * to reduce. + * @returns array List of parent interface names. + * @access private + */ + protected function onlyParents($interfaces) { + $parents = array(); + $blacklist = array(); + foreach ($interfaces as $interface) { + foreach($interfaces as $possible_parent) { + if ($interface->getName() == $possible_parent->getName()) { + continue; + } + if ($interface->isSubClassOf($possible_parent)) { + $blacklist[$possible_parent->getName()] = true; + } + } + if (!isset($blacklist[$interface->getName()])) { + $parents[] = $interface->getName(); + } + } + return $parents; + } + + /** + * Checks whether a method is abstract or not. + * @param string $name Method name. + * @return bool true if method is abstract, else false + * @access private + */ + protected function isAbstractMethod($name) { + $interface = new ReflectionClass($this->interface); + if (! $interface->hasMethod($name)) { + return false; + } + return $interface->getMethod($name)->isAbstract(); + } + + /** + * Checks whether a method is the constructor. + * @param string $name Method name. + * @return bool true if method is the constructor + * @access private + */ + protected function isConstructor($name) { + return ($name == '__construct') || ($name == $this->interface); + } + + /** + * Checks whether a method is abstract in all parents or not. + * @param string $name Method name. + * @return bool true if method is abstract in parent, else false + * @access private + */ + protected function isAbstractMethodInParents($name) { + $interface = new ReflectionClass($this->interface); + $parent = $interface->getParentClass(); + while($parent) { + if (! $parent->hasMethod($name)) { + return false; + } + if ($parent->getMethod($name)->isAbstract()) { + return true; + } + $parent = $parent->getParentClass(); + } + return false; + } + + /** + * Checks whether a method is static or not. + * @param string $name Method name + * @return bool true if method is static, else false + * @access private + */ + protected function isStaticMethod($name) { + $interface = new ReflectionClass($this->interface); + if (! $interface->hasMethod($name)) { + return false; + } + return $interface->getMethod($name)->isStatic(); + } + + /** + * Writes the source code matching the declaration + * of a method. + * @param string $name Method name. + * @return string Method signature up to last + * bracket. + * @access public + */ + function getSignature($name) { + if ($name == '__set') { + return 'function __set($key, $value)'; + } + if ($name == '__call') { + return 'function __call($method, $arguments)'; + } + if (version_compare(phpversion(), '5.1.0', '>=')) { + if (in_array($name, array('__get', '__isset', $name == '__unset'))) { + return "function {$name}(\$key)"; + } + } + if ($name == '__toString') { + return "function $name()"; + } + + // This wonky try-catch is a work around for a faulty method_exists() + // in early versions of PHP 5 which would return false for static + // methods. The Reflection classes work fine, but hasMethod() + // doesn't exist prior to PHP 5.1.0, so we need to use a more crude + // detection method. + try { + $interface = new ReflectionClass($this->interface); + $interface->getMethod($name); + } catch (ReflectionException $e) { + return "function $name()"; + } + return $this->getFullSignature($name); + } + + /** + * For a signature specified in an interface, full + * details must be replicated to be a valid implementation. + * @param string $name Method name. + * @return string Method signature up to last + * bracket. + * @access private + */ + protected function getFullSignature($name) { + $interface = new ReflectionClass($this->interface); + $method = $interface->getMethod($name); + $reference = $method->returnsReference() ? '&' : ''; + $static = $method->isStatic() ? 'static ' : ''; + return "{$static}function $reference$name(" . + implode(', ', $this->getParameterSignatures($method)) . + ")"; + } + + /** + * Gets the source code for each parameter. + * @param ReflectionMethod $method Method object from + * reflection API + * @return array List of strings, each + * a snippet of code. + * @access private + */ + protected function getParameterSignatures($method) { + $signatures = array(); + foreach ($method->getParameters() as $parameter) { + $signature = ''; + $type = $parameter->getClass(); + if (is_null($type) && version_compare(phpversion(), '5.1.0', '>=') && $parameter->isArray()) { + $signature .= 'array '; + } elseif (!is_null($type)) { + $signature .= $type->getName() . ' '; + } + if ($parameter->isPassedByReference()) { + $signature .= '&'; + } + $signature .= '$' . $this->suppressSpurious($parameter->getName()); + if ($this->isOptional($parameter)) { + $signature .= ' = null'; + } + $signatures[] = $signature; + } + return $signatures; + } + + /** + * The SPL library has problems with the + * Reflection library. In particular, you can + * get extra characters in parameter names :(. + * @param string $name Parameter name. + * @return string Cleaner name. + * @access private + */ + protected function suppressSpurious($name) { + return str_replace(array('[', ']', ' '), '', $name); + } + + /** + * Test of a reflection parameter being optional + * that works with early versions of PHP5. + * @param reflectionParameter $parameter Is this optional. + * @return boolean True if optional. + * @access private + */ + protected function isOptional($parameter) { + if (method_exists($parameter, 'isOptional')) { + return $parameter->isOptional(); + } + return false; + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/remote.php b/webdata/stdlibs/simpletest/remote.php new file mode 100644 index 0000000..4bb37b7 --- /dev/null +++ b/webdata/stdlibs/simpletest/remote.php @@ -0,0 +1,115 @@ +url = $url; + $this->dry_url = $dry_url ? $dry_url : $url; + $this->size = false; + } + + /** + * Accessor for the test name for subclasses. + * @return string Name of the test. + * @access public + */ + function getLabel() { + return $this->url; + } + + /** + * Runs the top level test for this class. Currently + * reads the data as a single chunk. I'll fix this + * once I have added iteration to the browser. + * @param SimpleReporter $reporter Target of test results. + * @returns boolean True if no failures. + * @access public + */ + function run($reporter) { + $browser = $this->createBrowser(); + $xml = $browser->get($this->url); + if (! $xml) { + trigger_error('Cannot read remote test URL [' . $this->url . ']'); + return false; + } + $parser = $this->createParser($reporter); + if (! $parser->parse($xml)) { + trigger_error('Cannot parse incoming XML from [' . $this->url . ']'); + return false; + } + return true; + } + + /** + * Creates a new web browser object for fetching + * the XML report. + * @return SimpleBrowser New browser. + * @access protected + */ + protected function createBrowser() { + return new SimpleBrowser(); + } + + /** + * Creates the XML parser. + * @param SimpleReporter $reporter Target of test results. + * @return SimpleTestXmlListener XML reader. + * @access protected + */ + protected function createParser($reporter) { + return new SimpleTestXmlParser($reporter); + } + + /** + * Accessor for the number of subtests. + * @return integer Number of test cases. + * @access public + */ + function getSize() { + if ($this->size === false) { + $browser = $this->createBrowser(); + $xml = $browser->get($this->dry_url); + if (! $xml) { + trigger_error('Cannot read remote test URL [' . $this->dry_url . ']'); + return false; + } + $reporter = new SimpleReporter(); + $parser = $this->createParser($reporter); + if (! $parser->parse($xml)) { + trigger_error('Cannot parse incoming XML from [' . $this->dry_url . ']'); + return false; + } + $this->size = $reporter->getTestCaseCount(); + } + return $this->size; + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/reporter.php b/webdata/stdlibs/simpletest/reporter.php new file mode 100644 index 0000000..bd4f3fa --- /dev/null +++ b/webdata/stdlibs/simpletest/reporter.php @@ -0,0 +1,445 @@ +character_set = $character_set; + } + + /** + * Paints the top of the web page setting the + * title to the name of the starting test. + * @param string $test_name Name class of test. + * @access public + */ + function paintHeader($test_name) { + $this->sendNoCacheHeaders(); + print ""; + print "\n\n$test_name\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "

                      $test_name

                      \n"; + flush(); + } + + /** + * Send the headers necessary to ensure the page is + * reloaded on every request. Otherwise you could be + * scratching your head over out of date test data. + * @access public + */ + static function sendNoCacheHeaders() { + if (! headers_sent()) { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + } + } + + /** + * Paints the CSS. Add additional styles here. + * @return string CSS code as text. + * @access protected + */ + protected function getCss() { + return ".fail { background-color: inherit; color: red; }" . + ".pass { background-color: inherit; color: green; }" . + " pre { background-color: lightgray; color: inherit; }"; + } + + /** + * Paints the end of the test with a summary of + * the passes and failures. + * @param string $test_name Name class of test. + * @access public + */ + function paintFooter($test_name) { + $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); + print "
                      "; + print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); + print " test cases complete:\n"; + print "" . $this->getPassCount() . " passes, "; + print "" . $this->getFailCount() . " fails and "; + print "" . $this->getExceptionCount() . " exceptions."; + print "
                      \n"; + print "\n\n"; + } + + /** + * Paints the test failure with a breadcrumbs + * trail of the nesting test suites below the + * top level test. + * @param string $message Failure message displayed in + * the context of the other tests. + */ + function paintFail($message) { + parent::paintFail($message); + print "Fail: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + print " -> " . $this->htmlEntities($message) . "
                      \n"; + } + + /** + * Paints a PHP error. + * @param string $message Message is ignored. + * @access public + */ + function paintError($message) { + parent::paintError($message); + print "Exception: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + print " -> " . $this->htmlEntities($message) . "
                      \n"; + } + + /** + * Paints a PHP exception. + * @param Exception $exception Exception to display. + * @access public + */ + function paintException($exception) { + parent::paintException($exception); + print "Exception: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + $message = 'Unexpected exception of type [' . get_class($exception) . + '] with message ['. $exception->getMessage() . + '] in ['. $exception->getFile() . + ' line ' . $exception->getLine() . ']'; + print " -> " . $this->htmlEntities($message) . "
                      \n"; + } + + /** + * Prints the message for skipping tests. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { + parent::paintSkip($message); + print "Skipped: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + print " -> " . $this->htmlEntities($message) . "
                      \n"; + } + + /** + * Paints formatted text such as dumped privateiables. + * @param string $message Text to show. + * @access public + */ + function paintFormattedMessage($message) { + print '
                      ' . $this->htmlEntities($message) . '
                      '; + } + + /** + * Character set adjusted entity conversion. + * @param string $message Plain text or Unicode message. + * @return string Browser readable message. + * @access protected + */ + protected function htmlEntities($message) { + return htmlentities($message, ENT_COMPAT, $this->character_set); + } +} + +/** + * Sample minimal test displayer. Generates only + * failure messages and a pass count. For command + * line use. I've tried to make it look like JUnit, + * but I wanted to output the errors as they arrived + * which meant dropping the dots. + * @package SimpleTest + * @subpackage UnitTester + */ +class TextReporter extends SimpleReporter { + + /** + * Does nothing yet. The first output will + * be sent on the first test start. + */ + function __construct() { + parent::__construct(); + } + + /** + * Paints the title only. + * @param string $test_name Name class of test. + * @access public + */ + function paintHeader($test_name) { + if (! SimpleReporter::inCli()) { + header('Content-type: text/plain'); + } + print "$test_name\n"; + flush(); + } + + /** + * Paints the end of the test with a summary of + * the passes and failures. + * @param string $test_name Name class of test. + * @access public + */ + function paintFooter($test_name) { + if ($this->getFailCount() + $this->getExceptionCount() == 0) { + print "OK\n"; + } else { + print "FAILURES!!!\n"; + } + print "Test cases run: " . $this->getTestCaseProgress() . + "/" . $this->getTestCaseCount() . + ", Passes: " . $this->getPassCount() . + ", Failures: " . $this->getFailCount() . + ", Exceptions: " . $this->getExceptionCount() . "\n"; + } + + /** + * Paints the test failure as a stack trace. + * @param string $message Failure message displayed in + * the context of the other tests. + * @access public + */ + function paintFail($message) { + parent::paintFail($message); + print $this->getFailCount() . ") $message\n"; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); + print "\n"; + } + + /** + * Paints a PHP error or exception. + * @param string $message Message to be shown. + * @access public + * @abstract + */ + function paintError($message) { + parent::paintError($message); + print "Exception " . $this->getExceptionCount() . "!\n$message\n"; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); + print "\n"; + } + + /** + * Paints a PHP error or exception. + * @param Exception $exception Exception to describe. + * @access public + * @abstract + */ + function paintException($exception) { + parent::paintException($exception); + $message = 'Unexpected exception of type [' . get_class($exception) . + '] with message ['. $exception->getMessage() . + '] in ['. $exception->getFile() . + ' line ' . $exception->getLine() . ']'; + print "Exception " . $this->getExceptionCount() . "!\n$message\n"; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); + print "\n"; + } + + /** + * Prints the message for skipping tests. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { + parent::paintSkip($message); + print "Skip: $message\n"; + } + + /** + * Paints formatted text such as dumped privateiables. + * @param string $message Text to show. + * @access public + */ + function paintFormattedMessage($message) { + print "$message\n"; + flush(); + } +} + +/** + * Runs just a single test group, a single case or + * even a single test within that case. + * @package SimpleTest + * @subpackage UnitTester + */ +class SelectiveReporter extends SimpleReporterDecorator { + private $just_this_case = false; + private $just_this_test = false; + private $on; + + /** + * Selects the test case or group to be run, + * and optionally a specific test. + * @param SimpleScorer $reporter Reporter to receive events. + * @param string $just_this_case Only this case or group will run. + * @param string $just_this_test Only this test method will run. + */ + function __construct($reporter, $just_this_case = false, $just_this_test = false) { + if (isset($just_this_case) && $just_this_case) { + $this->just_this_case = strtolower($just_this_case); + $this->off(); + } else { + $this->on(); + } + if (isset($just_this_test) && $just_this_test) { + $this->just_this_test = strtolower($just_this_test); + } + parent::__construct($reporter); + } + + /** + * Compares criteria to actual the case/group name. + * @param string $test_case The incoming test. + * @return boolean True if matched. + * @access protected + */ + protected function matchesTestCase($test_case) { + return $this->just_this_case == strtolower($test_case); + } + + /** + * Compares criteria to actual the test name. If no + * name was specified at the beginning, then all tests + * can run. + * @param string $method The incoming test method. + * @return boolean True if matched. + * @access protected + */ + protected function shouldRunTest($test_case, $method) { + if ($this->isOn() || $this->matchesTestCase($test_case)) { + if ($this->just_this_test) { + return $this->just_this_test == strtolower($method); + } else { + return true; + } + } + return false; + } + + /** + * Switch on testing for the group or subgroup. + * @access private + */ + protected function on() { + $this->on = true; + } + + /** + * Switch off testing for the group or subgroup. + * @access private + */ + protected function off() { + $this->on = false; + } + + /** + * Is this group actually being tested? + * @return boolean True if the current test group is active. + * @access private + */ + protected function isOn() { + return $this->on; + } + + /** + * Veto everything that doesn't match the method wanted. + * @param string $test_case Name of test case. + * @param string $method Name of test method. + * @return boolean True if test should be run. + * @access public + */ + function shouldInvoke($test_case, $method) { + if ($this->shouldRunTest($test_case, $method)) { + return $this->reporter->shouldInvoke($test_case, $method); + } + return false; + } + + /** + * Paints the start of a group test. + * @param string $test_case Name of test or other label. + * @param integer $size Number of test cases starting. + * @access public + */ + function paintGroupStart($test_case, $size) { + if ($this->just_this_case && $this->matchesTestCase($test_case)) { + $this->on(); + } + $this->reporter->paintGroupStart($test_case, $size); + } + + /** + * Paints the end of a group test. + * @param string $test_case Name of test or other label. + * @access public + */ + function paintGroupEnd($test_case) { + $this->reporter->paintGroupEnd($test_case); + if ($this->just_this_case && $this->matchesTestCase($test_case)) { + $this->off(); + } + } +} + +/** + * Suppresses skip messages. + * @package SimpleTest + * @subpackage UnitTester + */ +class NoSkipsReporter extends SimpleReporterDecorator { + + /** + * Does nothing. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/scorer.php b/webdata/stdlibs/simpletest/scorer.php new file mode 100644 index 0000000..27776f4 --- /dev/null +++ b/webdata/stdlibs/simpletest/scorer.php @@ -0,0 +1,875 @@ +passes = 0; + $this->fails = 0; + $this->exceptions = 0; + $this->is_dry_run = false; + } + + /** + * Signals that the next evaluation will be a dry + * run. That is, the structure events will be + * recorded, but no tests will be run. + * @param boolean $is_dry Dry run if true. + * @access public + */ + function makeDry($is_dry = true) { + $this->is_dry_run = $is_dry; + } + + /** + * The reporter has a veto on what should be run. + * @param string $test_case_name name of test case. + * @param string $method Name of test method. + * @access public + */ + function shouldInvoke($test_case_name, $method) { + return ! $this->is_dry_run; + } + + /** + * Can wrap the invoker in preperation for running + * a test. + * @param SimpleInvoker $invoker Individual test runner. + * @return SimpleInvoker Wrapped test runner. + * @access public + */ + function createInvoker($invoker) { + return $invoker; + } + + /** + * Accessor for current status. Will be false + * if there have been any failures or exceptions. + * Used for command line tools. + * @return boolean True if no failures. + * @access public + */ + function getStatus() { + if ($this->exceptions + $this->fails > 0) { + return false; + } + return true; + } + + /** + * Paints the start of a group test. + * @param string $test_name Name of test or other label. + * @param integer $size Number of test cases starting. + * @access public + */ + function paintGroupStart($test_name, $size) { + } + + /** + * Paints the end of a group test. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintGroupEnd($test_name) { + } + + /** + * Paints the start of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseStart($test_name) { + } + + /** + * Paints the end of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseEnd($test_name) { + } + + /** + * Paints the start of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodStart($test_name) { + } + + /** + * Paints the end of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodEnd($test_name) { + } + + /** + * Increments the pass count. + * @param string $message Message is ignored. + * @access public + */ + function paintPass($message) { + $this->passes++; + } + + /** + * Increments the fail count. + * @param string $message Message is ignored. + * @access public + */ + function paintFail($message) { + $this->fails++; + } + + /** + * Deals with PHP 4 throwing an error. + * @param string $message Text of error formatted by + * the test case. + * @access public + */ + function paintError($message) { + $this->exceptions++; + } + + /** + * Deals with PHP 5 throwing an exception. + * @param Exception $exception The actual exception thrown. + * @access public + */ + function paintException($exception) { + $this->exceptions++; + } + + /** + * Prints the message for skipping tests. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { + } + + /** + * Accessor for the number of passes so far. + * @return integer Number of passes. + * @access public + */ + function getPassCount() { + return $this->passes; + } + + /** + * Accessor for the number of fails so far. + * @return integer Number of fails. + * @access public + */ + function getFailCount() { + return $this->fails; + } + + /** + * Accessor for the number of untrapped errors + * so far. + * @return integer Number of exceptions. + * @access public + */ + function getExceptionCount() { + return $this->exceptions; + } + + /** + * Paints a simple supplementary message. + * @param string $message Text to display. + * @access public + */ + function paintMessage($message) { + } + + /** + * Paints a formatted ASCII message such as a + * privateiable dump. + * @param string $message Text to display. + * @access public + */ + function paintFormattedMessage($message) { + } + + /** + * By default just ignores user generated events. + * @param string $type Event type as text. + * @param mixed $payload Message or object. + * @access public + */ + function paintSignal($type, $payload) { + } +} + +/** + * Recipient of generated test messages that can display + * page footers and headers. Also keeps track of the + * test nesting. This is the main base class on which + * to build the finished test (page based) displays. + * @package SimpleTest + * @subpackage UnitTester + */ +class SimpleReporter extends SimpleScorer { + private $test_stack; + private $size; + private $progress; + + /** + * Starts the display with no results in. + * @access public + */ + function __construct() { + parent::__construct(); + $this->test_stack = array(); + $this->size = null; + $this->progress = 0; + } + + /** + * Gets the formatter for small generic data items. + * @return SimpleDumper Formatter. + * @access public + */ + function getDumper() { + return new SimpleDumper(); + } + + /** + * Paints the start of a group test. Will also paint + * the page header and footer if this is the + * first test. Will stash the size if the first + * start. + * @param string $test_name Name of test that is starting. + * @param integer $size Number of test cases starting. + * @access public + */ + function paintGroupStart($test_name, $size) { + if (! isset($this->size)) { + $this->size = $size; + } + if (count($this->test_stack) == 0) { + $this->paintHeader($test_name); + } + $this->test_stack[] = $test_name; + } + + /** + * Paints the end of a group test. Will paint the page + * footer if the stack of tests has unwound. + * @param string $test_name Name of test that is ending. + * @param integer $progress Number of test cases ending. + * @access public + */ + function paintGroupEnd($test_name) { + array_pop($this->test_stack); + if (count($this->test_stack) == 0) { + $this->paintFooter($test_name); + } + } + + /** + * Paints the start of a test case. Will also paint + * the page header and footer if this is the + * first test. Will stash the size if the first + * start. + * @param string $test_name Name of test that is starting. + * @access public + */ + function paintCaseStart($test_name) { + if (! isset($this->size)) { + $this->size = 1; + } + if (count($this->test_stack) == 0) { + $this->paintHeader($test_name); + } + $this->test_stack[] = $test_name; + } + + /** + * Paints the end of a test case. Will paint the page + * footer if the stack of tests has unwound. + * @param string $test_name Name of test that is ending. + * @access public + */ + function paintCaseEnd($test_name) { + $this->progress++; + array_pop($this->test_stack); + if (count($this->test_stack) == 0) { + $this->paintFooter($test_name); + } + } + + /** + * Paints the start of a test method. + * @param string $test_name Name of test that is starting. + * @access public + */ + function paintMethodStart($test_name) { + $this->test_stack[] = $test_name; + } + + /** + * Paints the end of a test method. Will paint the page + * footer if the stack of tests has unwound. + * @param string $test_name Name of test that is ending. + * @access public + */ + function paintMethodEnd($test_name) { + array_pop($this->test_stack); + } + + /** + * Paints the test document header. + * @param string $test_name First test top level + * to start. + * @access public + * @abstract + */ + function paintHeader($test_name) { + } + + /** + * Paints the test document footer. + * @param string $test_name The top level test. + * @access public + * @abstract + */ + function paintFooter($test_name) { + } + + /** + * Accessor for internal test stack. For + * subclasses that need to see the whole test + * history for display purposes. + * @return array List of methods in nesting order. + * @access public + */ + function getTestList() { + return $this->test_stack; + } + + /** + * Accessor for total test size in number + * of test cases. Null until the first + * test is started. + * @return integer Total number of cases at start. + * @access public + */ + function getTestCaseCount() { + return $this->size; + } + + /** + * Accessor for the number of test cases + * completed so far. + * @return integer Number of ended cases. + * @access public + */ + function getTestCaseProgress() { + return $this->progress; + } + + /** + * Static check for running in the comand line. + * @return boolean True if CLI. + * @access public + */ + static function inCli() { + return php_sapi_name() == 'cli'; + } +} + +/** + * For modifying the behaviour of the visual reporters. + * @package SimpleTest + * @subpackage UnitTester + */ +class SimpleReporterDecorator { + protected $reporter; + + /** + * Mediates between the reporter and the test case. + * @param SimpleScorer $reporter Reporter to receive events. + */ + function __construct($reporter) { + $this->reporter = $reporter; + } + + /** + * Signals that the next evaluation will be a dry + * run. That is, the structure events will be + * recorded, but no tests will be run. + * @param boolean $is_dry Dry run if true. + * @access public + */ + function makeDry($is_dry = true) { + $this->reporter->makeDry($is_dry); + } + + /** + * Accessor for current status. Will be false + * if there have been any failures or exceptions. + * Used for command line tools. + * @return boolean True if no failures. + * @access public + */ + function getStatus() { + return $this->reporter->getStatus(); + } + + /** + * The nesting of the test cases so far. Not + * all reporters have this facility. + * @return array Test list if accessible. + * @access public + */ + function getTestList() { + if (method_exists($this->reporter, 'getTestList')) { + return $this->reporter->getTestList(); + } else { + return array(); + } + } + + /** + * The reporter has a veto on what should be run. + * @param string $test_case_name Name of test case. + * @param string $method Name of test method. + * @return boolean True if test should be run. + * @access public + */ + function shouldInvoke($test_case_name, $method) { + return $this->reporter->shouldInvoke($test_case_name, $method); + } + + /** + * Can wrap the invoker in preparation for running + * a test. + * @param SimpleInvoker $invoker Individual test runner. + * @return SimpleInvoker Wrapped test runner. + * @access public + */ + function createInvoker($invoker) { + return $this->reporter->createInvoker($invoker); + } + + /** + * Gets the formatter for privateiables and other small + * generic data items. + * @return SimpleDumper Formatter. + * @access public + */ + function getDumper() { + return $this->reporter->getDumper(); + } + + /** + * Paints the start of a group test. + * @param string $test_name Name of test or other label. + * @param integer $size Number of test cases starting. + * @access public + */ + function paintGroupStart($test_name, $size) { + $this->reporter->paintGroupStart($test_name, $size); + } + + /** + * Paints the end of a group test. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintGroupEnd($test_name) { + $this->reporter->paintGroupEnd($test_name); + } + + /** + * Paints the start of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseStart($test_name) { + $this->reporter->paintCaseStart($test_name); + } + + /** + * Paints the end of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseEnd($test_name) { + $this->reporter->paintCaseEnd($test_name); + } + + /** + * Paints the start of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodStart($test_name) { + $this->reporter->paintMethodStart($test_name); + } + + /** + * Paints the end of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodEnd($test_name) { + $this->reporter->paintMethodEnd($test_name); + } + + /** + * Chains to the wrapped reporter. + * @param string $message Message is ignored. + * @access public + */ + function paintPass($message) { + $this->reporter->paintPass($message); + } + + /** + * Chains to the wrapped reporter. + * @param string $message Message is ignored. + * @access public + */ + function paintFail($message) { + $this->reporter->paintFail($message); + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text of error formatted by + * the test case. + * @access public + */ + function paintError($message) { + $this->reporter->paintError($message); + } + + /** + * Chains to the wrapped reporter. + * @param Exception $exception Exception to show. + * @access public + */ + function paintException($exception) { + $this->reporter->paintException($exception); + } + + /** + * Prints the message for skipping tests. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { + $this->reporter->paintSkip($message); + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text to display. + * @access public + */ + function paintMessage($message) { + $this->reporter->paintMessage($message); + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text to display. + * @access public + */ + function paintFormattedMessage($message) { + $this->reporter->paintFormattedMessage($message); + } + + /** + * Chains to the wrapped reporter. + * @param string $type Event type as text. + * @param mixed $payload Message or object. + * @return boolean Should return false if this + * type of signal should fail the + * test suite. + * @access public + */ + function paintSignal($type, $payload) { + $this->reporter->paintSignal($type, $payload); + } +} + +/** + * For sending messages to multiple reporters at + * the same time. + * @package SimpleTest + * @subpackage UnitTester + */ +class MultipleReporter { + private $reporters = array(); + + /** + * Adds a reporter to the subscriber list. + * @param SimpleScorer $reporter Reporter to receive events. + * @access public + */ + function attachReporter($reporter) { + $this->reporters[] = $reporter; + } + + /** + * Signals that the next evaluation will be a dry + * run. That is, the structure events will be + * recorded, but no tests will be run. + * @param boolean $is_dry Dry run if true. + * @access public + */ + function makeDry($is_dry = true) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->makeDry($is_dry); + } + } + + /** + * Accessor for current status. Will be false + * if there have been any failures or exceptions. + * If any reporter reports a failure, the whole + * suite fails. + * @return boolean True if no failures. + * @access public + */ + function getStatus() { + for ($i = 0; $i < count($this->reporters); $i++) { + if (! $this->reporters[$i]->getStatus()) { + return false; + } + } + return true; + } + + /** + * The reporter has a veto on what should be run. + * It requires all reporters to want to run the method. + * @param string $test_case_name name of test case. + * @param string $method Name of test method. + * @access public + */ + function shouldInvoke($test_case_name, $method) { + for ($i = 0; $i < count($this->reporters); $i++) { + if (! $this->reporters[$i]->shouldInvoke($test_case_name, $method)) { + return false; + } + } + return true; + } + + /** + * Every reporter gets a chance to wrap the invoker. + * @param SimpleInvoker $invoker Individual test runner. + * @return SimpleInvoker Wrapped test runner. + * @access public + */ + function createInvoker($invoker) { + for ($i = 0; $i < count($this->reporters); $i++) { + $invoker = $this->reporters[$i]->createInvoker($invoker); + } + return $invoker; + } + + /** + * Gets the formatter for privateiables and other small + * generic data items. + * @return SimpleDumper Formatter. + * @access public + */ + function getDumper() { + return new SimpleDumper(); + } + + /** + * Paints the start of a group test. + * @param string $test_name Name of test or other label. + * @param integer $size Number of test cases starting. + * @access public + */ + function paintGroupStart($test_name, $size) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintGroupStart($test_name, $size); + } + } + + /** + * Paints the end of a group test. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintGroupEnd($test_name) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintGroupEnd($test_name); + } + } + + /** + * Paints the start of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseStart($test_name) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintCaseStart($test_name); + } + } + + /** + * Paints the end of a test case. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintCaseEnd($test_name) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintCaseEnd($test_name); + } + } + + /** + * Paints the start of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodStart($test_name) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintMethodStart($test_name); + } + } + + /** + * Paints the end of a test method. + * @param string $test_name Name of test or other label. + * @access public + */ + function paintMethodEnd($test_name) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintMethodEnd($test_name); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $message Message is ignored. + * @access public + */ + function paintPass($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintPass($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $message Message is ignored. + * @access public + */ + function paintFail($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintFail($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text of error formatted by + * the test case. + * @access public + */ + function paintError($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintError($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param Exception $exception Exception to display. + * @access public + */ + function paintException($exception) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintException($exception); + } + } + + /** + * Prints the message for skipping tests. + * @param string $message Text of skip condition. + * @access public + */ + function paintSkip($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintSkip($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text to display. + * @access public + */ + function paintMessage($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintMessage($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $message Text to display. + * @access public + */ + function paintFormattedMessage($message) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintFormattedMessage($message); + } + } + + /** + * Chains to the wrapped reporter. + * @param string $type Event type as text. + * @param mixed $payload Message or object. + * @return boolean Should return false if this + * type of signal should fail the + * test suite. + * @access public + */ + function paintSignal($type, $payload) { + for ($i = 0; $i < count($this->reporters); $i++) { + $this->reporters[$i]->paintSignal($type, $payload); + } + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/selector.php b/webdata/stdlibs/simpletest/selector.php new file mode 100644 index 0000000..ba2fed3 --- /dev/null +++ b/webdata/stdlibs/simpletest/selector.php @@ -0,0 +1,141 @@ +name = $name; + } + + /** + * Accessor for name. + * @returns string $name Name to match. + */ + function getName() { + return $this->name; + } + + /** + * Compares with name attribute of widget. + * @param SimpleWidget $widget Control to compare. + * @access public + */ + function isMatch($widget) { + return ($widget->getName() == $this->name); + } +} + +/** + * Used to extract form elements for testing against. + * Searches by visible label or alt text. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleByLabel { + private $label; + + /** + * Stashes the name for later comparison. + * @param string $label Visible text to match. + */ + function __construct($label) { + $this->label = $label; + } + + /** + * Comparison. Compares visible text of widget or + * related label. + * @param SimpleWidget $widget Control to compare. + * @access public + */ + function isMatch($widget) { + if (! method_exists($widget, 'isLabel')) { + return false; + } + return $widget->isLabel($this->label); + } +} + +/** + * Used to extract form elements for testing against. + * Searches dy id attribute. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleById { + private $id; + + /** + * Stashes the name for later comparison. + * @param string $id ID atribute to match. + */ + function __construct($id) { + $this->id = $id; + } + + /** + * Comparison. Compares id attribute of widget. + * @param SimpleWidget $widget Control to compare. + * @access public + */ + function isMatch($widget) { + return $widget->isId($this->id); + } +} + +/** + * Used to extract form elements for testing against. + * Searches by visible label, name or alt text. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleByLabelOrName { + private $label; + + /** + * Stashes the name/label for later comparison. + * @param string $label Visible text to match. + */ + function __construct($label) { + $this->label = $label; + } + + /** + * Comparison. Compares visible text of widget or + * related label or name. + * @param SimpleWidget $widget Control to compare. + * @access public + */ + function isMatch($widget) { + if (method_exists($widget, 'isLabel')) { + if ($widget->isLabel($this->label)) { + return true; + } + } + return ($widget->getName() == $this->label); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/shell_tester.php b/webdata/stdlibs/simpletest/shell_tester.php new file mode 100644 index 0000000..9a3bd38 --- /dev/null +++ b/webdata/stdlibs/simpletest/shell_tester.php @@ -0,0 +1,330 @@ +output = false; + } + + /** + * Actually runs the command. Does not trap the + * error stream output as this need PHP 4.3+. + * @param string $command The actual command line + * to run. + * @return integer Exit code. + * @access public + */ + function execute($command) { + $this->output = false; + exec($command, $this->output, $ret); + return $ret; + } + + /** + * Accessor for the last output. + * @return string Output as text. + * @access public + */ + function getOutput() { + return implode("\n", $this->output); + } + + /** + * Accessor for the last output. + * @return array Output as array of lines. + * @access public + */ + function getOutputAsList() { + return $this->output; + } +} + +/** + * Test case for testing of command line scripts and + * utilities. Usually scripts that are external to the + * PHP code, but support it in some way. + * @package SimpleTest + * @subpackage UnitTester + */ +class ShellTestCase extends SimpleTestCase { + private $current_shell; + private $last_status; + private $last_command; + + /** + * Creates an empty test case. Should be subclassed + * with test methods for a functional test case. + * @param string $label Name of test case. Will use + * the class name if none specified. + * @access public + */ + function __construct($label = false) { + parent::__construct($label); + $this->current_shell = $this->createShell(); + $this->last_status = false; + $this->last_command = ''; + } + + /** + * Executes a command and buffers the results. + * @param string $command Command to run. + * @return boolean True if zero exit code. + * @access public + */ + function execute($command) { + $shell = $this->getShell(); + $this->last_status = $shell->execute($command); + $this->last_command = $command; + return ($this->last_status === 0); + } + + /** + * Dumps the output of the last command. + * @access public + */ + function dumpOutput() { + $this->dump($this->getOutput()); + } + + /** + * Accessor for the last output. + * @return string Output as text. + * @access public + */ + function getOutput() { + $shell = $this->getShell(); + return $shell->getOutput(); + } + + /** + * Accessor for the last output. + * @return array Output as array of lines. + * @access public + */ + function getOutputAsList() { + $shell = $this->getShell(); + return $shell->getOutputAsList(); + } + + /** + * Called from within the test methods to register + * passes and failures. + * @param boolean $result Pass on true. + * @param string $message Message to display describing + * the test state. + * @return boolean True on pass + * @access public + */ + function assertTrue($result, $message = false) { + return $this->assert(new TrueExpectation(), $result, $message); + } + + /** + * Will be true on false and vice versa. False + * is the PHP definition of false, so that null, + * empty strings, zero and an empty array all count + * as false. + * @param boolean $result Pass on false. + * @param string $message Message to display. + * @return boolean True on pass + * @access public + */ + function assertFalse($result, $message = '%s') { + return $this->assert(new FalseExpectation(), $result, $message); + } + + /** + * Will trigger a pass if the two parameters have + * the same value only. Otherwise a fail. This + * is for testing hand extracted text, etc. + * @param mixed $first Value to compare. + * @param mixed $second Value to compare. + * @param string $message Message to display. + * @return boolean True on pass + * @access public + */ + function assertEqual($first, $second, $message = "%s") { + return $this->assert( + new EqualExpectation($first), + $second, + $message); + } + + /** + * Will trigger a pass if the two parameters have + * a different value. Otherwise a fail. This + * is for testing hand extracted text, etc. + * @param mixed $first Value to compare. + * @param mixed $second Value to compare. + * @param string $message Message to display. + * @return boolean True on pass + * @access public + */ + function assertNotEqual($first, $second, $message = "%s") { + return $this->assert( + new NotEqualExpectation($first), + $second, + $message); + } + + /** + * Tests the last status code from the shell. + * @param integer $status Expected status of last + * command. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertExitCode($status, $message = "%s") { + $message = sprintf($message, "Expected status code of [$status] from [" . + $this->last_command . "], but got [" . + $this->last_status . "]"); + return $this->assertTrue($status === $this->last_status, $message); + } + + /** + * Attempt to exactly match the combined STDERR and + * STDOUT output. + * @param string $expected Expected output. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertOutput($expected, $message = "%s") { + $shell = $this->getShell(); + return $this->assert( + new EqualExpectation($expected), + $shell->getOutput(), + $message); + } + + /** + * Scans the output for a Perl regex. If found + * anywhere it passes, else it fails. + * @param string $pattern Regex to search for. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertOutputPattern($pattern, $message = "%s") { + $shell = $this->getShell(); + return $this->assert( + new PatternExpectation($pattern), + $shell->getOutput(), + $message); + } + + /** + * If a Perl regex is found anywhere in the current + * output then a failure is generated, else a pass. + * @param string $pattern Regex to search for. + * @param $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertNoOutputPattern($pattern, $message = "%s") { + $shell = $this->getShell(); + return $this->assert( + new NoPatternExpectation($pattern), + $shell->getOutput(), + $message); + } + + /** + * File existence check. + * @param string $path Full filename and path. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertFileExists($path, $message = "%s") { + $message = sprintf($message, "File [$path] should exist"); + return $this->assertTrue(file_exists($path), $message); + } + + /** + * File non-existence check. + * @param string $path Full filename and path. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertFileNotExists($path, $message = "%s") { + $message = sprintf($message, "File [$path] should not exist"); + return $this->assertFalse(file_exists($path), $message); + } + + /** + * Scans a file for a Perl regex. If found + * anywhere it passes, else it fails. + * @param string $pattern Regex to search for. + * @param string $path Full filename and path. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertFilePattern($pattern, $path, $message = "%s") { + return $this->assert( + new PatternExpectation($pattern), + implode('', file($path)), + $message); + } + + /** + * If a Perl regex is found anywhere in the named + * file then a failure is generated, else a pass. + * @param string $pattern Regex to search for. + * @param string $path Full filename and path. + * @param string $message Message to display. + * @return boolean True if pass. + * @access public + */ + function assertNoFilePattern($pattern, $path, $message = "%s") { + return $this->assert( + new NoPatternExpectation($pattern), + implode('', file($path)), + $message); + } + + /** + * Accessor for current shell. Used for testing the + * the tester itself. + * @return Shell Current shell. + * @access protected + */ + protected function getShell() { + return $this->current_shell; + } + + /** + * Factory for the shell to run the command on. + * @return Shell New shell object. + * @access protected + */ + protected function createShell() { + return new SimpleShell(); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/simpletest.php b/webdata/stdlibs/simpletest/simpletest.php new file mode 100644 index 0000000..425c869 --- /dev/null +++ b/webdata/stdlibs/simpletest/simpletest.php @@ -0,0 +1,391 @@ +getParent()) { + SimpleTest::ignore($parent); + } + } + } + } + + /** + * Puts the object to the global pool of 'preferred' objects + * which can be retrieved with SimpleTest :: preferred() method. + * Instances of the same class are overwritten. + * @param object $object Preferred object + * @see preferred() + */ + static function prefer($object) { + $registry = &SimpleTest::getRegistry(); + $registry['Preferred'][] = $object; + } + + /** + * Retrieves 'preferred' objects from global pool. Class filter + * can be applied in order to retrieve the object of the specific + * class + * @param array|string $classes Allowed classes or interfaces. + * @return array|object|null + * @see prefer() + */ + static function preferred($classes) { + if (! is_array($classes)) { + $classes = array($classes); + } + $registry = &SimpleTest::getRegistry(); + for ($i = count($registry['Preferred']) - 1; $i >= 0; $i--) { + foreach ($classes as $class) { + if (SimpleTestCompatibility::isA($registry['Preferred'][$i], $class)) { + return $registry['Preferred'][$i]; + } + } + } + return null; + } + + /** + * Test to see if a test case is in the ignore + * list. Quite obviously the ignore list should + * be a separate object and will be one day. + * This method is internal to SimpleTest. Don't + * use it. + * @param string $class Class name to test. + * @return boolean True if should not be run. + */ + static function isIgnored($class) { + $registry = &SimpleTest::getRegistry(); + return isset($registry['IgnoreList'][strtolower($class)]); + } + + /** + * Sets proxy to use on all requests for when + * testing from behind a firewall. Set host + * to false to disable. This will take effect + * if there are no other proxy settings. + * @param string $proxy Proxy host as URL. + * @param string $username Proxy username for authentication. + * @param string $password Proxy password for authentication. + */ + static function useProxy($proxy, $username = false, $password = false) { + $registry = &SimpleTest::getRegistry(); + $registry['DefaultProxy'] = $proxy; + $registry['DefaultProxyUsername'] = $username; + $registry['DefaultProxyPassword'] = $password; + } + + /** + * Accessor for default proxy host. + * @return string Proxy URL. + */ + static function getDefaultProxy() { + $registry = &SimpleTest::getRegistry(); + return $registry['DefaultProxy']; + } + + /** + * Accessor for default proxy username. + * @return string Proxy username for authentication. + */ + static function getDefaultProxyUsername() { + $registry = &SimpleTest::getRegistry(); + return $registry['DefaultProxyUsername']; + } + + /** + * Accessor for default proxy password. + * @return string Proxy password for authentication. + */ + static function getDefaultProxyPassword() { + $registry = &SimpleTest::getRegistry(); + return $registry['DefaultProxyPassword']; + } + + /** + * Accessor for default HTML parsers. + * @return array List of parsers to try in + * order until one responds true + * to can(). + */ + static function getParsers() { + $registry = &SimpleTest::getRegistry(); + return $registry['Parsers']; + } + + /** + * Set the list of HTML parsers to attempt to use by default. + * @param array $parsers List of parsers to try in + * order until one responds true + * to can(). + */ + static function setParsers($parsers) { + $registry = &SimpleTest::getRegistry(); + $registry['Parsers'] = $parsers; + } + + /** + * Accessor for global registry of options. + * @return hash All stored values. + */ + protected static function &getRegistry() { + static $registry = false; + if (! $registry) { + $registry = SimpleTest::getDefaults(); + } + return $registry; + } + + /** + * Accessor for the context of the current + * test run. + * @return SimpleTestContext Current test run. + */ + static function getContext() { + static $context = false; + if (! $context) { + $context = new SimpleTestContext(); + } + return $context; + } + + /** + * Constant default values. + * @return hash All registry defaults. + */ + protected static function getDefaults() { + return array( + 'Parsers' => false, + 'MockBaseClass' => 'SimpleMock', + 'IgnoreList' => array(), + 'DefaultProxy' => false, + 'DefaultProxyUsername' => false, + 'DefaultProxyPassword' => false, + 'Preferred' => array(new HtmlReporter(), new TextReporter(), new XmlReporter())); + } + + /** + * @deprecated + */ + static function setMockBaseClass($mock_base) { + $registry = &SimpleTest::getRegistry(); + $registry['MockBaseClass'] = $mock_base; + } + + /** + * @deprecated + */ + static function getMockBaseClass() { + $registry = &SimpleTest::getRegistry(); + return $registry['MockBaseClass']; + } +} + +/** + * Container for all components for a specific + * test run. Makes things like error queues + * available to PHP event handlers, and also + * gets around some nasty reference issues in + * the mocks. + * @package SimpleTest + */ +class SimpleTestContext { + private $test; + private $reporter; + private $resources; + + /** + * Clears down the current context. + * @access public + */ + function clear() { + $this->resources = array(); + } + + /** + * Sets the current test case instance. This + * global instance can be used by the mock objects + * to send message to the test cases. + * @param SimpleTestCase $test Test case to register. + */ + function setTest($test) { + $this->clear(); + $this->test = $test; + } + + /** + * Accessor for currently running test case. + * @return SimpleTestCase Current test. + */ + function getTest() { + return $this->test; + } + + /** + * Sets the current reporter. This + * global instance can be used by the mock objects + * to send messages. + * @param SimpleReporter $reporter Reporter to register. + */ + function setReporter($reporter) { + $this->clear(); + $this->reporter = $reporter; + } + + /** + * Accessor for current reporter. + * @return SimpleReporter Current reporter. + */ + function getReporter() { + return $this->reporter; + } + + /** + * Accessor for the Singleton resource. + * @return object Global resource. + */ + function get($resource) { + if (! isset($this->resources[$resource])) { + $this->resources[$resource] = new $resource(); + } + return $this->resources[$resource]; + } +} + +/** + * Interrogates the stack trace to recover the + * failure point. + * @package SimpleTest + * @subpackage UnitTester + */ +class SimpleStackTrace { + private $prefixes; + + /** + * Stashes the list of target prefixes. + * @param array $prefixes List of method prefixes + * to search for. + */ + function __construct($prefixes) { + $this->prefixes = $prefixes; + } + + /** + * Extracts the last method name that was not within + * Simpletest itself. Captures a stack trace if none given. + * @param array $stack List of stack frames. + * @return string Snippet of test report with line + * number and file. + */ + function traceMethod($stack = false) { + $stack = $stack ? $stack : $this->captureTrace(); + foreach ($stack as $frame) { + if ($this->frameLiesWithinSimpleTestFolder($frame)) { + continue; + } + if ($this->frameMatchesPrefix($frame)) { + return ' at [' . $frame['file'] . ' line ' . $frame['line'] . ']'; + } + } + return ''; + } + + /** + * Test to see if error is generated by SimpleTest itself. + * @param array $frame PHP stack frame. + * @return boolean True if a SimpleTest file. + */ + protected function frameLiesWithinSimpleTestFolder($frame) { + if (isset($frame['file'])) { + $path = substr(SIMPLE_TEST, 0, -1); + if (strpos($frame['file'], $path) === 0) { + if (dirname($frame['file']) == $path) { + return true; + } + } + } + return false; + } + + /** + * Tries to determine if the method call is an assert, etc. + * @param array $frame PHP stack frame. + * @return boolean True if matches a target. + */ + protected function frameMatchesPrefix($frame) { + foreach ($this->prefixes as $prefix) { + if (strncmp($frame['function'], $prefix, strlen($prefix)) == 0) { + return true; + } + } + return false; + } + + /** + * Grabs a current stack trace. + * @return array Fulle trace. + */ + protected function captureTrace() { + if (function_exists('debug_backtrace')) { + return array_reverse(debug_backtrace()); + } + return array(); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/socket.php b/webdata/stdlibs/simpletest/socket.php new file mode 100644 index 0000000..06e8ca6 --- /dev/null +++ b/webdata/stdlibs/simpletest/socket.php @@ -0,0 +1,312 @@ +clearError(); + } + + /** + * Test for an outstanding error. + * @return boolean True if there is an error. + * @access public + */ + function isError() { + return ($this->error != ''); + } + + /** + * Accessor for an outstanding error. + * @return string Empty string if no error otherwise + * the error message. + * @access public + */ + function getError() { + return $this->error; + } + + /** + * Sets the internal error. + * @param string Error message to stash. + * @access protected + */ + function setError($error) { + $this->error = $error; + } + + /** + * Resets the error state to no error. + * @access protected + */ + function clearError() { + $this->setError(''); + } +} + +/** + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleFileSocket extends SimpleStickyError { + private $handle; + private $is_open = false; + private $sent = ''; + private $block_size; + + /** + * Opens a socket for reading and writing. + * @param SimpleUrl $file Target URI to fetch. + * @param integer $block_size Size of chunk to read. + * @access public + */ + function __construct($file, $block_size = 1024) { + parent::__construct(); + if (! ($this->handle = $this->openFile($file, $error))) { + $file_string = $file->asString(); + $this->setError("Cannot open [$file_string] with [$error]"); + return; + } + $this->is_open = true; + $this->block_size = $block_size; + } + + /** + * Writes some data to the socket and saves alocal copy. + * @param string $message String to send to socket. + * @return boolean True if successful. + * @access public + */ + function write($message) { + return true; + } + + /** + * Reads data from the socket. The error suppresion + * is a workaround for PHP4 always throwing a warning + * with a secure socket. + * @return integer/boolean Incoming bytes. False + * on error. + * @access public + */ + function read() { + $raw = @fread($this->handle, $this->block_size); + if ($raw === false) { + $this->setError('Cannot read from socket'); + $this->close(); + } + return $raw; + } + + /** + * Accessor for socket open state. + * @return boolean True if open. + * @access public + */ + function isOpen() { + return $this->is_open; + } + + /** + * Closes the socket preventing further reads. + * Cannot be reopened once closed. + * @return boolean True if successful. + * @access public + */ + function close() { + if (!$this->is_open) return false; + $this->is_open = false; + return fclose($this->handle); + } + + /** + * Accessor for content so far. + * @return string Bytes sent only. + * @access public + */ + function getSent() { + return $this->sent; + } + + /** + * Actually opens the low level socket. + * @param SimpleUrl $file SimpleUrl file target. + * @param string $error Recipient of error message. + * @param integer $timeout Maximum time to wait for connection. + * @access protected + */ + protected function openFile($file, &$error) { + return @fopen($file->asString(), 'r'); + } +} + +/** + * Wrapper for TCP/IP socket. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleSocket extends SimpleStickyError { + private $handle; + private $is_open = false; + private $sent = ''; + private $lock_size; + + /** + * Opens a socket for reading and writing. + * @param string $host Hostname to send request to. + * @param integer $port Port on remote machine to open. + * @param integer $timeout Connection timeout in seconds. + * @param integer $block_size Size of chunk to read. + * @access public + */ + function __construct($host, $port, $timeout, $block_size = 255) { + parent::__construct(); + if (! ($this->handle = $this->openSocket($host, $port, $error_number, $error, $timeout))) { + $this->setError("Cannot open [$host:$port] with [$error] within [$timeout] seconds"); + return; + } + $this->is_open = true; + $this->block_size = $block_size; + SimpleTestCompatibility::setTimeout($this->handle, $timeout); + } + + /** + * Writes some data to the socket and saves alocal copy. + * @param string $message String to send to socket. + * @return boolean True if successful. + * @access public + */ + function write($message) { + if ($this->isError() || ! $this->isOpen()) { + return false; + } + $count = fwrite($this->handle, $message); + if (! $count) { + if ($count === false) { + $this->setError('Cannot write to socket'); + $this->close(); + } + return false; + } + fflush($this->handle); + $this->sent .= $message; + return true; + } + + /** + * Reads data from the socket. The error suppresion + * is a workaround for PHP4 always throwing a warning + * with a secure socket. + * @return integer/boolean Incoming bytes. False + * on error. + * @access public + */ + function read() { + if ($this->isError() || ! $this->isOpen()) { + return false; + } + $raw = @fread($this->handle, $this->block_size); + if ($raw === false) { + $this->setError('Cannot read from socket'); + $this->close(); + } + return $raw; + } + + /** + * Accessor for socket open state. + * @return boolean True if open. + * @access public + */ + function isOpen() { + return $this->is_open; + } + + /** + * Closes the socket preventing further reads. + * Cannot be reopened once closed. + * @return boolean True if successful. + * @access public + */ + function close() { + $this->is_open = false; + return fclose($this->handle); + } + + /** + * Accessor for content so far. + * @return string Bytes sent only. + * @access public + */ + function getSent() { + return $this->sent; + } + + /** + * Actually opens the low level socket. + * @param string $host Host to connect to. + * @param integer $port Port on host. + * @param integer $error_number Recipient of error code. + * @param string $error Recipoent of error message. + * @param integer $timeout Maximum time to wait for connection. + * @access protected + */ + protected function openSocket($host, $port, &$error_number, &$error, $timeout) { + return @fsockopen($host, $port, $error_number, $error, $timeout); + } +} + +/** + * Wrapper for TCP/IP socket over TLS. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleSecureSocket extends SimpleSocket { + + /** + * Opens a secure socket for reading and writing. + * @param string $host Hostname to send request to. + * @param integer $port Port on remote machine to open. + * @param integer $timeout Connection timeout in seconds. + * @access public + */ + function __construct($host, $port, $timeout) { + parent::__construct($host, $port, $timeout); + } + + /** + * Actually opens the low level socket. + * @param string $host Host to connect to. + * @param integer $port Port on host. + * @param integer $error_number Recipient of error code. + * @param string $error Recipient of error message. + * @param integer $timeout Maximum time to wait for connection. + * @access protected + */ + function openSocket($host, $port, &$error_number, &$error, $timeout) { + return parent::openSocket("tls://$host", $port, $error_number, $error, $timeout); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/tag.php b/webdata/stdlibs/simpletest/tag.php new file mode 100644 index 0000000..afe649e --- /dev/null +++ b/webdata/stdlibs/simpletest/tag.php @@ -0,0 +1,1527 @@ + 'SimpleAnchorTag', + 'title' => 'SimpleTitleTag', + 'base' => 'SimpleBaseTag', + 'button' => 'SimpleButtonTag', + 'textarea' => 'SimpleTextAreaTag', + 'option' => 'SimpleOptionTag', + 'label' => 'SimpleLabelTag', + 'form' => 'SimpleFormTag', + 'frame' => 'SimpleFrameTag'); + $attributes = $this->keysToLowerCase($attributes); + if (array_key_exists($name, $map)) { + $tag_class = $map[$name]; + return new $tag_class($attributes); + } elseif ($name == 'select') { + return $this->createSelectionTag($attributes); + } elseif ($name == 'input') { + return $this->createInputTag($attributes); + } + return new SimpleTag($name, $attributes); + } + + /** + * Factory for selection fields. + * @param hash $attributes Element attributes. + * @return SimpleTag Tag object. + * @access protected + */ + protected function createSelectionTag($attributes) { + if (isset($attributes['multiple'])) { + return new MultipleSelectionTag($attributes); + } + return new SimpleSelectionTag($attributes); + } + + /** + * Factory for input tags. + * @param hash $attributes Element attributes. + * @return SimpleTag Tag object. + * @access protected + */ + protected function createInputTag($attributes) { + if (! isset($attributes['type'])) { + return new SimpleTextTag($attributes); + } + $type = strtolower(trim($attributes['type'])); + $map = array( + 'submit' => 'SimpleSubmitTag', + 'image' => 'SimpleImageSubmitTag', + 'checkbox' => 'SimpleCheckboxTag', + 'radio' => 'SimpleRadioButtonTag', + 'text' => 'SimpleTextTag', + 'hidden' => 'SimpleTextTag', + 'password' => 'SimpleTextTag', + 'file' => 'SimpleUploadTag'); + if (array_key_exists($type, $map)) { + $tag_class = $map[$type]; + return new $tag_class($attributes); + } + return false; + } + + /** + * Make the keys lower case for case insensitive look-ups. + * @param hash $map Hash to convert. + * @return hash Unchanged values, but keys lower case. + * @access private + */ + protected function keysToLowerCase($map) { + $lower = array(); + foreach ($map as $key => $value) { + $lower[strtolower($key)] = $value; + } + return $lower; + } +} + +/** + * HTML or XML tag. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleTag { + private $name; + private $attributes; + private $content; + + /** + * Starts with a named tag with attributes only. + * @param string $name Tag name. + * @param hash $attributes Attribute names and + * string values. Note that + * the keys must have been + * converted to lower case. + */ + function __construct($name, $attributes) { + $this->name = strtolower(trim($name)); + $this->attributes = $attributes; + $this->content = ''; + } + + /** + * Check to see if the tag can have both start and + * end tags with content in between. + * @return boolean True if content allowed. + * @access public + */ + function expectEndTag() { + return true; + } + + /** + * The current tag should not swallow all content for + * itself as it's searchable page content. Private + * content tags are usually widgets that contain default + * values. + * @return boolean False as content is available + * to other tags by default. + * @access public + */ + function isPrivateContent() { + return false; + } + + /** + * Appends string content to the current content. + * @param string $content Additional text. + * @access public + */ + function addContent($content) { + $this->content .= (string)$content; + return $this; + } + + /** + * Adds an enclosed tag to the content. + * @param SimpleTag $tag New tag. + * @access public + */ + function addTag($tag) { + } + + /** + * Adds multiple enclosed tags to the content. + * @param array List of SimpleTag objects to be added. + */ + function addTags($tags) { + foreach ($tags as $tag) { + $this->addTag($tag); + } + } + + /** + * Accessor for tag name. + * @return string Name of tag. + * @access public + */ + function getTagName() { + return $this->name; + } + + /** + * List of legal child elements. + * @return array List of element names. + * @access public + */ + function getChildElements() { + return array(); + } + + /** + * Accessor for an attribute. + * @param string $label Attribute name. + * @return string Attribute value. + * @access public + */ + function getAttribute($label) { + $label = strtolower($label); + if (! isset($this->attributes[$label])) { + return false; + } + return (string)$this->attributes[$label]; + } + + /** + * Sets an attribute. + * @param string $label Attribute name. + * @return string $value New attribute value. + * @access protected + */ + protected function setAttribute($label, $value) { + $this->attributes[strtolower($label)] = $value; + } + + /** + * Accessor for the whole content so far. + * @return string Content as big raw string. + * @access public + */ + function getContent() { + return $this->content; + } + + /** + * Accessor for content reduced to visible text. Acts + * like a text mode browser, normalising space and + * reducing images to their alt text. + * @return string Content as plain text. + * @access public + */ + function getText() { + return SimplePage::normalise($this->content); + } + + /** + * Test to see if id attribute matches. + * @param string $id ID to test against. + * @return boolean True on match. + * @access public + */ + function isId($id) { + return ($this->getAttribute('id') == $id); + } +} + +/** + * Base url. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleBaseTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('base', $attributes); + } + + /** + * Base tag is not a block tag. + * @return boolean false + * @access public + */ + function expectEndTag() { + return false; + } +} + +/** + * Page title. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleTitleTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('title', $attributes); + } +} + +/** + * Link. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleAnchorTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('a', $attributes); + } + + /** + * Accessor for URL as string. + * @return string Coerced as string. + * @access public + */ + function getHref() { + $url = $this->getAttribute('href'); + if (is_bool($url)) { + $url = ''; + } + return $url; + } +} + +/** + * Form element. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleWidget extends SimpleTag { + private $value; + private $label; + private $is_set; + + /** + * Starts with a named tag with attributes only. + * @param string $name Tag name. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($name, $attributes) { + parent::__construct($name, $attributes); + $this->value = false; + $this->label = false; + $this->is_set = false; + } + + /** + * Accessor for name submitted as the key in + * GET/POST privateiables hash. + * @return string Parsed value. + * @access public + */ + function getName() { + return $this->getAttribute('name'); + } + + /** + * Accessor for default value parsed with the tag. + * @return string Parsed value. + * @access public + */ + function getDefault() { + return $this->getAttribute('value'); + } + + /** + * Accessor for currently set value or default if + * none. + * @return string Value set by form or default + * if none. + * @access public + */ + function getValue() { + if (! $this->is_set) { + return $this->getDefault(); + } + return $this->value; + } + + /** + * Sets the current form element value. + * @param string $value New value. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + $this->value = $value; + $this->is_set = true; + return true; + } + + /** + * Resets the form element value back to the + * default. + * @access public + */ + function resetValue() { + $this->is_set = false; + } + + /** + * Allows setting of a label externally, say by a + * label tag. + * @param string $label Label to attach. + * @access public + */ + function setLabel($label) { + $this->label = trim($label); + return $this; + } + + /** + * Reads external or internal label. + * @param string $label Label to test. + * @return boolean True is match. + * @access public + */ + function isLabel($label) { + return $this->label == trim($label); + } + + /** + * Dispatches the value into the form encoded packet. + * @param SimpleEncoding $encoding Form packet. + * @access public + */ + function write($encoding) { + if ($this->getName()) { + $encoding->add($this->getName(), $this->getValue()); + } + } +} + +/** + * Text, password and hidden field. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleTextTag extends SimpleWidget { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + if ($this->getAttribute('value') === false) { + $this->setAttribute('value', ''); + } + } + + /** + * Tag contains no content. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * Sets the current form element value. Cannot + * change the value of a hidden field. + * @param string $value New value. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + if ($this->getAttribute('type') == 'hidden') { + return false; + } + return parent::setValue($value); + } +} + +/** + * Submit button as input tag. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleSubmitTag extends SimpleWidget { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + if ($this->getAttribute('value') === false) { + $this->setAttribute('value', 'Submit'); + } + } + + /** + * Tag contains no end element. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * Disables the setting of the button value. + * @param string $value Ignored. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + return false; + } + + /** + * Value of browser visible text. + * @return string Visible label. + * @access public + */ + function getLabel() { + return $this->getValue(); + } + + /** + * Test for a label match when searching. + * @param string $label Label to test. + * @return boolean True on match. + * @access public + */ + function isLabel($label) { + return trim($label) == trim($this->getLabel()); + } +} + +/** + * Image button as input tag. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleImageSubmitTag extends SimpleWidget { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + } + + /** + * Tag contains no end element. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * Disables the setting of the button value. + * @param string $value Ignored. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + return false; + } + + /** + * Value of browser visible text. + * @return string Visible label. + * @access public + */ + function getLabel() { + if ($this->getAttribute('title')) { + return $this->getAttribute('title'); + } + return $this->getAttribute('alt'); + } + + /** + * Test for a label match when searching. + * @param string $label Label to test. + * @return boolean True on match. + * @access public + */ + function isLabel($label) { + return trim($label) == trim($this->getLabel()); + } + + /** + * Dispatches the value into the form encoded packet. + * @param SimpleEncoding $encoding Form packet. + * @param integer $x X coordinate of click. + * @param integer $y Y coordinate of click. + * @access public + */ + function write($encoding, $x = 1, $y = 1) { + if ($this->getName()) { + $encoding->add($this->getName() . '.x', $x); + $encoding->add($this->getName() . '.y', $y); + } else { + $encoding->add('x', $x); + $encoding->add('y', $y); + } + } +} + +/** + * Submit button as button tag. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleButtonTag extends SimpleWidget { + + /** + * Starts with a named tag with attributes only. + * Defaults are very browser dependent. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('button', $attributes); + } + + /** + * Check to see if the tag can have both start and + * end tags with content in between. + * @return boolean True if content allowed. + * @access public + */ + function expectEndTag() { + return true; + } + + /** + * Disables the setting of the button value. + * @param string $value Ignored. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + return false; + } + + /** + * Value of browser visible text. + * @return string Visible label. + * @access public + */ + function getLabel() { + return $this->getContent(); + } + + /** + * Test for a label match when searching. + * @param string $label Label to test. + * @return boolean True on match. + * @access public + */ + function isLabel($label) { + return trim($label) == trim($this->getLabel()); + } +} + +/** + * Content tag for text area. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleTextAreaTag extends SimpleWidget { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('textarea', $attributes); + } + + /** + * Accessor for starting value. + * @return string Parsed value. + * @access public + */ + function getDefault() { + return $this->wrap(html_entity_decode($this->getContent(), ENT_QUOTES)); + } + + /** + * Applies word wrapping if needed. + * @param string $value New value. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + return parent::setValue($this->wrap($value)); + } + + /** + * Test to see if text should be wrapped. + * @return boolean True if wrapping on. + * @access private + */ + function wrapIsEnabled() { + if ($this->getAttribute('cols')) { + $wrap = $this->getAttribute('wrap'); + if (($wrap == 'physical') || ($wrap == 'hard')) { + return true; + } + } + return false; + } + + /** + * Performs the formatting that is peculiar to + * this tag. There is strange behaviour in this + * one, including stripping a leading new line. + * Go figure. I am using Firefox as a guide. + * @param string $text Text to wrap. + * @return string Text wrapped with carriage + * returns and line feeds + * @access private + */ + protected function wrap($text) { + $text = str_replace("\r\r\n", "\r\n", str_replace("\n", "\r\n", $text)); + $text = str_replace("\r\n\n", "\r\n", str_replace("\r", "\r\n", $text)); + if (strncmp($text, "\r\n", strlen("\r\n")) == 0) { + $text = substr($text, strlen("\r\n")); + } + if ($this->wrapIsEnabled()) { + return wordwrap( + $text, + (integer)$this->getAttribute('cols'), + "\r\n"); + } + return $text; + } + + /** + * The content of textarea is not part of the page. + * @return boolean True. + * @access public + */ + function isPrivateContent() { + return true; + } +} + +/** + * File upload widget. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleUploadTag extends SimpleWidget { + + /** + * Starts with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + } + + /** + * Tag contains no content. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * Dispatches the value into the form encoded packet. + * @param SimpleEncoding $encoding Form packet. + * @access public + */ + function write($encoding) { + if (! file_exists($this->getValue())) { + return; + } + $encoding->attach( + $this->getName(), + implode('', file($this->getValue())), + basename($this->getValue())); + } +} + +/** + * Drop down widget. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleSelectionTag extends SimpleWidget { + private $options; + private $choice; + + /** + * Starts with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('select', $attributes); + $this->options = array(); + $this->choice = false; + } + + /** + * Adds an option tag to a selection field. + * @param SimpleOptionTag $tag New option. + * @access public + */ + function addTag($tag) { + if ($tag->getTagName() == 'option') { + $this->options[] = $tag; + } + } + + /** + * Text within the selection element is ignored. + * @param string $content Ignored. + * @access public + */ + function addContent($content) { + return $this; + } + + /** + * Scans options for defaults. If none, then + * the first option is selected. + * @return string Selected field. + * @access public + */ + function getDefault() { + for ($i = 0, $count = count($this->options); $i < $count; $i++) { + if ($this->options[$i]->getAttribute('selected') !== false) { + return $this->options[$i]->getDefault(); + } + } + if ($count > 0) { + return $this->options[0]->getDefault(); + } + return ''; + } + + /** + * Can only set allowed values. + * @param string $value New choice. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + for ($i = 0, $count = count($this->options); $i < $count; $i++) { + if ($this->options[$i]->isValue($value)) { + $this->choice = $i; + return true; + } + } + return false; + } + + /** + * Accessor for current selection value. + * @return string Value attribute or + * content of opton. + * @access public + */ + function getValue() { + if ($this->choice === false) { + return $this->getDefault(); + } + return $this->options[$this->choice]->getValue(); + } +} + +/** + * Drop down widget. + * @package SimpleTest + * @subpackage WebTester + */ +class MultipleSelectionTag extends SimpleWidget { + private $options; + private $values; + + /** + * Starts with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('select', $attributes); + $this->options = array(); + $this->values = false; + } + + /** + * Adds an option tag to a selection field. + * @param SimpleOptionTag $tag New option. + * @access public + */ + function addTag($tag) { + if ($tag->getTagName() == 'option') { + $this->options[] = &$tag; + } + } + + /** + * Text within the selection element is ignored. + * @param string $content Ignored. + * @access public + */ + function addContent($content) { + return $this; + } + + /** + * Scans options for defaults to populate the + * value array(). + * @return array Selected fields. + * @access public + */ + function getDefault() { + $default = array(); + for ($i = 0, $count = count($this->options); $i < $count; $i++) { + if ($this->options[$i]->getAttribute('selected') !== false) { + $default[] = $this->options[$i]->getDefault(); + } + } + return $default; + } + + /** + * Can only set allowed values. Any illegal value + * will result in a failure, but all correct values + * will be set. + * @param array $desired New choices. + * @return boolean True if all allowed. + * @access public + */ + function setValue($desired) { + $achieved = array(); + foreach ($desired as $value) { + $success = false; + for ($i = 0, $count = count($this->options); $i < $count; $i++) { + if ($this->options[$i]->isValue($value)) { + $achieved[] = $this->options[$i]->getValue(); + $success = true; + break; + } + } + if (! $success) { + return false; + } + } + $this->values = $achieved; + return true; + } + + /** + * Accessor for current selection value. + * @return array List of currently set options. + * @access public + */ + function getValue() { + if ($this->values === false) { + return $this->getDefault(); + } + return $this->values; + } +} + +/** + * Option for selection field. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleOptionTag extends SimpleWidget { + + /** + * Stashes the attributes. + */ + function __construct($attributes) { + parent::__construct('option', $attributes); + } + + /** + * Does nothing. + * @param string $value Ignored. + * @return boolean Not allowed. + * @access public + */ + function setValue($value) { + return false; + } + + /** + * Test to see if a value matches the option. + * @param string $compare Value to compare with. + * @return boolean True if possible match. + * @access public + */ + function isValue($compare) { + $compare = trim($compare); + if (trim($this->getValue()) == $compare) { + return true; + } + return trim(strip_tags($this->getContent())) == $compare; + } + + /** + * Accessor for starting value. Will be set to + * the option label if no value exists. + * @return string Parsed value. + * @access public + */ + function getDefault() { + if ($this->getAttribute('value') === false) { + return strip_tags($this->getContent()); + } + return $this->getAttribute('value'); + } + + /** + * The content of options is not part of the page. + * @return boolean True. + * @access public + */ + function isPrivateContent() { + return true; + } +} + +/** + * Radio button. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleRadioButtonTag extends SimpleWidget { + + /** + * Stashes the attributes. + * @param array $attributes Hash of attributes. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + if ($this->getAttribute('value') === false) { + $this->setAttribute('value', 'on'); + } + } + + /** + * Tag contains no content. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * The only allowed value sn the one in the + * "value" attribute. + * @param string $value New value. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + if ($value === false) { + return parent::setValue($value); + } + if ($value != $this->getAttribute('value')) { + return false; + } + return parent::setValue($value); + } + + /** + * Accessor for starting value. + * @return string Parsed value. + * @access public + */ + function getDefault() { + if ($this->getAttribute('checked') !== false) { + return $this->getAttribute('value'); + } + return false; + } +} + +/** + * Checkbox widget. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleCheckboxTag extends SimpleWidget { + + /** + * Starts with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('input', $attributes); + if ($this->getAttribute('value') === false) { + $this->setAttribute('value', 'on'); + } + } + + /** + * Tag contains no content. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } + + /** + * The only allowed value in the one in the + * "value" attribute. The default for this + * attribute is "on". If this widget is set to + * true, then the usual value will be taken. + * @param string $value New value. + * @return boolean True if allowed. + * @access public + */ + function setValue($value) { + if ($value === false) { + return parent::setValue($value); + } + if ($value === true) { + return parent::setValue($this->getAttribute('value')); + } + if ($value != $this->getAttribute('value')) { + return false; + } + return parent::setValue($value); + } + + /** + * Accessor for starting value. The default + * value is "on". + * @return string Parsed value. + * @access public + */ + function getDefault() { + if ($this->getAttribute('checked') !== false) { + return $this->getAttribute('value'); + } + return false; + } +} + +/** + * A group of multiple widgets with some shared behaviour. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleTagGroup { + private $widgets = array(); + + /** + * Adds a tag to the group. + * @param SimpleWidget $widget + * @access public + */ + function addWidget($widget) { + $this->widgets[] = $widget; + } + + /** + * Accessor to widget set. + * @return array All widgets. + * @access protected + */ + protected function &getWidgets() { + return $this->widgets; + } + + /** + * Accessor for an attribute. + * @param string $label Attribute name. + * @return boolean Always false. + * @access public + */ + function getAttribute($label) { + return false; + } + + /** + * Fetches the name for the widget from the first + * member. + * @return string Name of widget. + * @access public + */ + function getName() { + if (count($this->widgets) > 0) { + return $this->widgets[0]->getName(); + } + } + + /** + * Scans the widgets for one with the appropriate + * ID field. + * @param string $id ID value to try. + * @return boolean True if matched. + * @access public + */ + function isId($id) { + for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { + if ($this->widgets[$i]->isId($id)) { + return true; + } + } + return false; + } + + /** + * Scans the widgets for one with the appropriate + * attached label. + * @param string $label Attached label to try. + * @return boolean True if matched. + * @access public + */ + function isLabel($label) { + for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { + if ($this->widgets[$i]->isLabel($label)) { + return true; + } + } + return false; + } + + /** + * Dispatches the value into the form encoded packet. + * @param SimpleEncoding $encoding Form packet. + * @access public + */ + function write($encoding) { + $encoding->add($this->getName(), $this->getValue()); + } +} + +/** + * A group of tags with the same name within a form. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleCheckboxGroup extends SimpleTagGroup { + + /** + * Accessor for current selected widget or false + * if none. + * @return string/array Widget values or false if none. + * @access public + */ + function getValue() { + $values = array(); + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if ($widgets[$i]->getValue() !== false) { + $values[] = $widgets[$i]->getValue(); + } + } + return $this->coerceValues($values); + } + + /** + * Accessor for starting value that is active. + * @return string/array Widget values or false if none. + * @access public + */ + function getDefault() { + $values = array(); + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if ($widgets[$i]->getDefault() !== false) { + $values[] = $widgets[$i]->getDefault(); + } + } + return $this->coerceValues($values); + } + + /** + * Accessor for current set values. + * @param string/array/boolean $values Either a single string, a + * hash or false for nothing set. + * @return boolean True if all values can be set. + * @access public + */ + function setValue($values) { + $values = $this->makeArray($values); + if (! $this->valuesArePossible($values)) { + return false; + } + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + $possible = $widgets[$i]->getAttribute('value'); + if (in_array($widgets[$i]->getAttribute('value'), $values)) { + $widgets[$i]->setValue($possible); + } else { + $widgets[$i]->setValue(false); + } + } + return true; + } + + /** + * Tests to see if a possible value set is legal. + * @param string/array/boolean $values Either a single string, a + * hash or false for nothing set. + * @return boolean False if trying to set a + * missing value. + * @access private + */ + protected function valuesArePossible($values) { + $matches = array(); + $widgets = &$this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + $possible = $widgets[$i]->getAttribute('value'); + if (in_array($possible, $values)) { + $matches[] = $possible; + } + } + return ($values == $matches); + } + + /** + * Converts the output to an appropriate format. This means + * that no values is false, a single value is just that + * value and only two or more are contained in an array. + * @param array $values List of values of widgets. + * @return string/array/boolean Expected format for a tag. + * @access private + */ + protected function coerceValues($values) { + if (count($values) == 0) { + return false; + } elseif (count($values) == 1) { + return $values[0]; + } else { + return $values; + } + } + + /** + * Converts false or string into array. The opposite of + * the coercian method. + * @param string/array/boolean $value A single item is converted + * to a one item list. False + * gives an empty list. + * @return array List of values, possibly empty. + * @access private + */ + protected function makeArray($value) { + if ($value === false) { + return array(); + } + if (is_string($value)) { + return array($value); + } + return $value; + } +} + +/** + * A group of tags with the same name within a form. + * Used for radio buttons. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleRadioGroup extends SimpleTagGroup { + + /** + * Each tag is tried in turn until one is + * successfully set. The others will be + * unchecked if successful. + * @param string $value New value. + * @return boolean True if any allowed. + * @access public + */ + function setValue($value) { + if (! $this->valueIsPossible($value)) { + return false; + } + $index = false; + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if (! $widgets[$i]->setValue($value)) { + $widgets[$i]->setValue(false); + } + } + return true; + } + + /** + * Tests to see if a value is allowed. + * @param string Attempted value. + * @return boolean True if a valid value. + * @access private + */ + protected function valueIsPossible($value) { + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if ($widgets[$i]->getAttribute('value') == $value) { + return true; + } + } + return false; + } + + /** + * Accessor for current selected widget or false + * if none. + * @return string/boolean Value attribute or + * content of opton. + * @access public + */ + function getValue() { + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if ($widgets[$i]->getValue() !== false) { + return $widgets[$i]->getValue(); + } + } + return false; + } + + /** + * Accessor for starting value that is active. + * @return string/boolean Value of first checked + * widget or false if none. + * @access public + */ + function getDefault() { + $widgets = $this->getWidgets(); + for ($i = 0, $count = count($widgets); $i < $count; $i++) { + if ($widgets[$i]->getDefault() !== false) { + return $widgets[$i]->getDefault(); + } + } + return false; + } +} + +/** + * Tag to keep track of labels. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleLabelTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('label', $attributes); + } + + /** + * Access for the ID to attach the label to. + * @return string For attribute. + * @access public + */ + function getFor() { + return $this->getAttribute('for'); + } +} + +/** + * Tag to aid parsing the form. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleFormTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('form', $attributes); + } +} + +/** + * Tag to aid parsing the frames in a page. + * @package SimpleTest + * @subpackage WebTester + */ +class SimpleFrameTag extends SimpleTag { + + /** + * Starts with a named tag with attributes only. + * @param hash $attributes Attribute names and + * string values. + */ + function __construct($attributes) { + parent::__construct('frame', $attributes); + } + + /** + * Tag contains no content. + * @return boolean False. + * @access public + */ + function expectEndTag() { + return false; + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/acceptance_test.php b/webdata/stdlibs/simpletest/test/acceptance_test.php new file mode 100644 index 0000000..e96fe73 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/acceptance_test.php @@ -0,0 +1,1729 @@ +addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $this->assertTrue($browser->get($this->samples() . 'network_confirm.php')); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/', $browser->getContent()); + $this->assertEqual($browser->getTitle(), 'Simple test target file'); + $this->assertEqual($browser->getResponseCode(), 200); + $this->assertEqual($browser->getMimeType(), 'text/html'); + } + + function testPost() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $this->assertTrue($browser->post($this->samples() . 'network_confirm.php')); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/', $browser->getContent()); + } + + function testAbsoluteLinkFollowing() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($browser->clickLink('Absolute')); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + } + + function testRelativeEncodedLinkFollowing() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'link_confirm.php'); + // Warning: the below data is ISO 8859-1 encoded + $this->assertTrue($browser->clickLink("m\xE4rc\xEAl kiek'eboe")); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + } + + function testRelativeLinkFollowing() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($browser->clickLink('Relative')); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + } + + function testUnifiedClickLinkClicking() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($browser->click('Relative')); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + } + + function testIdLinkFollowing() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($browser->clickLinkById(1)); + $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); + } + + function testCookieReading() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'set_cookies.php'); + $this->assertEqual($browser->getCurrentCookieValue('session_cookie'), 'A'); + $this->assertEqual($browser->getCurrentCookieValue('short_cookie'), 'B'); + $this->assertEqual($browser->getCurrentCookieValue('day_cookie'), 'C'); + } + + function testSimpleSubmit() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'form.html'); + $this->assertTrue($browser->clickSubmit('Go!')); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/', $browser->getContent()); + $this->assertPattern('/go=\[Go!\]/', $browser->getContent()); + } + + function testUnifiedClickCanSubmit() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $browser->get($this->samples() . 'form.html'); + $this->assertTrue($browser->click('Go!')); + $this->assertPattern('/go=\[Go!\]/', $browser->getContent()); + } +} + +class TestOfLocalFileBrowser extends UnitTestCase { + function samples() { + return 'file://'.dirname(__FILE__).'/site/'; + } + + function testGet() { + $browser = new SimpleBrowser(); + $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + $this->assertTrue($browser->get($this->samples() . 'file.html')); + $this->assertPattern('/Link to SimpleTest/', $browser->getContent()); + $this->assertEqual($browser->getTitle(), 'Link to SimpleTest'); + $this->assertFalse($browser->getResponseCode()); + $this->assertEqual($browser->getMimeType(), ''); + } +} + +class TestOfRequestMethods extends UnitTestCase { + function samples() { + return SimpleTestAcceptanceTest::samples(); + } + + function testHeadRequest() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->head($this->samples() . 'request_methods.php')); + $this->assertEqual($browser->getResponseCode(), 202); + } + + function testGetRequest() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->get($this->samples() . 'request_methods.php')); + $this->assertEqual($browser->getResponseCode(), 405); + } + + function testPostWithPlainEncoding() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->post($this->samples() . 'request_methods.php', 'A content message')); + $this->assertEqual($browser->getResponseCode(), 406); + $this->assertPattern('/Please ensure content type is an XML format/', $browser->getContent()); + } + + function testPostWithXmlEncoding() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->post($this->samples() . 'request_methods.php', 'c', 'text/xml')); + $this->assertEqual($browser->getResponseCode(), 201); + $this->assertPattern('/c/', $browser->getContent()); + } + + function testPutWithPlainEncoding() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->put($this->samples() . 'request_methods.php', 'A content message')); + $this->assertEqual($browser->getResponseCode(), 406); + $this->assertPattern('/Please ensure content type is an XML format/', $browser->getContent()); + } + + function testPutWithXmlEncoding() { + $browser = new SimpleBrowser(); + $this->assertTrue($browser->put($this->samples() . 'request_methods.php', 'c', 'application/xml')); + $this->assertEqual($browser->getResponseCode(), 201); + $this->assertPattern('/c/', $browser->getContent()); + } + + function testDeleteRequest() { + $browser = new SimpleBrowser(); + $browser->delete($this->samples() . 'request_methods.php'); + $this->assertEqual($browser->getResponseCode(), 202); + $this->assertPattern('/Your delete request was accepted/', $browser->getContent()); + } + +} + +class TestRadioFields extends SimpleTestAcceptanceTest { + function testSetFieldAsInteger() { + $this->get($this->samples() . 'form_with_radio_buttons.html'); + $this->assertTrue($this->setField('tested_field', 2)); + $this->clickSubmitByName('send'); + $this->assertEqual($this->getUrl(), $this->samples() . 'form_with_radio_buttons.html?tested_field=2&send=click+me'); + } + + function testSetFieldAsString() { + $this->get($this->samples() . 'form_with_radio_buttons.html'); + $this->assertTrue($this->setField('tested_field', '2')); + $this->clickSubmitByName('send'); + $this->assertEqual($this->getUrl(), $this->samples() . 'form_with_radio_buttons.html?tested_field=2&send=click+me'); + } +} + +class TestOfLiveFetching extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testFormWithArrayBasedInputs() { + $this->get($this->samples() . 'form_with_array_based_inputs.php'); + $this->setField('value[]', '3', '1'); + $this->setField('value[]', '4', '2'); + $this->clickSubmit('Go'); + $this->assertPattern('/QUERY_STRING : value%5B%5D=3&value%5B%5D=4&submit=Go/'); + } + + function testFormWithQuotedValues() { + $this->get($this->samples() . 'form_with_quoted_values.php'); + $this->assertField('a', 'default'); + $this->assertFieldById('text_field', 'default'); + $this->clickSubmit('Go'); + $this->assertPattern('/a=default&submit=Go/'); + } + + function testGet() { + $this->assertTrue($this->get($this->samples() . 'network_confirm.php')); + $this->assertEqual($this->getUrl(), $this->samples() . 'network_confirm.php'); + $this->assertText('target for the SimpleTest'); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertTitle('Simple test target file'); + $this->assertTitle(new PatternExpectation('/target file/')); + $this->assertResponse(200); + $this->assertMime('text/html'); + $this->assertHeader('connection', 'close'); + $this->assertHeader('connection', new PatternExpectation('/los/')); + } + + function testSlowGet() { + $this->assertTrue($this->get($this->samples() . 'slow_page.php')); + } + + function testTimedOutGet() { + $this->setConnectionTimeout(1); + $this->ignoreErrors(); + $this->assertFalse($this->get($this->samples() . 'slow_page.php')); + } + + function testPost() { + $this->assertTrue($this->post($this->samples() . 'network_confirm.php')); + $this->assertText('target for the SimpleTest'); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + } + + function testGetWithData() { + $this->get($this->samples() . 'network_confirm.php', array("a" => "aaa")); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[aaa]'); + } + + function testPostWithData() { + $this->post($this->samples() . 'network_confirm.php', array("a" => "aaa")); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aaa]'); + } + + function testPostWithRecursiveData() { + $this->post($this->samples() . 'network_confirm.php', array("a" => "aaa")); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aaa]'); + + $this->post($this->samples() . 'network_confirm.php', array("a[aa]" => "aaa")); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aa=[aaa]]'); + + $this->post($this->samples() . 'network_confirm.php', array("a[aa][aaa]" => "aaaa")); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aa=[aaa=[aaaa]]]'); + + $this->post($this->samples() . 'network_confirm.php', array("a" => array("aa" => "aaa"))); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aa=[aaa]]'); + + $this->post($this->samples() . 'network_confirm.php', array("a" => array("aa" => array("aaa" => "aaaa")))); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aa=[aaa=[aaaa]]]'); + } + + function testRelativeGet() { + $this->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($this->get('network_confirm.php')); + $this->assertText('target for the SimpleTest'); + } + + function testRelativePost() { + $this->post($this->samples() . 'link_confirm.php', array('a' => '123')); + $this->assertTrue($this->post('network_confirm.php')); + $this->assertText('target for the SimpleTest'); + } +} + +class TestOfLinkFollowing extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testLinkAssertions() { + $this->get($this->samples() . 'link_confirm.php'); + $this->assertLink('Absolute', $this->samples() . 'network_confirm.php'); + $this->assertLink('Absolute', new PatternExpectation('/confirm/')); + $this->assertClickable('Absolute'); + } + + function testAbsoluteLinkFollowing() { + $this->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($this->clickLink('Absolute')); + $this->assertText('target for the SimpleTest'); + } + + function testRelativeLinkFollowing() { + $this->get($this->samples() . 'link_confirm.php'); + $this->assertTrue($this->clickLink('Relative')); + $this->assertText('target for the SimpleTest'); + } + + function testLinkIdFollowing() { + $this->get($this->samples() . 'link_confirm.php'); + $this->assertLinkById(1); + $this->assertTrue($this->clickLinkById(1)); + $this->assertText('target for the SimpleTest'); + } + + function testAbsoluteUrlBehavesAbsolutely() { + $this->get($this->samples() . 'link_confirm.php'); + $this->get('http://www.lastcraft.com'); + $this->assertText('No guarantee of quality is given or even intended'); + } + + function testRelativeUrlRespectsBaseTag() { + $this->get($this->samples() . 'base_tag/base_link.html'); + $this->click('Back to test pages'); + $this->assertTitle('Simple test target file'); + } +} + +class TestOfLivePageLinkingWithMinimalLinks extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testClickToExplicitelyNamedSelfReturns() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->assertEqual($this->getUrl(), $this->samples() . 'front_controller_style/a_page.php'); + $this->assertTitle('Simple test page with links'); + $this->assertLink('Self'); + $this->clickLink('Self'); + $this->assertTitle('Simple test page with links'); + } + + function testClickToMissingPageReturnsToSamePage() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->clickLink('No page'); + $this->assertTitle('Simple test page with links'); + $this->assertText('[action=no_page]'); + } + + function testClickToBareActionReturnsToSamePage() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->clickLink('Bare action'); + $this->assertTitle('Simple test page with links'); + $this->assertText('[action=]'); + } + + function testClickToSingleQuestionMarkReturnsToSamePage() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->clickLink('Empty query'); + $this->assertTitle('Simple test page with links'); + } + + function testClickToEmptyStringReturnsToSamePage() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->clickLink('Empty link'); + $this->assertTitle('Simple test page with links'); + } + + function testClickToSingleDotGoesToCurrentDirectory() { + $this->get($this->samples() . 'front_controller_style/a_page.php'); + $this->clickLink('Current directory'); + $this->assertTitle( + 'Simple test front controller', + '%s -> index.php needs to be set as a default web server home page'); + } + + function testClickBackADirectoryLevel() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('Down one'); + $this->assertPattern('|Index of .*?/test|i'); + } +} + +class TestOfLiveFrontControllerEmulation extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testJumpToNamedPage() { + $this->get($this->samples() . 'front_controller_style/'); + $this->assertText('Simple test front controller'); + $this->clickLink('Index'); + $this->assertResponse(200); + $this->assertText('[action=index]'); + } + + function testJumpToUnnamedPage() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('No page'); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + $this->assertText('[action=no_page]'); + } + + function testJumpToUnnamedPageWithBareParameter() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('Bare action'); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + $this->assertText('[action=]'); + } + + function testJumpToUnnamedPageWithEmptyQuery() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('Empty query'); + $this->assertResponse(200); + $this->assertPattern('/Simple test front controller/'); + $this->assertPattern('/raw get data.*?\[\].*?get data/si'); + } + + function testJumpToUnnamedPageWithEmptyLink() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('Empty link'); + $this->assertResponse(200); + $this->assertPattern('/Simple test front controller/'); + $this->assertPattern('/raw get data.*?\[\].*?get data/si'); + } + + function testJumpBackADirectoryLevel() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickLink('Down one'); + $this->assertPattern('|Index of .*?/test|'); + } + + function testSubmitToNamedPage() { + $this->get($this->samples() . 'front_controller_style/'); + $this->assertText('Simple test front controller'); + $this->clickSubmit('Index'); + $this->assertResponse(200); + $this->assertText('[action=Index]'); + } + + function testSubmitToSameDirectory() { + $this->get($this->samples() . 'front_controller_style/index.php'); + $this->clickSubmit('Same directory'); + $this->assertResponse(200); + $this->assertText('[action=Same+directory]'); + } + + function testSubmitToEmptyAction() { + $this->get($this->samples() . 'front_controller_style/index.php'); + $this->clickSubmit('Empty action'); + $this->assertResponse(200); + $this->assertText('[action=Empty+action]'); + } + + function testSubmitToNoAction() { + $this->get($this->samples() . 'front_controller_style/index.php'); + $this->clickSubmit('No action'); + $this->assertResponse(200); + $this->assertText('[action=No+action]'); + } + + function testSubmitBackADirectoryLevel() { + $this->get($this->samples() . 'front_controller_style/'); + $this->clickSubmit('Down one'); + $this->assertPattern('|Index of .*?/test|'); + } + + function testSubmitToNamedPageWithMixedPostAndGet() { + $this->get($this->samples() . 'front_controller_style/?a=A'); + $this->assertText('Simple test front controller'); + $this->clickSubmit('Index post'); + $this->assertText('action=[Index post]'); + $this->assertNoText('[a=A]'); + } + + function testSubmitToSameDirectoryMixedPostAndGet() { + $this->get($this->samples() . 'front_controller_style/index.php?a=A'); + $this->clickSubmit('Same directory post'); + $this->assertText('action=[Same directory post]'); + $this->assertNoText('[a=A]'); + } + + function testSubmitToEmptyActionMixedPostAndGet() { + $this->get($this->samples() . 'front_controller_style/index.php?a=A'); + $this->clickSubmit('Empty action post'); + $this->assertText('action=[Empty action post]'); + $this->assertText('[a=A]'); + } + + function testSubmitToNoActionMixedPostAndGet() { + $this->get($this->samples() . 'front_controller_style/index.php?a=A'); + $this->clickSubmit('No action post'); + $this->assertText('action=[No action post]'); + $this->assertText('[a=A]'); + } +} + +class TestOfLiveHeaders extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testConfirmingHeaderExistence() { + $this->get('http://www.lastcraft.com/'); + $this->assertHeader('content-type'); + $this->assertHeader('content-type', 'text/html'); + $this->assertHeader('content-type', new PatternExpectation('/HTML/i')); + $this->assertNoHeader('WWW-Authenticate'); + } +} + +class TestOfLiveRedirects extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testNoRedirects() { + $this->setMaximumRedirects(0); + $this->get($this->samples() . 'redirect.php'); + $this->assertTitle('Redirection test'); + } + + function testRedirects() { + $this->setMaximumRedirects(1); + $this->get($this->samples() . 'redirect.php'); + $this->assertTitle('Simple test target file'); + } + + function testRedirectLosesGetData() { + $this->get($this->samples() . 'redirect.php', array('a' => 'aaa')); + $this->assertNoText('a=[aaa]'); + } + + function testRedirectKeepsExtraRequestDataOfItsOwn() { + $this->get($this->samples() . 'redirect.php'); + $this->assertText('r=[rrr]'); + } + + function testRedirectLosesPostData() { + $this->post($this->samples() . 'redirect.php', array('a' => 'aaa')); + $this->assertTitle('Simple test target file'); + $this->assertNoText('a=[aaa]'); + } + + function testRedirectWithBaseUrlChange() { + $this->get($this->samples() . 'base_change_redirect.php'); + $this->assertTitle('Simple test target file in folder'); + $this->get($this->samples() . 'path/base_change_redirect.php'); + $this->assertTitle('Simple test target file'); + } + + function testRedirectWithDoubleBaseUrlChange() { + $this->get($this->samples() . 'double_base_change_redirect.php'); + $this->assertTitle('Simple test target file'); + } +} + +class TestOfLiveCookies extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function here() { + return new SimpleUrl($this->samples()); + } + + function thisHost() { + $here = $this->here(); + return $here->getHost(); + } + + function thisPath() { + $here = $this->here(); + return $here->getPath(); + } + + function testCookieSettingAndAssertions() { + $this->setCookie('a', 'Test cookie a'); + $this->setCookie('b', 'Test cookie b', $this->thisHost()); + $this->setCookie('c', 'Test cookie c', $this->thisHost(), $this->thisPath()); + $this->get($this->samples() . 'network_confirm.php'); + $this->assertText('Test cookie a'); + $this->assertText('Test cookie b'); + $this->assertText('Test cookie c'); + $this->assertCookie('a'); + $this->assertCookie('b', 'Test cookie b'); + $this->assertTrue($this->getCookie('c') == 'Test cookie c'); + } + + function testNoCookieSetWhenCookiesDisabled() { + $this->setCookie('a', 'Test cookie a'); + $this->ignoreCookies(); + $this->get($this->samples() . 'network_confirm.php'); + $this->assertNoText('Test cookie a'); + } + + function testCookieReading() { + $this->get($this->samples() . 'set_cookies.php'); + $this->assertCookie('session_cookie', 'A'); + $this->assertCookie('short_cookie', 'B'); + $this->assertCookie('day_cookie', 'C'); + } + + function testNoCookie() { + $this->assertNoCookie('aRandomCookie'); + } + + function testNoCookieReadingWhenCookiesDisabled() { + $this->ignoreCookies(); + $this->get($this->samples() . 'set_cookies.php'); + $this->assertNoCookie('session_cookie'); + $this->assertNoCookie('short_cookie'); + $this->assertNoCookie('day_cookie'); + } + + function testCookiePatternAssertions() { + $this->get($this->samples() . 'set_cookies.php'); + $this->assertCookie('session_cookie', new PatternExpectation('/a/i')); + } + + function testTemporaryCookieExpiry() { + $this->get($this->samples() . 'set_cookies.php'); + $this->restart(); + $this->assertNoCookie('session_cookie'); + $this->assertCookie('day_cookie', 'C'); + } + + function testTimedCookieExpiryWith100SecondMargin() { + $this->get($this->samples() . 'set_cookies.php'); + $this->ageCookies(3600); + $this->restart(time() + 100); + $this->assertNoCookie('session_cookie'); + $this->assertNoCookie('hour_cookie'); + $this->assertCookie('day_cookie', 'C'); + } + + function testNoClockOverDriftBy100Seconds() { + $this->get($this->samples() . 'set_cookies.php'); + $this->restart(time() + 200); + $this->assertNoCookie( + 'short_cookie', + '%s -> Please check your computer clock setting if you are not using NTP'); + } + + function testNoClockUnderDriftBy100Seconds() { + $this->get($this->samples() . 'set_cookies.php'); + $this->restart(time() + 0); + $this->assertCookie( + 'short_cookie', + 'B', + '%s -> Please check your computer clock setting if you are not using NTP'); + } + + function testCookiePath() { + $this->get($this->samples() . 'set_cookies.php'); + $this->assertNoCookie('path_cookie', 'D'); + $this->get('./path/show_cookies.php'); + $this->assertPattern('/path_cookie/'); + $this->assertCookie('path_cookie', 'D'); + } +} + +class LiveTestOfForms extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testSimpleSubmit() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('go=[Go!]'); + } + + function testDefaultFormValues() { + $this->get($this->samples() . 'form.html'); + $this->assertFieldByName('a', ''); + $this->assertFieldByName('b', 'Default text'); + $this->assertFieldByName('c', ''); + $this->assertFieldByName('d', 'd1'); + $this->assertFieldByName('e', false); + $this->assertFieldByName('f', 'on'); + $this->assertFieldByName('g', 'g3'); + $this->assertFieldByName('h', 2); + $this->assertFieldByName('go', 'Go!'); + $this->assertClickable('Go!'); + $this->assertSubmit('Go!'); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('go=[Go!]'); + $this->assertText('a=[]'); + $this->assertText('b=[Default text]'); + $this->assertText('c=[]'); + $this->assertText('d=[d1]'); + $this->assertNoText('e=['); + $this->assertText('f=[on]'); + $this->assertText('g=[g3]'); + } + + function testFormSubmissionByButtonLabel() { + $this->get($this->samples() . 'form.html'); + $this->setFieldByName('a', 'aaa'); + $this->setFieldByName('b', 'bbb'); + $this->setFieldByName('c', 'ccc'); + $this->setFieldByName('d', 'D2'); + $this->setFieldByName('e', 'on'); + $this->setFieldByName('f', false); + $this->setFieldByName('g', 'g2'); + $this->setFieldByName('h', 1); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[aaa]'); + $this->assertText('b=[bbb]'); + $this->assertText('c=[ccc]'); + $this->assertText('d=[d2]'); + $this->assertText('e=[on]'); + $this->assertNoText('f=['); + $this->assertText('g=[g2]'); + } + + function testAdditionalFormValues() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmit('Go!', array('add' => 'A'))); + $this->assertText('go=[Go!]'); + $this->assertText('add=[A]'); + } + + function testFormSubmissionByName() { + $this->get($this->samples() . 'form.html'); + $this->setFieldByName('a', 'A'); + $this->assertTrue($this->clickSubmitByName('go')); + $this->assertText('a=[A]'); + } + + function testFormSubmissionByNameAndAdditionalParameters() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmitByName('go', array('add' => 'A'))); + $this->assertText('go=[Go!]'); + $this->assertText('add=[A]'); + } + + function testFormSubmissionBySubmitButtonLabeledSubmit() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmitByName('test')); + $this->assertText('test=[Submit]'); + } + + function testFormSubmissionWithIds() { + $this->get($this->samples() . 'form.html'); + $this->assertFieldById(1, ''); + $this->assertFieldById(2, 'Default text'); + $this->assertFieldById(3, ''); + $this->assertFieldById(4, 'd1'); + $this->assertFieldById(5, false); + $this->assertFieldById(6, 'on'); + $this->assertFieldById(8, 'g3'); + $this->assertFieldById(11, 2); + $this->setFieldById(1, 'aaa'); + $this->setFieldById(2, 'bbb'); + $this->setFieldById(3, 'ccc'); + $this->setFieldById(4, 'D2'); + $this->setFieldById(5, 'on'); + $this->setFieldById(6, false); + $this->setFieldById(8, 'g2'); + $this->setFieldById(11, 'H1'); + $this->assertTrue($this->clickSubmitById(99)); + $this->assertText('a=[aaa]'); + $this->assertText('b=[bbb]'); + $this->assertText('c=[ccc]'); + $this->assertText('d=[d2]'); + $this->assertText('e=[on]'); + $this->assertNoText('f=['); + $this->assertText('g=[g2]'); + $this->assertText('h=[1]'); + $this->assertText('go=[Go!]'); + } + + function testFormSubmissionWithIdsAndAdditionnalData() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmitById(99, array('additionnal' => "data"))); + $this->assertText('additionnal=[data]'); + } + + function testFormSubmissionWithLabels() { + $this->get($this->samples() . 'form.html'); + $this->assertField('Text A', ''); + $this->assertField('Text B', 'Default text'); + $this->assertField('Text area C', ''); + $this->assertField('Selection D', 'd1'); + $this->assertField('Checkbox E', false); + $this->assertField('Checkbox F', 'on'); + $this->assertField('3', 'g3'); + $this->assertField('Selection H', 2); + $this->setField('Text A', 'aaa'); + $this->setField('Text B', 'bbb'); + $this->setField('Text area C', 'ccc'); + $this->setField('Selection D', 'D2'); + $this->setField('Checkbox E', 'on'); + $this->setField('Checkbox F', false); + $this->setField('2', 'g2'); + $this->setField('Selection H', 'H1'); + $this->clickSubmit('Go!'); + $this->assertText('a=[aaa]'); + $this->assertText('b=[bbb]'); + $this->assertText('c=[ccc]'); + $this->assertText('d=[d2]'); + $this->assertText('e=[on]'); + $this->assertNoText('f=['); + $this->assertText('g=[g2]'); + $this->assertText('h=[1]'); + $this->assertText('go=[Go!]'); + } + + function testSettingCheckboxWithBooleanTrueSetsUnderlyingValue() { + $this->get($this->samples() . 'form.html'); + $this->setField('Checkbox E', true); + $this->assertField('Checkbox E', 'on'); + $this->clickSubmit('Go!'); + $this->assertText('e=[on]'); + } + + function testFormSubmissionWithMixedPostAndGet() { + $this->get($this->samples() . 'form_with_mixed_post_and_get.html'); + $this->setField('Text A', 'Hello'); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[Hello]'); + $this->assertText('x=[X]'); + $this->assertText('y=[Y]'); + } + + function testFormSubmissionWithMixedPostAndEncodedGet() { + $this->get($this->samples() . 'form_with_mixed_post_and_get.html'); + $this->setField('Text B', 'Hello'); + $this->assertTrue($this->clickSubmit('Go encoded!')); + $this->assertText('b=[Hello]'); + $this->assertText('x=[X]'); + $this->assertText('y=[Y]'); + } + + function testFormSubmissionWithoutAction() { + $this->get($this->samples() . 'form_without_action.php?test=test'); + $this->assertText('_GET : [test]'); + $this->assertTrue($this->clickSubmit('Submit Post With Empty Action')); + $this->assertText('_GET : [test]'); + $this->assertText('_POST : [test]'); + } + + function testImageSubmissionByLabel() { + $this->get($this->samples() . 'form.html'); + $this->assertImage('Image go!'); + $this->assertTrue($this->clickImage('Image go!', 10, 12)); + $this->assertText('go_x=[10]'); + $this->assertText('go_y=[12]'); + } + + function testImageSubmissionByLabelWithAdditionalParameters() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickImage('Image go!', 10, 12, array('add' => 'A'))); + $this->assertText('add=[A]'); + } + + function testImageSubmissionByName() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickImageByName('go', 10, 12)); + $this->assertText('go_x=[10]'); + $this->assertText('go_y=[12]'); + } + + function testImageSubmissionById() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickImageById(97, 10, 12)); + $this->assertText('go_x=[10]'); + $this->assertText('go_y=[12]'); + } + + function testButtonSubmissionByLabel() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->clickSubmit('Button go!', 10, 12)); + $this->assertPattern('/go=\[ButtonGo\]/s'); + } + + function testNamelessSubmitSendsNoValue() { + $this->get($this->samples() . 'form_with_unnamed_submit.html'); + $this->click('Go!'); + $this->assertNoText('Go!'); + $this->assertNoText('submit'); + } + + function testNamelessImageSendsXAndYValues() { + $this->get($this->samples() . 'form_with_unnamed_submit.html'); + $this->clickImage('Image go!', 4, 5); + $this->assertNoText('ImageGo'); + $this->assertText('x=[4]'); + $this->assertText('y=[5]'); + } + + function testNamelessButtonSendsNoValue() { + $this->get($this->samples() . 'form_with_unnamed_submit.html'); + $this->click('Button Go!'); + $this->assertNoText('ButtonGo'); + } + + function testSelfSubmit() { + $this->get($this->samples() . 'self_form.php'); + $this->assertNoText('[Submitted]'); + $this->assertNoText('[Wrong form]'); + $this->assertTrue($this->clickSubmit()); + $this->assertText('[Submitted]'); + $this->assertNoText('[Wrong form]'); + $this->assertTitle('Test of form self submission'); + } + + function testSelfSubmitWithParameters() { + $this->get($this->samples() . 'self_form.php'); + $this->setFieldByName('visible', 'Resent'); + $this->assertTrue($this->clickSubmit()); + $this->assertText('[Resent]'); + } + + function testSettingOfBlankOption() { + $this->get($this->samples() . 'form.html'); + $this->assertTrue($this->setFieldByName('d', '')); + $this->clickSubmit('Go!'); + $this->assertText('d=[]'); + } + + function testAssertingFieldValueWithPattern() { + $this->get($this->samples() . 'form.html'); + $this->setField('c', 'A very long string'); + $this->assertField('c', new PatternExpectation('/very long/')); + } + + function testSendingMultipartFormDataEncodedForm() { + $this->get($this->samples() . 'form_data_encoded_form.html'); + $this->assertField('Text A', ''); + $this->assertField('Text B', 'Default text'); + $this->assertField('Text area C', ''); + $this->assertField('Selection D', 'd1'); + $this->assertField('Checkbox E', false); + $this->assertField('Checkbox F', 'on'); + $this->assertField('3', 'g3'); + $this->assertField('Selection H', 2); + $this->setField('Text A', 'aaa'); + $this->setField('Text B', 'bbb'); + $this->setField('Text area C', 'ccc'); + $this->setField('Selection D', 'D2'); + $this->setField('Checkbox E', 'on'); + $this->setField('Checkbox F', false); + $this->setField('2', 'g2'); + $this->setField('Selection H', 'H1'); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[aaa]'); + $this->assertText('b=[bbb]'); + $this->assertText('c=[ccc]'); + $this->assertText('d=[d2]'); + $this->assertText('e=[on]'); + $this->assertNoText('f=['); + $this->assertText('g=[g2]'); + $this->assertText('h=[1]'); + $this->assertText('go=[Go!]'); + } + + function testSettingVariousBlanksInFields() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->assertField('Text A', ''); + $this->setField('Text A', '0'); + $this->assertField('Text A', '0'); + $this->assertField('Text area B', ''); + $this->setField('Text area B', '0'); + $this->assertField('Text area B', '0'); + $this->assertField('Selection D', ''); + $this->setField('Selection D', 'D2'); + $this->assertField('Selection D', 'D2'); + $this->setField('Selection D', 'D3'); + $this->assertField('Selection D', '0'); + $this->setField('Selection D', 'D4'); + $this->assertField('Selection D', '?'); + $this->assertField('Checkbox E', ''); + $this->assertField('Checkbox F', 'on'); + $this->assertField('Checkbox G', '0'); + $this->assertField('Checkbox H', '?'); + $this->assertFieldByName('i', 'on'); + $this->setFieldByName('i', ''); + $this->assertFieldByName('i', ''); + $this->setFieldByName('i', '0'); + $this->assertFieldByName('i', '0'); + $this->setFieldByName('i', '?'); + $this->assertFieldByName('i', '?'); + } + + function testDefaultValueOfTextareaHasNewlinesAndWhitespacePreserved() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->assertField('Text area C', ' '); + } + + function chars($t) { + for ($i = 0; $i < strlen($t); $i++) { + print "[$t[$i]]"; + } + } + + function testSubmissionOfBlankFields() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->setField('Text A', ''); + $this->setField('Text area B', ''); + $this->setFieldByName('i', ''); + $this->click('Go!'); + $this->assertText('a=[]'); + $this->assertText('b=[]'); + $this->assertText('d=[]'); + $this->assertText('e=[]'); + $this->assertText('i=[]'); + } + + function testDefaultValueOfTextareaHasNewlinesAndWhitespacePreservedOnSubmission() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->click('Go!'); + $this->assertPattern('/c=\[ \]/'); + } + + function testSubmissionOfEmptyValues() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->setField('Selection D', 'D2'); + $this->click('Go!'); + $this->assertText('a=[]'); + $this->assertText('b=[]'); + $this->assertText('d=[D2]'); + $this->assertText('f=[on]'); + $this->assertText('i=[on]'); + } + + function testSubmissionOfZeroes() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->setField('Text A', '0'); + $this->setField('Text area B', '0'); + $this->setField('Selection D', 'D3'); + $this->setFieldByName('i', '0'); + $this->click('Go!'); + $this->assertText('a=[0]'); + $this->assertText('b=[0]'); + $this->assertText('d=[0]'); + $this->assertText('g=[0]'); + $this->assertText('i=[0]'); + } + + function testSubmissionOfQuestionMarks() { + $this->get($this->samples() . 'form_with_false_defaults.html'); + $this->setField('Text A', '?'); + $this->setField('Text area B', '?'); + $this->setField('Selection D', 'D4'); + $this->setFieldByName('i', '?'); + $this->click('Go!'); + $this->assertText('a=[?]'); + $this->assertText('b=[?]'); + $this->assertText('d=[?]'); + $this->assertText('h=[?]'); + $this->assertText('i=[?]'); + } + + function testSubmissionOfHtmlEncodedValues() { + $this->get($this->samples() . 'form_with_tricky_defaults.html'); + $this->assertField('Text A', '&\'"<>'); + $this->assertField('Text B', '"'); + $this->assertField('Text area C', '&\'"<>'); + $this->assertField('Selection D', "'"); + $this->assertField('Checkbox E', '&\'"<>'); + $this->assertField('Checkbox F', false); + $this->assertFieldByname('i', "'"); + $this->click('Go!'); + $this->assertText('a=[&\'"<>, "]'); + $this->assertText('c=[&\'"<>]'); + $this->assertText("d=[']"); + $this->assertText('e=[&\'"<>]'); + $this->assertText("i=[']"); + } + + function testFormActionRespectsBaseTag() { + $this->get($this->samples() . 'base_tag/form.html'); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('go=[Go!]'); + $this->assertText('a=[]'); + } +} + +class TestOfLiveMultiValueWidgets extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testDefaultFormValueSubmission() { + $this->get($this->samples() . 'multiple_widget_form.html'); + $this->assertFieldByName('a', array('a2', 'a3')); + $this->assertFieldByName('b', array('b2', 'b3')); + $this->assertFieldByName('c[]', array('c2', 'c3')); + $this->assertFieldByName('d', array('2', '3')); + $this->assertFieldByName('e', array('2', '3')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[a2, a3]'); + $this->assertText('b=[b2, b3]'); + $this->assertText('c=[c2, c3]'); + $this->assertText('d=[2, 3]'); + $this->assertText('e=[2, 3]'); + } + + function testSubmittingMultipleValues() { + $this->get($this->samples() . 'multiple_widget_form.html'); + $this->setFieldByName('a', array('a1', 'a4')); + $this->assertFieldByName('a', array('a1', 'a4')); + $this->assertFieldByName('a', array('a4', 'a1')); + $this->setFieldByName('b', array('b1', 'b4')); + $this->assertFieldByName('b', array('b1', 'b4')); + $this->setFieldByName('c[]', array('c1', 'c4')); + $this->assertField('c[]', array('c1', 'c4')); + $this->setFieldByName('d', array('1', '4')); + $this->assertField('d', array('1', '4')); + $this->setFieldByName('e', array('e1', 'e4')); + $this->assertField('e', array('1', '4')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[a1, a4]'); + $this->assertText('b=[b1, b4]'); + $this->assertText('c=[c1, c4]'); + $this->assertText('d=[1, 4]'); + $this->assertText('e=[1, 4]'); + } + + function testSettingByOptionValue() { + $this->get($this->samples() . 'multiple_widget_form.html'); + $this->setFieldByName('d', array('1', '4')); + $this->assertField('d', array('1', '4')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('d=[1, 4]'); + } + + function testSubmittingMultipleValuesByLabel() { + $this->get($this->samples() . 'multiple_widget_form.html'); + $this->setField('Multiple selection A', array('a1', 'a4')); + $this->assertField('Multiple selection A', array('a1', 'a4')); + $this->assertField('Multiple selection A', array('a4', 'a1')); + $this->setField('multiple selection C', array('c1', 'c4')); + $this->assertField('multiple selection C', array('c1', 'c4')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[a1, a4]'); + $this->assertText('c=[c1, c4]'); + } + + function testSavantStyleHiddenFieldDefaults() { + $this->get($this->samples() . 'savant_style_form.html'); + $this->assertFieldByName('a', array('a0')); + $this->assertFieldByName('b', array('b0')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[a0]'); + $this->assertText('b=[b0]'); + } + + function testSavantStyleHiddenDefaultsAreOverridden() { + $this->get($this->samples() . 'savant_style_form.html'); + $this->assertTrue($this->setFieldByName('a', array('a1'))); + $this->assertTrue($this->setFieldByName('b', 'b1')); + $this->assertTrue($this->clickSubmit('Go!')); + $this->assertText('a=[a1]'); + $this->assertText('b=[b1]'); + } + + function testSavantStyleFormSettingById() { + $this->get($this->samples() . 'savant_style_form.html'); + $this->assertFieldById(1, array('a0')); + $this->assertFieldById(4, array('b0')); + $this->assertTrue($this->setFieldById(2, 'a1')); + $this->assertTrue($this->setFieldById(5, 'b1')); + $this->assertTrue($this->clickSubmitById(99)); + $this->assertText('a=[a1]'); + $this->assertText('b=[b1]'); + } +} + +class TestOfFileUploads extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testSingleFileUpload() { + $this->get($this->samples() . 'upload_form.html'); + $this->assertTrue($this->setField('Content:', + dirname(__FILE__) . '/support/upload_sample.txt')); + $this->assertField('Content:', dirname(__FILE__) . '/support/upload_sample.txt'); + $this->click('Go!'); + $this->assertText('Sample for testing file upload'); + } + + function testMultipleFileUpload() { + $this->get($this->samples() . 'upload_form.html'); + $this->assertTrue($this->setField('Content:', + dirname(__FILE__) . '/support/upload_sample.txt')); + $this->assertTrue($this->setField('Supplemental:', + dirname(__FILE__) . '/support/supplementary_upload_sample.txt')); + $this->assertField('Supplemental:', + dirname(__FILE__) . '/support/supplementary_upload_sample.txt'); + $this->click('Go!'); + $this->assertText('Sample for testing file upload'); + $this->assertText('Some more text content'); + } + + function testBinaryFileUpload() { + $this->get($this->samples() . 'upload_form.html'); + $this->assertTrue($this->setField('Content:', + dirname(__FILE__) . '/support/latin1_sample')); + $this->click('Go!'); + $this->assertText( + implode('', file(dirname(__FILE__) . '/support/latin1_sample'))); + } +} + +class TestOfLiveHistoryNavigation extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testRetry() { + $this->get($this->samples() . 'cookie_based_counter.php'); + $this->assertPattern('/count: 1/i'); + $this->retry(); + $this->assertPattern('/count: 2/i'); + $this->retry(); + $this->assertPattern('/count: 3/i'); + } + + function testOfBackButton() { + $this->get($this->samples() . '1.html'); + $this->clickLink('2'); + $this->assertTitle('2'); + $this->assertTrue($this->back()); + $this->assertTitle('1'); + $this->assertTrue($this->forward()); + $this->assertTitle('2'); + $this->assertFalse($this->forward()); + } + + function testGetRetryResubmitsData() { + $this->assertTrue($this->get( + $this->samples() . 'network_confirm.php?a=aaa')); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[aaa]'); + $this->retry(); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[aaa]'); + } + + function testGetRetryResubmitsExtraData() { + $this->assertTrue($this->get( + $this->samples() . 'network_confirm.php', + array('a' => 'aaa'))); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[aaa]'); + $this->retry(); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[aaa]'); + } + + function testPostRetryResubmitsData() { + $this->assertTrue($this->post( + $this->samples() . 'network_confirm.php', + array('a' => 'aaa'))); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aaa]'); + $this->retry(); + $this->assertPattern('/Request method.*?
                      POST<\/dd>/'); + $this->assertText('a=[aaa]'); + } + + function testGetRetryResubmitsRepeatedData() { + $this->assertTrue($this->get( + $this->samples() . 'network_confirm.php?a=1&a=2')); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[1, 2]'); + $this->retry(); + $this->assertPattern('/Request method.*?
                      GET<\/dd>/'); + $this->assertText('a=[1, 2]'); + } +} + +class TestOfLiveAuthentication extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testChallengeFromProtectedPage() { + $this->get($this->samples() . 'protected/'); + $this->assertResponse(401); + $this->assertAuthentication('Basic'); + $this->assertRealm('SimpleTest basic authentication'); + $this->assertRealm(new PatternExpectation('/simpletest/i')); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->retry(); + $this->assertResponse(200); + } + + function testTrailingSlashImpliedWithinRealm() { + $this->get($this->samples() . 'protected/'); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->get($this->samples() . 'protected'); + $this->assertResponse(200); + } + + function testTrailingSlashImpliedSettingRealm() { + $this->get($this->samples() . 'protected'); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->get($this->samples() . 'protected/'); + $this->assertResponse(200); + } + + function testEncodedAuthenticationFetchesPage() { + $this->get('http://test:secret@www.lastcraft.com/test/protected/'); + $this->assertResponse(200); + } + + function testEncodedAuthenticationFetchesPageAfterTrailingSlashRedirect() { + $this->get('http://test:secret@www.lastcraft.com/test/protected'); + $this->assertResponse(200); + } + + function testRealmExtendsToWholeDirectory() { + $this->get($this->samples() . 'protected/1.html'); + $this->authenticate('test', 'secret'); + $this->clickLink('2'); + $this->assertResponse(200); + $this->clickLink('3'); + $this->assertResponse(200); + } + + function testRedirectKeepsAuthentication() { + $this->get($this->samples() . 'protected/local_redirect.php'); + $this->authenticate('test', 'secret'); + $this->assertTitle('Simple test target file'); + } + + function testRedirectKeepsEncodedAuthentication() { + $this->get('http://test:secret@www.lastcraft.com/test/protected/local_redirect.php'); + $this->assertResponse(200); + $this->assertTitle('Simple test target file'); + } + + function testSessionRestartLosesAuthentication() { + $this->get($this->samples() . 'protected/'); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->restart(); + $this->get($this->samples() . 'protected/'); + $this->assertResponse(401); + } +} + +class TestOfLoadingFrames extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testNoFramesContentWhenFramesDisabled() { + $this->ignoreFrames(); + $this->get($this->samples() . 'one_page_frameset.html'); + $this->assertTitle('Frameset for testing of SimpleTest'); + $this->assertText('This content is for no frames only'); + } + + function testPatternMatchCanReadTheOnlyFrame() { + $this->get($this->samples() . 'one_page_frameset.html'); + $this->assertText('A target for the SimpleTest test suite'); + $this->assertNoText('This content is for no frames only'); + } + + function testMessyFramesetResponsesByName() { + $this->assertTrue($this->get( + $this->samples() . 'messy_frameset.html')); + $this->assertTitle('Frameset for testing of SimpleTest'); + + $this->assertTrue($this->setFrameFocus('Front controller')); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + + $this->assertTrue($this->setFrameFocus('One')); + $this->assertResponse(200); + $this->assertLink('2'); + + $this->assertTrue($this->setFrameFocus('Frame links')); + $this->assertResponse(200); + $this->assertLink('Set one to 2'); + + $this->assertTrue($this->setFrameFocus('Counter')); + $this->assertResponse(200); + $this->assertText('Count: 1'); + + $this->assertTrue($this->setFrameFocus('Redirected')); + $this->assertResponse(200); + $this->assertText('r=rrr'); + + $this->assertTrue($this->setFrameFocus('Protected')); + $this->assertResponse(401); + + $this->assertTrue($this->setFrameFocus('Protected redirect')); + $this->assertResponse(401); + + $this->assertTrue($this->setFrameFocusByIndex(1)); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + + $this->assertTrue($this->setFrameFocusByIndex(2)); + $this->assertResponse(200); + $this->assertLink('2'); + + $this->assertTrue($this->setFrameFocusByIndex(3)); + $this->assertResponse(200); + $this->assertLink('Set one to 2'); + + $this->assertTrue($this->setFrameFocusByIndex(4)); + $this->assertResponse(200); + $this->assertText('Count: 1'); + + $this->assertTrue($this->setFrameFocusByIndex(5)); + $this->assertResponse(200); + $this->assertText('r=rrr'); + + $this->assertTrue($this->setFrameFocusByIndex(6)); + $this->assertResponse(401); + + $this->assertTrue($this->setFrameFocusByIndex(7)); + } + + function testReloadingFramesetPage() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->assertText('Count: 1'); + $this->retry(); + $this->assertText('Count: 2'); + $this->retry(); + $this->assertText('Count: 3'); + } + + function testReloadingSingleFrameWithCookieCounter() { + $this->get($this->samples() . 'counting_frameset.html'); + $this->setFrameFocus('a'); + $this->assertText('Count: 1'); + $this->setFrameFocus('b'); + $this->assertText('Count: 2'); + + $this->setFrameFocus('a'); + $this->retry(); + $this->assertText('Count: 3'); + $this->retry(); + $this->assertText('Count: 4'); + $this->setFrameFocus('b'); + $this->assertText('Count: 2'); + } + + function testReloadingFrameWhenUnfocusedReloadsWholeFrameset() { + $this->get($this->samples() . 'counting_frameset.html'); + $this->setFrameFocus('a'); + $this->assertText('Count: 1'); + $this->setFrameFocus('b'); + $this->assertText('Count: 2'); + + $this->clearFrameFocus('a'); + $this->retry(); + + $this->assertTitle('Frameset for testing of SimpleTest'); + $this->setFrameFocus('a'); + $this->assertText('Count: 3'); + $this->setFrameFocus('b'); + $this->assertText('Count: 4'); + } + + function testClickingNormalLinkReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('2'); + $this->assertLink('3'); + $this->assertText('Simple test front controller'); + } + + function testJumpToNamedPageReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->assertPattern('/Simple test front controller/'); + $this->clickLink('Index'); + $this->assertResponse(200); + $this->assertText('[action=index]'); + $this->assertText('Count: 1'); + } + + function testJumpToUnnamedPageReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('No page'); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + $this->assertText('[action=no_page]'); + $this->assertText('Count: 1'); + } + + function testJumpToUnnamedPageWithBareParameterReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('Bare action'); + $this->assertResponse(200); + $this->assertText('Simple test front controller'); + $this->assertText('[action=]'); + $this->assertText('Count: 1'); + } + + function testJumpToUnnamedPageWithEmptyQueryReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('Empty query'); + $this->assertResponse(200); + $this->assertPattern('/Simple test front controller/'); + $this->assertPattern('/raw get data.*?\[\].*?get data/si'); + $this->assertPattern('/Count: 1/'); + } + + function testJumpToUnnamedPageWithEmptyLinkReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('Empty link'); + $this->assertResponse(200); + $this->assertPattern('/Simple test front controller/'); + $this->assertPattern('/raw get data.*?\[\].*?get data/si'); + $this->assertPattern('/Count: 1/'); + } + + function testJumpBackADirectoryLevelReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('Down one'); + $this->assertPattern('/index of .*\/test/i'); + $this->assertPattern('/Count: 1/'); + } + + function testSubmitToNamedPageReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->assertPattern('/Simple test front controller/'); + $this->clickSubmit('Index'); + $this->assertResponse(200); + $this->assertText('[action=Index]'); + $this->assertText('Count: 1'); + } + + function testSubmitToSameDirectoryReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickSubmit('Same directory'); + $this->assertResponse(200); + $this->assertText('[action=Same+directory]'); + $this->assertText('Count: 1'); + } + + function testSubmitToEmptyActionReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickSubmit('Empty action'); + $this->assertResponse(200); + $this->assertText('[action=Empty+action]'); + $this->assertText('Count: 1'); + } + + function testSubmitToNoActionReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickSubmit('No action'); + $this->assertResponse(200); + $this->assertText('[action=No+action]'); + $this->assertText('Count: 1'); + } + + function testSubmitBackADirectoryLevelReplacesJustThatFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickSubmit('Down one'); + $this->assertPattern('/index of .*\/test/i'); + $this->assertPattern('/Count: 1/'); + } + + function testTopLinkExitsFrameset() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->clickLink('Exit the frameset'); + $this->assertTitle('Simple test target file'); + } + + function testLinkInOnePageCanLoadAnother() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->assertNoLink('3'); + $this->clickLink('Set one to 2'); + $this->assertLink('3'); + $this->assertNoLink('2'); + $this->assertTitle('Frameset for testing of SimpleTest'); + } + + function testFrameWithRelativeLinksRespectsBaseTagForThatPage() { + $this->get($this->samples() . 'base_tag/frameset.html'); + $this->click('Back to test pages'); + $this->assertTitle('Frameset for testing of SimpleTest'); + $this->assertText('A target for the SimpleTest test suite'); + } + + function testRelativeLinkInFrameIsNotAffectedByFramesetBaseTag() { + $this->get($this->samples() . 'base_tag/frameset_with_base_tag.html'); + $this->assertText('This is page 1'); + $this->click('To page 2'); + $this->assertTitle('Frameset for testing of SimpleTest'); + $this->assertText('This is page 2'); + } +} + +class TestOfFrameAuthentication extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testUnauthenticatedFrameSendsChallenge() { + $this->get($this->samples() . 'protected/'); + $this->setFrameFocus('Protected'); + $this->assertAuthentication('Basic'); + $this->assertRealm('SimpleTest basic authentication'); + $this->assertResponse(401); + } + + function testCanReadFrameFromAlreadyAuthenticatedRealm() { + $this->get($this->samples() . 'protected/'); + $this->authenticate('test', 'secret'); + $this->get($this->samples() . 'messy_frameset.html'); + $this->setFrameFocus('Protected'); + $this->assertResponse(200); + $this->assertText('A target for the SimpleTest test suite'); + } + + function testCanAuthenticateFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->setFrameFocus('Protected'); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->assertText('A target for the SimpleTest test suite'); + $this->clearFrameFocus(); + $this->assertText('Count: 1'); + } + + function testCanAuthenticateRedirectedFrame() { + $this->get($this->samples() . 'messy_frameset.html'); + $this->setFrameFocus('Protected redirect'); + $this->assertResponse(401); + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->assertText('A target for the SimpleTest test suite'); + $this->clearFrameFocus(); + $this->assertText('Count: 1'); + } +} + +class TestOfNestedFrames extends SimpleTestAcceptanceTest { + function setUp() { + $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); + } + + function testCanNavigateToSpecificContent() { + $this->get($this->samples() . 'nested_frameset.html'); + $this->assertTitle('Nested frameset for testing of SimpleTest'); + + $this->assertPattern('/This is frame A/'); + $this->assertPattern('/This is frame B/'); + $this->assertPattern('/Simple test front controller/'); + $this->assertLink('2'); + $this->assertLink('Set one to 2'); + $this->assertPattern('/Count: 1/'); + $this->assertPattern('/r=rrr/'); + + $this->setFrameFocus('pair'); + $this->assertPattern('/This is frame A/'); + $this->assertPattern('/This is frame B/'); + $this->assertNoPattern('/Simple test front controller/'); + $this->assertNoLink('2'); + + $this->setFrameFocus('aaa'); + $this->assertPattern('/This is frame A/'); + $this->assertNoPattern('/This is frame B/'); + + $this->clearFrameFocus(); + $this->assertResponse(200); + $this->setFrameFocus('messy'); + $this->assertResponse(200); + $this->setFrameFocus('Front controller'); + $this->assertResponse(200); + $this->assertPattern('/Simple test front controller/'); + $this->assertNoLink('2'); + } + + function testReloadingFramesetPage() { + $this->get($this->samples() . 'nested_frameset.html'); + $this->assertPattern('/Count: 1/'); + $this->retry(); + $this->assertPattern('/Count: 2/'); + $this->retry(); + $this->assertPattern('/Count: 3/'); + } + + function testRetryingNestedPageOnlyRetriesThatSet() { + $this->get($this->samples() . 'nested_frameset.html'); + $this->assertPattern('/Count: 1/'); + $this->setFrameFocus('messy'); + $this->retry(); + $this->assertPattern('/Count: 2/'); + $this->setFrameFocus('Counter'); + $this->retry(); + $this->assertPattern('/Count: 3/'); + + $this->clearFrameFocus(); + $this->setFrameFocus('messy'); + $this->setFrameFocus('Front controller'); + $this->retry(); + + $this->clearFrameFocus(); + $this->assertPattern('/Count: 3/'); + } + + function testAuthenticatingNestedPage() { + $this->get($this->samples() . 'nested_frameset.html'); + $this->setFrameFocus('messy'); + $this->setFrameFocus('Protected'); + $this->assertAuthentication('Basic'); + $this->assertRealm('SimpleTest basic authentication'); + $this->assertResponse(401); + + $this->authenticate('test', 'secret'); + $this->assertResponse(200); + $this->assertPattern('/A target for the SimpleTest test suite/'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/adapter_test.php b/webdata/stdlibs/simpletest/test/adapter_test.php new file mode 100644 index 0000000..c1a06a2 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/adapter_test.php @@ -0,0 +1,50 @@ +assertTrue(true, "PEAR true"); + $this->assertFalse(false, "PEAR false"); + } + + function testName() { + $this->assertTrue($this->getName() == get_class($this)); + } + + function testPass() { + $this->pass("PEAR pass"); + } + + function testNulls() { + $value = null; + $this->assertNull($value, "PEAR null"); + $value = 0; + $this->assertNotNull($value, "PEAR not null"); + } + + function testType() { + $this->assertType("Hello", "string", "PEAR type"); + } + + function testEquals() { + $this->assertEquals(12, 12, "PEAR identity"); + $this->setLooselyTyped(true); + $this->assertEquals("12", 12, "PEAR equality"); + } + + function testSame() { + $same = new SameTestClass(); + $this->assertSame($same, $same, "PEAR same"); + } + + function testRegExp() { + $this->assertRegExp('/hello/', "A big hello from me", "PEAR regex"); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/all_tests.php b/webdata/stdlibs/simpletest/test/all_tests.php new file mode 100644 index 0000000..99ce945 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/all_tests.php @@ -0,0 +1,13 @@ +TestSuite('All tests for SimpleTest ' . SimpleTest::getVersion()); + $this->addFile(dirname(__FILE__) . '/unit_tests.php'); + $this->addFile(dirname(__FILE__) . '/shell_test.php'); + $this->addFile(dirname(__FILE__) . '/live_test.php'); + $this->addFile(dirname(__FILE__) . '/acceptance_test.php'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/arguments_test.php b/webdata/stdlibs/simpletest/test/arguments_test.php new file mode 100644 index 0000000..0cca4e9 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/arguments_test.php @@ -0,0 +1,82 @@ +assertIdentical($arguments->a, false); + $this->assertIdentical($arguments->all(), array()); + } + + function testSingleArgumentNameRecordedAsTrue() { + $arguments = new SimpleArguments(array('me', '-a')); + $this->assertIdentical($arguments->a, true); + } + + function testSingleArgumentCanBeGivenAValue() { + $arguments = new SimpleArguments(array('me', '-a=AAA')); + $this->assertIdentical($arguments->a, 'AAA'); + } + + function testSingleArgumentCanBeGivenSpaceSeparatedValue() { + $arguments = new SimpleArguments(array('me', '-a', 'AAA')); + $this->assertIdentical($arguments->a, 'AAA'); + } + + function testWillBuildArrayFromRepeatedValue() { + $arguments = new SimpleArguments(array('me', '-a', 'A', '-a', 'AA')); + $this->assertIdentical($arguments->a, array('A', 'AA')); + } + + function testWillBuildArrayFromMultiplyRepeatedValues() { + $arguments = new SimpleArguments(array('me', '-a', 'A', '-a', 'AA', '-a', 'AAA')); + $this->assertIdentical($arguments->a, array('A', 'AA', 'AAA')); + } + + function testCanParseLongFormArguments() { + $arguments = new SimpleArguments(array('me', '--aa=AA', '--bb', 'BB')); + $this->assertIdentical($arguments->aa, 'AA'); + $this->assertIdentical($arguments->bb, 'BB'); + } + + function testGetsFullSetOfResultsAsHash() { + $arguments = new SimpleArguments(array('me', '-a', '-b=1', '-b', '2', '--aa=AA', '--bb', 'BB', '-c')); + $this->assertEqual($arguments->all(), + array('a' => true, 'b' => array('1', '2'), 'aa' => 'AA', 'bb' => 'BB', 'c' => true)); + } +} + +class TestOfHelpOutput extends UnitTestCase { + function testDisplaysGeneralHelpBanner() { + $help = new SimpleHelp('Cool program'); + $this->assertEqual($help->render(), "Cool program\n"); + } + + function testDisplaysOnlySingleLineEndings() { + $help = new SimpleHelp("Cool program\n"); + $this->assertEqual($help->render(), "Cool program\n"); + } + + function testDisplaysHelpOnShortFlag() { + $help = new SimpleHelp('Cool program'); + $help->explainFlag('a', 'Enables A'); + $this->assertEqual($help->render(), "Cool program\n-a Enables A\n"); + } + + function testHasAtleastFourSpacesAfterLongestFlag() { + $help = new SimpleHelp('Cool program'); + $help->explainFlag('a', 'Enables A'); + $help->explainFlag('long', 'Enables Long'); + $this->assertEqual($help->render(), + "Cool program\n-a Enables A\n--long Enables Long\n"); + } + + function testCanDisplaysMultipleFlagsForEachOption() { + $help = new SimpleHelp('Cool program'); + $help->explainFlag(array('a', 'aa'), 'Enables A'); + $this->assertEqual($help->render(), "Cool program\n-a Enables A\n --aa\n"); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/authentication_test.php b/webdata/stdlibs/simpletest/test/authentication_test.php new file mode 100644 index 0000000..081cccd --- /dev/null +++ b/webdata/stdlibs/simpletest/test/authentication_test.php @@ -0,0 +1,145 @@ +assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/hello.html'))); + } + + function testInsideWithLongerUrl() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/hello.html'))); + } + + function testBelowRootIsOutside() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/more/hello.html'))); + } + + function testOldNetscapeDefinitionIsOutside() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/')); + $this->assertFalse($realm->isWithin( + new SimpleUrl('http://www.here.com/pathmore/hello.html'))); + } + + function testInsideWithMissingTrailingSlash() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path'))); + } + + function testDifferentPageNameStillInside() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/hello.html')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/goodbye.html'))); + } + + function testNewUrlInSameDirectoryDoesNotChangeRealm() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/hello.html')); + $realm->stretch(new SimpleUrl('http://www.here.com/path/goodbye.html')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/index.html'))); + $this->assertFalse($realm->isWithin( + new SimpleUrl('http://www.here.com/index.html'))); + } + + function testNewUrlMakesRealmTheCommonPath() { + $realm = new SimpleRealm( + 'Basic', + new SimpleUrl('http://www.here.com/path/here/hello.html')); + $realm->stretch(new SimpleUrl('http://www.here.com/path/there/goodbye.html')); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/here/index.html'))); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/there/index.html'))); + $this->assertTrue($realm->isWithin( + new SimpleUrl('http://www.here.com/path/index.html'))); + $this->assertFalse($realm->isWithin( + new SimpleUrl('http://www.here.com/index.html'))); + $this->assertFalse($realm->isWithin( + new SimpleUrl('http://www.here.com/paths/index.html'))); + $this->assertFalse($realm->isWithin( + new SimpleUrl('http://www.here.com/pathindex.html'))); + } +} + +class TestOfAuthenticator extends UnitTestCase { + + function testNoRealms() { + $request = new MockSimpleHttpRequest(); + $request->expectNever('addHeaderLine'); + $authenticator = new SimpleAuthenticator(); + $authenticator->addHeaders($request, new SimpleUrl('http://here.com/')); + } + + function &createSingleRealm() { + $authenticator = new SimpleAuthenticator(); + $authenticator->addRealm( + new SimpleUrl('http://www.here.com/path/hello.html'), + 'Basic', + 'Sanctuary'); + $authenticator->setIdentityForRealm('www.here.com', 'Sanctuary', 'test', 'secret'); + return $authenticator; + } + + function testOutsideRealm() { + $request = new MockSimpleHttpRequest(); + $request->expectNever('addHeaderLine'); + $authenticator = &$this->createSingleRealm(); + $authenticator->addHeaders( + $request, + new SimpleUrl('http://www.here.com/hello.html')); + } + + function testWithinRealm() { + $request = new MockSimpleHttpRequest(); + $request->expectOnce('addHeaderLine'); + $authenticator = &$this->createSingleRealm(); + $authenticator->addHeaders( + $request, + new SimpleUrl('http://www.here.com/path/more/hello.html')); + } + + function testRestartingClearsRealm() { + $request = new MockSimpleHttpRequest(); + $request->expectNever('addHeaderLine'); + $authenticator = &$this->createSingleRealm(); + $authenticator->restartSession(); + $authenticator->addHeaders( + $request, + new SimpleUrl('http://www.here.com/hello.html')); + } + + function testDifferentHostIsOutsideRealm() { + $request = new MockSimpleHttpRequest(); + $request->expectNever('addHeaderLine'); + $authenticator = &$this->createSingleRealm(); + $authenticator->addHeaders( + $request, + new SimpleUrl('http://here.com/path/hello.html')); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/autorun_test.php b/webdata/stdlibs/simpletest/test/autorun_test.php new file mode 100644 index 0000000..d85ea19 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/autorun_test.php @@ -0,0 +1,23 @@ +addFile(dirname(__FILE__) . '/support/test1.php'); + $this->assertEqual($tests->getSize(), 1); + } + + function testExitStatusOneIfTestsFail() { + exec('php ' . dirname(__FILE__) . '/support/failing_test.php', $output, $exit_status); + $this->assertEqual($exit_status, 1); + } + + function testExitStatusZeroIfTestsPass() { + exec('php ' . dirname(__FILE__) . '/support/passing_test.php', $output, $exit_status); + $this->assertEqual($exit_status, 0); + } +} + +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/bad_test_suite.php b/webdata/stdlibs/simpletest/test/bad_test_suite.php new file mode 100644 index 0000000..b426013 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/bad_test_suite.php @@ -0,0 +1,10 @@ +TestSuite('Two bad test cases'); + $this->addFile(dirname(__FILE__) . '/support/empty_test_file.php'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/browser_test.php b/webdata/stdlibs/simpletest/test/browser_test.php new file mode 100644 index 0000000..3a52aaa --- /dev/null +++ b/webdata/stdlibs/simpletest/test/browser_test.php @@ -0,0 +1,802 @@ +assertIdentical($history->getUrl(), false); + $this->assertIdentical($history->getParameters(), false); + } + + function testCannotMoveInEmptyHistory() { + $history = new SimpleBrowserHistory(); + $this->assertFalse($history->back()); + $this->assertFalse($history->forward()); + } + + function testCurrentTargetAccessors() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.here.com/'), + new SimpleGetEncoding()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.here.com/')); + $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); + } + + function testSecondEntryAccessors() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.second.com/'), + new SimplePostEncoding(array('a' => 1))); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.second.com/')); + $this->assertIdentical( + $history->getParameters(), + new SimplePostEncoding(array('a' => 1))); + } + + function testGoingBackwards() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.second.com/'), + new SimplePostEncoding(array('a' => 1))); + $this->assertTrue($history->back()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); + $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); + } + + function testGoingBackwardsOffBeginning() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $this->assertFalse($history->back()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); + $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); + } + + function testGoingForwardsOffEnd() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $this->assertFalse($history->forward()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); + $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); + } + + function testGoingBackwardsAndForwards() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.second.com/'), + new SimplePostEncoding(array('a' => 1))); + $this->assertTrue($history->back()); + $this->assertTrue($history->forward()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.second.com/')); + $this->assertIdentical( + $history->getParameters(), + new SimplePostEncoding(array('a' => 1))); + } + + function testNewEntryReplacesNextOne() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.second.com/'), + new SimplePostEncoding(array('a' => 1))); + $history->back(); + $history->recordEntry( + new SimpleUrl('http://www.third.com/'), + new SimpleGetEncoding()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.third.com/')); + $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); + } + + function testNewEntryDropsFutureEntries() { + $history = new SimpleBrowserHistory(); + $history->recordEntry( + new SimpleUrl('http://www.first.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.second.com/'), + new SimpleGetEncoding()); + $history->recordEntry( + new SimpleUrl('http://www.third.com/'), + new SimpleGetEncoding()); + $history->back(); + $history->back(); + $history->recordEntry( + new SimpleUrl('http://www.fourth.com/'), + new SimpleGetEncoding()); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.fourth.com/')); + $this->assertFalse($history->forward()); + $history->back(); + $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); + $this->assertFalse($history->back()); + } +} + +class TestOfParsedPageAccess extends UnitTestCase { + + function loadPage(&$page) { + $response = new MockSimpleHttpResponse($this); + $agent = new MockSimpleUserAgent($this); + $agent->returns('fetchResponse', $response); + + $browser = new MockParseSimpleBrowser($this); + $browser->returns('createUserAgent', $agent); + $browser->returns('parse', $page); + $browser->__construct(); + + $browser->get('http://this.com/page.html'); + return $browser; + } + + function testAccessorsWhenNoPage() { + $agent = new MockSimpleUserAgent($this); + $browser = new MockParseSimpleBrowser($this); + $browser->returns('createUserAgent', $agent); + $browser->__construct(); + $this->assertEqual($browser->getContent(), ''); + } + + function testParse() { + $page = new MockSimplePage(); + $page->setReturnValue('getRequest', "GET here.html\r\n\r\n"); + $page->setReturnValue('getRaw', 'Raw HTML'); + $page->setReturnValue('getTitle', 'Here'); + $page->setReturnValue('getFrameFocus', 'Frame'); + $page->setReturnValue('getMimeType', 'text/html'); + $page->setReturnValue('getResponseCode', 200); + $page->setReturnValue('getAuthentication', 'Basic'); + $page->setReturnValue('getRealm', 'Somewhere'); + $page->setReturnValue('getTransportError', 'Ouch!'); + + $browser = $this->loadPage($page); + $this->assertEqual($browser->getRequest(), "GET here.html\r\n\r\n"); + $this->assertEqual($browser->getContent(), 'Raw HTML'); + $this->assertEqual($browser->getTitle(), 'Here'); + $this->assertEqual($browser->getFrameFocus(), 'Frame'); + $this->assertIdentical($browser->getResponseCode(), 200); + $this->assertEqual($browser->getMimeType(), 'text/html'); + $this->assertEqual($browser->getAuthentication(), 'Basic'); + $this->assertEqual($browser->getRealm(), 'Somewhere'); + $this->assertEqual($browser->getTransportError(), 'Ouch!'); + } + + function testLinkAffirmationWhenPresent() { + $page = new MockSimplePage(); + $page->setReturnValue('getUrlsByLabel', array('http://www.nowhere.com')); + $page->expectOnce('getUrlsByLabel', array('a link label')); + $browser = $this->loadPage($page); + $this->assertIdentical($browser->getLink('a link label'), 'http://www.nowhere.com'); + } + + function testLinkAffirmationByIdWhenPresent() { + $page = new MockSimplePage(); + $page->setReturnValue('getUrlById', 'a_page.com', array(99)); + $page->setReturnValue('getUrlById', false, array('*')); + $browser = $this->loadPage($page); + $this->assertIdentical($browser->getLinkById(99), 'a_page.com'); + $this->assertFalse($browser->getLinkById(98)); + } + + function testSettingFieldIsPassedToPage() { + $page = new MockSimplePage(); + $page->expectOnce('setField', array(new SimpleByLabelOrName('key'), 'Value', false)); + $page->setReturnValue('getField', 'Value'); + $browser = $this->loadPage($page); + $this->assertEqual($browser->getField('key'), 'Value'); + $browser->setField('key', 'Value'); + } +} + +class TestOfBrowserNavigation extends UnitTestCase { + function createBrowser($agent, $page) { + $browser = new MockParseSimpleBrowser(); + $browser->returns('createUserAgent', $agent); + $browser->returns('parse', $page); + $browser->__construct(); + return $browser; + } + + function testBrowserRequestMethods() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt( + 0, + 'fetchResponse', + array(new SimpleUrl('http://this.com/get.req'), new SimpleGetEncoding())); + $agent->expectAt( + 1, + 'fetchResponse', + array(new SimpleUrl('http://this.com/post.req'), new SimplePostEncoding())); + $agent->expectAt( + 2, + 'fetchResponse', + array(new SimpleUrl('http://this.com/put.req'), new SimplePutEncoding())); + $agent->expectAt( + 3, + 'fetchResponse', + array(new SimpleUrl('http://this.com/delete.req'), new SimpleDeleteEncoding())); + $agent->expectAt( + 4, + 'fetchResponse', + array(new SimpleUrl('http://this.com/head.req'), new SimpleHeadEncoding())); + $agent->expectCallCount('fetchResponse', 5); + + $page = new MockSimplePage(); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/get.req'); + $browser->post('http://this.com/post.req'); + $browser->put('http://this.com/put.req'); + $browser->delete('http://this.com/delete.req'); + $browser->head('http://this.com/head.req'); + } + + function testClickLinkRequestsPage() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt( + 0, + 'fetchResponse', + array(new SimpleUrl('http://this.com/page.html'), new SimpleGetEncoding())); + $agent->expectAt( + 1, + 'fetchResponse', + array(new SimpleUrl('http://this.com/new.html'), new SimpleGetEncoding())); + $agent->expectCallCount('fetchResponse', 2); + + $page = new MockSimplePage(); + $page->setReturnValue('getUrlsByLabel', array(new SimpleUrl('http://this.com/new.html'))); + $page->expectOnce('getUrlsByLabel', array('New')); + $page->setReturnValue('getRaw', 'A page'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickLink('New')); + } + + function testClickLinkWithUnknownFrameStillRequestsWholePage() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt( + 0, + 'fetchResponse', + array(new SimpleUrl('http://this.com/page.html'), new SimpleGetEncoding())); + $target = new SimpleUrl('http://this.com/new.html'); + $target->setTarget('missing'); + $agent->expectAt( + 1, + 'fetchResponse', + array($target, new SimpleGetEncoding())); + $agent->expectCallCount('fetchResponse', 2); + + $parsed_url = new SimpleUrl('http://this.com/new.html'); + $parsed_url->setTarget('missing'); + + $page = new MockSimplePage(); + $page->setReturnValue('getUrlsByLabel', array($parsed_url)); + $page->setReturnValue('hasFrames', false); + $page->expectOnce('getUrlsByLabel', array('New')); + $page->setReturnValue('getRaw', 'A page'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickLink('New')); + } + + function testClickingMissingLinkFails() { + $agent = new MockSimpleUserAgent($this); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $page = new MockSimplePage(); + $page->setReturnValue('getUrlsByLabel', array()); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $this->assertTrue($browser->get('http://this.com/page.html')); + $this->assertFalse($browser->clickLink('New')); + } + + function testClickIndexedLink() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt( + 1, + 'fetchResponse', + array(new SimpleUrl('1.html'), new SimpleGetEncoding())); + $agent->expectCallCount('fetchResponse', 2); + + $page = new MockSimplePage(); + $page->setReturnValue( + 'getUrlsByLabel', + array(new SimpleUrl('0.html'), new SimpleUrl('1.html'))); + $page->setReturnValue('getRaw', 'A page'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickLink('New', 1)); + } + + function testClinkLinkById() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt(1, 'fetchResponse', array( + new SimpleUrl('http://this.com/link.html'), + new SimpleGetEncoding())); + $agent->expectCallCount('fetchResponse', 2); + + $page = new MockSimplePage(); + $page->setReturnValue('getUrlById', new SimpleUrl('http://this.com/link.html')); + $page->expectOnce('getUrlById', array(2)); + $page->setReturnValue('getRaw', 'A page'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickLinkById(2)); + } + + function testClickingMissingLinkIdFails() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $page = new MockSimplePage(); + $page->setReturnValue('getUrlById', false); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertFalse($browser->clickLink(0)); + } + + function testSubmitFormByLabel() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt(1, 'fetchResponse', array( + new SimpleUrl('http://this.com/handler.html'), + new SimplePostEncoding(array('a' => 'A')))); + $agent->expectCallCount('fetchResponse', 2); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); + $form->expectOnce('submitButton', array(new SimpleByLabel('Go'), false)); + + $page = new MockSimplePage(); + $page->returns('getFormBySubmit', $form); + $page->expectOnce('getFormBySubmit', array(new SimpleByLabel('Go'))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickSubmit('Go')); + } + + function testDefaultSubmitFormByLabel() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt(1, 'fetchResponse', array( + new SimpleUrl('http://this.com/page.html'), + new SimpleGetEncoding(array('a' => 'A')))); + $agent->expectCallCount('fetchResponse', 2); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/page.html')); + $form->setReturnValue('getMethod', 'get'); + $form->setReturnValue('submitButton', new SimpleGetEncoding(array('a' => 'A'))); + + $page = new MockSimplePage(); + $page->returns('getFormBySubmit', $form); + $page->expectOnce('getFormBySubmit', array(new SimpleByLabel('Submit'))); + $page->setReturnValue('getRaw', 'stuff'); + $page->setReturnValue('getUrl', new SimpleUrl('http://this.com/page.html')); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickSubmit()); + } + + function testSubmitFormByName() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); + + $page = new MockSimplePage(); + $page->returns('getFormBySubmit', $form); + $page->expectOnce('getFormBySubmit', array(new SimpleByName('me'))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickSubmitByName('me')); + } + + function testSubmitFormById() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); + $form->expectOnce('submitButton', array(new SimpleById(99), false)); + + $page = new MockSimplePage(); + $page->returns('getFormBySubmit', $form); + $page->expectOnce('getFormBySubmit', array(new SimpleById(99))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickSubmitById(99)); + } + + function testSubmitFormByImageLabel() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); + $form->expectOnce('submitImage', array(new SimpleByLabel('Go!'), 10, 11, false)); + + $page = new MockSimplePage(); + $page->returns('getFormByImage', $form); + $page->expectOnce('getFormByImage', array(new SimpleByLabel('Go!'))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickImage('Go!', 10, 11)); + } + + function testSubmitFormByImageName() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); + $form->expectOnce('submitImage', array(new SimpleByName('a'), 10, 11, false)); + + $page = new MockSimplePage(); + $page->returns('getFormByImage', $form); + $page->expectOnce('getFormByImage', array(new SimpleByName('a'))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickImageByName('a', 10, 11)); + } + + function testSubmitFormByImageId() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); + $form->expectOnce('submitImage', array(new SimpleById(99), 10, 11, false)); + + $page = new MockSimplePage(); + $page->returns('getFormByImage', $form); + $page->expectOnce('getFormByImage', array(new SimpleById(99))); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->clickImageById(99, 10, 11)); + } + + function testSubmitFormByFormId() { + $agent = new MockSimpleUserAgent(); + $agent->returns('fetchResponse', new MockSimpleHttpResponse()); + $agent->expectAt(1, 'fetchResponse', array( + new SimpleUrl('http://this.com/handler.html'), + new SimplePostEncoding(array('a' => 'A')))); + $agent->expectCallCount('fetchResponse', 2); + + $form = new MockSimpleForm(); + $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); + $form->setReturnValue('getMethod', 'post'); + $form->setReturnValue('submit', new SimplePostEncoding(array('a' => 'A'))); + + $page = new MockSimplePage(); + $page->returns('getFormById', $form); + $page->expectOnce('getFormById', array(33)); + $page->setReturnValue('getRaw', 'stuff'); + + $browser = $this->createBrowser($agent, $page); + $browser->get('http://this.com/page.html'); + $this->assertTrue($browser->submitFormById(33)); + } +} + +class TestOfBrowserFrames extends UnitTestCase { + + function createBrowser($agent) { + $browser = new MockUserAgentSimpleBrowser(); + $browser->returns('createUserAgent', $agent); + $browser->__construct(); + return $browser; + } + + function createUserAgent($pages) { + $agent = new MockSimpleUserAgent(); + foreach ($pages as $url => $raw) { + $url = new SimpleUrl($url); + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getUrl', $url); + $response->setReturnValue('getContent', $raw); + $agent->returns('fetchResponse', $response, array($url, '*')); + } + return $agent; + } + + function testSimplePageHasNoFrames() { + $browser = $this->createBrowser($this->createUserAgent( + array('http://site.with.no.frames/' => 'A non-framed page'))); + $this->assertEqual( + $browser->get('http://site.with.no.frames/'), + 'A non-framed page'); + $this->assertIdentical($browser->getFrames(), 'http://site.with.no.frames/'); + } + + function testFramesetWithSingleFrame() { + $frameset = ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.one.frame/' => $frameset, + 'http://site.with.one.frame/frame.html' => 'A frame'))); + $this->assertEqual($browser->get('http://site.with.one.frame/'), 'A frame'); + $this->assertIdentical( + $browser->getFrames(), + array('a' => 'http://site.with.one.frame/frame.html')); + } + + function testTitleTakenFromFramesetPage() { + $frameset = 'Frameset title' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.one.frame/' => $frameset, + 'http://site.with.one.frame/frame.html' => 'Page title'))); + $browser->get('http://site.with.one.frame/'); + $this->assertEqual($browser->getTitle(), 'Frameset title'); + } + + function testFramesetWithSingleUnnamedFrame() { + $frameset = ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.one.frame/' => $frameset, + 'http://site.with.one.frame/frame.html' => 'One frame'))); + $this->assertEqual( + $browser->get('http://site.with.one.frame/'), + 'One frame'); + $this->assertIdentical( + $browser->getFrames(), + array(1 => 'http://site.with.one.frame/frame.html')); + } + + function testFramesetWithMultipleFrames() { + $frameset = '' . + '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.frames/' => $frameset, + 'http://site.with.frames/frame_a.html' => 'A frame', + 'http://site.with.frames/frame_b.html' => 'B frame', + 'http://site.with.frames/frame_c.html' => 'C frame'))); + $this->assertEqual( + $browser->get('http://site.with.frames/'), + 'A frameB frameC frame'); + $this->assertIdentical($browser->getFrames(), array( + 'a' => 'http://site.with.frames/frame_a.html', + 'b' => 'http://site.with.frames/frame_b.html', + 'c' => 'http://site.with.frames/frame_c.html')); + } + + function testFrameFocusByName() { + $frameset = '' . + '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.frames/' => $frameset, + 'http://site.with.frames/frame_a.html' => 'A frame', + 'http://site.with.frames/frame_b.html' => 'B frame', + 'http://site.with.frames/frame_c.html' => 'C frame'))); + $browser->get('http://site.with.frames/'); + $browser->setFrameFocus('a'); + $this->assertEqual($browser->getContent(), 'A frame'); + $browser->setFrameFocus('b'); + $this->assertEqual($browser->getContent(), 'B frame'); + $browser->setFrameFocus('c'); + $this->assertEqual($browser->getContent(), 'C frame'); + } + + function testFramesetWithSomeNamedFrames() { + $frameset = '' . + '' . + '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.frames/' => $frameset, + 'http://site.with.frames/frame_a.html' => 'A frame', + 'http://site.with.frames/frame_b.html' => 'B frame', + 'http://site.with.frames/frame_c.html' => 'C frame', + 'http://site.with.frames/frame_d.html' => 'D frame'))); + $this->assertEqual( + $browser->get('http://site.with.frames/'), + 'A frameB frameC frameD frame'); + $this->assertIdentical($browser->getFrames(), array( + 'a' => 'http://site.with.frames/frame_a.html', + 2 => 'http://site.with.frames/frame_b.html', + 'c' => 'http://site.with.frames/frame_c.html', + 4 => 'http://site.with.frames/frame_d.html')); + } + + function testFrameFocusWithMixedNamesAndIndexes() { + $frameset = '' . + '' . + '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.frames/' => $frameset, + 'http://site.with.frames/frame_a.html' => 'A frame', + 'http://site.with.frames/frame_b.html' => 'B frame', + 'http://site.with.frames/frame_c.html' => 'C frame', + 'http://site.with.frames/frame_d.html' => 'D frame'))); + $browser->get('http://site.with.frames/'); + $browser->setFrameFocus('a'); + $this->assertEqual($browser->getContent(), 'A frame'); + $browser->setFrameFocus(2); + $this->assertEqual($browser->getContent(), 'B frame'); + $browser->setFrameFocus('c'); + $this->assertEqual($browser->getContent(), 'C frame'); + $browser->setFrameFocus(4); + $this->assertEqual($browser->getContent(), 'D frame'); + $browser->clearFrameFocus(); + $this->assertEqual($browser->getContent(), 'A frameB frameC frameD frame'); + } + + function testNestedFrameset() { + $inner = '' . + '' . + ''; + $outer = '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.nested.frame/' => $outer, + 'http://site.with.nested.frame/inner.html' => $inner, + 'http://site.with.nested.frame/page.html' => 'The page'))); + $this->assertEqual( + $browser->get('http://site.with.nested.frame/'), + 'The page'); + $this->assertIdentical($browser->getFrames(), array( + 'inner' => array( + 'page' => 'http://site.with.nested.frame/page.html'))); + } + + function testCanNavigateToNestedFrame() { + $inner = '' . + '' . + '' . + ''; + $outer = '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.nested.frames/' => $outer, + 'http://site.with.nested.frames/inner.html' => $inner, + 'http://site.with.nested.frames/one.html' => 'Page one', + 'http://site.with.nested.frames/two.html' => 'Page two', + 'http://site.with.nested.frames/three.html' => 'Page three'))); + + $browser->get('http://site.with.nested.frames/'); + $this->assertEqual($browser->getContent(), 'Page onePage twoPage three'); + + $this->assertTrue($browser->setFrameFocus('inner')); + $this->assertEqual($browser->getFrameFocus(), array('inner')); + $this->assertTrue($browser->setFrameFocus('one')); + $this->assertEqual($browser->getFrameFocus(), array('inner', 'one')); + $this->assertEqual($browser->getContent(), 'Page one'); + + $this->assertTrue($browser->setFrameFocus('two')); + $this->assertEqual($browser->getFrameFocus(), array('inner', 'two')); + $this->assertEqual($browser->getContent(), 'Page two'); + + $browser->clearFrameFocus(); + $this->assertTrue($browser->setFrameFocus('three')); + $this->assertEqual($browser->getFrameFocus(), array('three')); + $this->assertEqual($browser->getContent(), 'Page three'); + + $this->assertTrue($browser->setFrameFocus('inner')); + $this->assertEqual($browser->getContent(), 'Page onePage two'); + } + + function testCanNavigateToNestedFrameByIndex() { + $inner = '' . + '' . + '' . + ''; + $outer = '' . + '' . + '' . + ''; + $browser = $this->createBrowser($this->createUserAgent(array( + 'http://site.with.nested.frames/' => $outer, + 'http://site.with.nested.frames/inner.html' => $inner, + 'http://site.with.nested.frames/one.html' => 'Page one', + 'http://site.with.nested.frames/two.html' => 'Page two', + 'http://site.with.nested.frames/three.html' => 'Page three'))); + + $browser->get('http://site.with.nested.frames/'); + $this->assertEqual($browser->getContent(), 'Page onePage twoPage three'); + + $this->assertTrue($browser->setFrameFocusByIndex(1)); + $this->assertEqual($browser->getFrameFocus(), array(1)); + $this->assertTrue($browser->setFrameFocusByIndex(1)); + $this->assertEqual($browser->getFrameFocus(), array(1, 1)); + $this->assertEqual($browser->getContent(), 'Page one'); + + $this->assertTrue($browser->setFrameFocusByIndex(2)); + $this->assertEqual($browser->getFrameFocus(), array(1, 2)); + $this->assertEqual($browser->getContent(), 'Page two'); + + $browser->clearFrameFocus(); + $this->assertTrue($browser->setFrameFocusByIndex(2)); + $this->assertEqual($browser->getFrameFocus(), array(2)); + $this->assertEqual($browser->getContent(), 'Page three'); + + $this->assertTrue($browser->setFrameFocusByIndex(1)); + $this->assertEqual($browser->getContent(), 'Page onePage two'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/collector_test.php b/webdata/stdlibs/simpletest/test/collector_test.php new file mode 100644 index 0000000..efdbf37 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/collector_test.php @@ -0,0 +1,50 @@ +expectMinimumCallCount('addFile', 2); + $suite->expect( + 'addFile', + array(new PatternExpectation('/collectable\\.(1|2)$/'))); + $collector = new SimpleCollector(); + $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); + } +} + +class TestOfPatternCollector extends UnitTestCase { + + function testAddingEverythingToGroup() { + $suite = new MockTestSuite(); + $suite->expectCallCount('addFile', 2); + $suite->expect( + 'addFile', + array(new PatternExpectation('/collectable\\.(1|2)$/'))); + $collector = new SimplePatternCollector('/.*/'); + $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); + } + + function testOnlyMatchedFilesAreAddedToGroup() { + $suite = new MockTestSuite(); + $suite->expectOnce('addFile', array(new PathEqualExpectation( + dirname(__FILE__) . '/support/collector/collectable.1'))); + $collector = new SimplePatternCollector('/1$/'); + $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/command_line_test.php b/webdata/stdlibs/simpletest/test/command_line_test.php new file mode 100644 index 0000000..5baabff --- /dev/null +++ b/webdata/stdlibs/simpletest/test/command_line_test.php @@ -0,0 +1,40 @@ +assertIdentical($parser->getTest(), ''); + $this->assertIdentical($parser->getTestCase(), ''); + } + + function testNotXmlByDefault() { + $parser = new SimpleCommandLineParser(array()); + $this->assertFalse($parser->isXml()); + } + + function testCanDetectRequestForXml() { + $parser = new SimpleCommandLineParser(array('--xml')); + $this->assertTrue($parser->isXml()); + } + + function testCanReadAssignmentSyntax() { + $parser = new SimpleCommandLineParser(array('--test=myTest')); + $this->assertEqual($parser->getTest(), 'myTest'); + } + + function testCanReadFollowOnSyntax() { + $parser = new SimpleCommandLineParser(array('--test', 'myTest')); + $this->assertEqual($parser->getTest(), 'myTest'); + } + + function testCanReadShortForms() { + $parser = new SimpleCommandLineParser(array('-t', 'myTest', '-c', 'MyClass', '-x')); + $this->assertEqual($parser->getTest(), 'myTest'); + $this->assertEqual($parser->getTestCase(), 'MyClass'); + $this->assertTrue($parser->isXml()); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/compatibility_test.php b/webdata/stdlibs/simpletest/test/compatibility_test.php new file mode 100644 index 0000000..b8635e5 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/compatibility_test.php @@ -0,0 +1,87 @@ +assertTrue(SimpleTestCompatibility::isA( + new ComparisonClass(), + 'ComparisonClass')); + $this->assertFalse(SimpleTestCompatibility::isA( + new ComparisonClass(), + 'ComparisonSubclass')); + $this->assertTrue(SimpleTestCompatibility::isA( + new ComparisonSubclass(), + 'ComparisonClass')); + } + + function testIdentityOfNumericStrings() { + $numericString1 = "123"; + $numericString2 = "00123"; + $this->assertNotIdentical($numericString1, $numericString2); + } + + function testIdentityOfObjects() { + $object1 = new ComparisonClass(); + $object2 = new ComparisonClass(); + $this->assertIdentical($object1, $object2); + } + + function testReferences () { + $thing = "Hello"; + $thing_reference = &$thing; + $thing_copy = $thing; + $this->assertTrue(SimpleTestCompatibility::isReference( + $thing, + $thing)); + $this->assertTrue(SimpleTestCompatibility::isReference( + $thing, + $thing_reference)); + $this->assertFalse(SimpleTestCompatibility::isReference( + $thing, + $thing_copy)); + } + + function testObjectReferences () { + $object = new ComparisonClass(); + $object_reference = $object; + $object_copy = new ComparisonClass(); + $object_assignment = $object; + $this->assertTrue(SimpleTestCompatibility::isReference( + $object, + $object)); + $this->assertTrue(SimpleTestCompatibility::isReference( + $object, + $object_reference)); + $this->assertFalse(SimpleTestCompatibility::isReference( + $object, + $object_copy)); + if (version_compare(phpversion(), '5', '>=')) { + $this->assertTrue(SimpleTestCompatibility::isReference( + $object, + $object_assignment)); + } else { + $this->assertFalse(SimpleTestCompatibility::isReference( + $object, + $object_assignment)); + } + } + + function testInteraceComparison() { + $object = new ComparisonClassWithInterface(); + $this->assertFalse(SimpleTestCompatibility::isA( + new ComparisonClass(), + 'ComparisonInterface')); + $this->assertTrue(SimpleTestCompatibility::isA( + new ComparisonClassWithInterface(), + 'ComparisonInterface')); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/cookies_test.php b/webdata/stdlibs/simpletest/test/cookies_test.php new file mode 100644 index 0000000..0b49e43 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/cookies_test.php @@ -0,0 +1,227 @@ +assertFalse($cookie->getValue()); + $this->assertEqual($cookie->getPath(), "/"); + $this->assertIdentical($cookie->getHost(), false); + $this->assertFalse($cookie->getExpiry()); + $this->assertFalse($cookie->isSecure()); + } + + function testCookieAccessors() { + $cookie = new SimpleCookie( + "name", + "value", + "/path", + "Mon, 18 Nov 2002 15:50:29 GMT", + true); + $this->assertEqual($cookie->getName(), "name"); + $this->assertEqual($cookie->getValue(), "value"); + $this->assertEqual($cookie->getPath(), "/path/"); + $this->assertEqual($cookie->getExpiry(), "Mon, 18 Nov 2002 15:50:29 GMT"); + $this->assertTrue($cookie->isSecure()); + } + + function testFullHostname() { + $cookie = new SimpleCookie("name"); + $this->assertTrue($cookie->setHost("host.name.here")); + $this->assertEqual($cookie->getHost(), "host.name.here"); + $this->assertTrue($cookie->setHost("host.com")); + $this->assertEqual($cookie->getHost(), "host.com"); + } + + function testHostTruncation() { + $cookie = new SimpleCookie("name"); + $cookie->setHost("this.host.name.here"); + $this->assertEqual($cookie->getHost(), "host.name.here"); + $cookie->setHost("this.host.com"); + $this->assertEqual($cookie->getHost(), "host.com"); + $this->assertTrue($cookie->setHost("dashes.in-host.com")); + $this->assertEqual($cookie->getHost(), "in-host.com"); + } + + function testBadHosts() { + $cookie = new SimpleCookie("name"); + $this->assertFalse($cookie->setHost("gibberish")); + $this->assertFalse($cookie->setHost("host.here")); + $this->assertFalse($cookie->setHost("host..com")); + $this->assertFalse($cookie->setHost("...")); + $this->assertFalse($cookie->setHost("host.com.")); + } + + function testHostValidity() { + $cookie = new SimpleCookie("name"); + $cookie->setHost("this.host.name.here"); + $this->assertTrue($cookie->isValidHost("host.name.here")); + $this->assertTrue($cookie->isValidHost("that.host.name.here")); + $this->assertFalse($cookie->isValidHost("bad.host")); + $this->assertFalse($cookie->isValidHost("nearly.name.here")); + } + + function testPathValidity() { + $cookie = new SimpleCookie("name", "value", "/path"); + $this->assertFalse($cookie->isValidPath("/")); + $this->assertTrue($cookie->isValidPath("/path/")); + $this->assertTrue($cookie->isValidPath("/path/more")); + } + + function testSessionExpiring() { + $cookie = new SimpleCookie("name", "value", "/path"); + $this->assertTrue($cookie->isExpired(0)); + } + + function testTimestampExpiry() { + $cookie = new SimpleCookie("name", "value", "/path", 456); + $this->assertFalse($cookie->isExpired(0)); + $this->assertTrue($cookie->isExpired(457)); + $this->assertFalse($cookie->isExpired(455)); + } + + function testDateExpiry() { + $cookie = new SimpleCookie( + "name", + "value", + "/path", + "Mon, 18 Nov 2002 15:50:29 GMT"); + $this->assertTrue($cookie->isExpired("Mon, 18 Nov 2002 15:50:30 GMT")); + $this->assertFalse($cookie->isExpired("Mon, 18 Nov 2002 15:50:28 GMT")); + } + + function testAging() { + $cookie = new SimpleCookie("name", "value", "/path", 200); + $cookie->agePrematurely(199); + $this->assertFalse($cookie->isExpired(0)); + $cookie->agePrematurely(2); + $this->assertTrue($cookie->isExpired(0)); + } +} + +class TestOfCookieJar extends UnitTestCase { + + function testAddCookie() { + $jar = new SimpleCookieJar(); + $jar->setCookie("a", "A"); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); + } + + function testHostFilter() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', 'my-host.com'); + $jar->setCookie('b', 'B', 'another-host.com'); + $jar->setCookie('c', 'C'); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('my-host.com')), + array('a=A', 'c=C')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('another-host.com')), + array('b=B', 'c=C')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('www.another-host.com')), + array('b=B', 'c=C')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('new-host.org')), + array('c=C')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('/')), + array('a=A', 'b=B', 'c=C')); + } + + function testPathFilter() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', false, '/path/'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/elsewhere')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/')), array('a=A')); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path')), array('a=A')); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/pa')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/here')), array('a=A')); + } + + function testPathFilterDeeply() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', false, '/path/more_path/'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/pa')), array()); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/more_path/')), array('a=A')); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/more_path/and_more')), array('a=A')); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/not_here/')), array()); + } + + function testMultipleCookieWithDifferentPathsButSameName() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'abc', false, '/'); + $jar->setCookie('a', '123', false, '/path/here/'); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('/')), + array('a=abc')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('my-host.com/')), + array('a=abc')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('my-host.com/path/')), + array('a=abc')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('my-host.com/path/here')), + array('a=abc', 'a=123')); + $this->assertEqual( + $jar->selectAsPairs(new SimpleUrl('my-host.com/path/here/there')), + array('a=abc', 'a=123')); + } + + function testOverwrite() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'abc', false, '/'); + $jar->setCookie('a', 'cde', false, '/'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=cde')); + } + + function testClearSessionCookies() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', false, '/'); + $jar->restartSession(); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); + } + + function testExpiryFilterByDate() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', false, '/', 'Wed, 25-Dec-02 04:24:20 GMT'); + $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); + $jar->restartSession("Wed, 25-Dec-02 04:24:21 GMT"); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); + } + + function testExpiryFilterByAgeing() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A', false, '/', 'Wed, 25-Dec-02 04:24:20 GMT'); + $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); + $jar->agePrematurely(2); + $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); + } + + function testCookieClearing() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'abc', false, '/'); + $jar->setCookie('a', '', false, '/'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=')); + } + + function testCookieClearByLoweringDate() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'abc', false, '/', 'Wed, 25-Dec-02 04:24:21 GMT'); + $jar->setCookie('a', 'def', false, '/', 'Wed, 25-Dec-02 04:24:19 GMT'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=def')); + $jar->restartSession('Wed, 25-Dec-02 04:24:20 GMT'); + $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/detached_test.php b/webdata/stdlibs/simpletest/test/detached_test.php new file mode 100644 index 0000000..f651d97 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/detached_test.php @@ -0,0 +1,15 @@ +add(new DetachedTestCase($command)); +if (SimpleReporter::inCli()) { + exit ($test->run(new TextReporter()) ? 0 : 1); +} +$test->run(new HtmlReporter()); +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/dumper_test.php b/webdata/stdlibs/simpletest/test/dumper_test.php new file mode 100644 index 0000000..789047d --- /dev/null +++ b/webdata/stdlibs/simpletest/test/dumper_test.php @@ -0,0 +1,88 @@ +assertEqual( + $dumper->clipString("Hello", 6), + "Hello", + "Hello, 6->%s"); + $this->assertEqual( + $dumper->clipString("Hello", 5), + "Hello", + "Hello, 5->%s"); + $this->assertEqual( + $dumper->clipString("Hello world", 3), + "Hel...", + "Hello world, 3->%s"); + $this->assertEqual( + $dumper->clipString("Hello world", 6, 3), + "Hello ...", + "Hello world, 6, 3->%s"); + $this->assertEqual( + $dumper->clipString("Hello world", 3, 6), + "...o w...", + "Hello world, 3, 6->%s"); + $this->assertEqual( + $dumper->clipString("Hello world", 4, 11), + "...orld", + "Hello world, 4, 11->%s"); + $this->assertEqual( + $dumper->clipString("Hello world", 4, 12), + "...orld", + "Hello world, 4, 12->%s"); + } + + function testDescribeNull() { + $dumper = new SimpleDumper(); + $this->assertPattern('/null/i', $dumper->describeValue(null)); + } + + function testDescribeBoolean() { + $dumper = new SimpleDumper(); + $this->assertPattern('/boolean/i', $dumper->describeValue(true)); + $this->assertPattern('/true/i', $dumper->describeValue(true)); + $this->assertPattern('/false/i', $dumper->describeValue(false)); + } + + function testDescribeString() { + $dumper = new SimpleDumper(); + $this->assertPattern('/string/i', $dumper->describeValue('Hello')); + $this->assertPattern('/Hello/', $dumper->describeValue('Hello')); + } + + function testDescribeInteger() { + $dumper = new SimpleDumper(); + $this->assertPattern('/integer/i', $dumper->describeValue(35)); + $this->assertPattern('/35/', $dumper->describeValue(35)); + } + + function testDescribeFloat() { + $dumper = new SimpleDumper(); + $this->assertPattern('/float/i', $dumper->describeValue(0.99)); + $this->assertPattern('/0\.99/', $dumper->describeValue(0.99)); + } + + function testDescribeArray() { + $dumper = new SimpleDumper(); + $this->assertPattern('/array/i', $dumper->describeValue(array(1, 4))); + $this->assertPattern('/2/i', $dumper->describeValue(array(1, 4))); + } + + function testDescribeObject() { + $dumper = new SimpleDumper(); + $this->assertPattern( + '/object/i', + $dumper->describeValue(new DumperDummy())); + $this->assertPattern( + '/DumperDummy/i', + $dumper->describeValue(new DumperDummy())); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/eclipse_test.php b/webdata/stdlibs/simpletest/test/eclipse_test.php new file mode 100644 index 0000000..c90cbc9 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/eclipse_test.php @@ -0,0 +1,32 @@ +expectOnce('write',array($expected)); + $listener->setReturnValue('write',-1); + + $pathparts = pathinfo($fullpath); + $filename = $pathparts['basename']; + $test= &new TestSuite($filename); + $test->addTestFile($fullpath); + $test->run(new EclipseReporter($listener)); + $this->assertEqual($expected,$listener->output); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/encoding_test.php b/webdata/stdlibs/simpletest/test/encoding_test.php new file mode 100644 index 0000000..a09236e --- /dev/null +++ b/webdata/stdlibs/simpletest/test/encoding_test.php @@ -0,0 +1,240 @@ +assertEqual($pair->asRequest(), 'a=A'); + } + + function testMimeEncodedAsHeadersAndContent() { + $pair = new SimpleEncodedPair('a', 'A'); + $this->assertEqual( + $pair->asMime(), + "Content-Disposition: form-data; name=\"a\"\r\n\r\nA"); + } + + function testAttachmentEncodedAsHeadersWithDispositionAndContent() { + $part = new SimpleAttachment('a', 'A', 'aaa.txt'); + $this->assertEqual( + $part->asMime(), + "Content-Disposition: form-data; name=\"a\"; filename=\"aaa.txt\"\r\n" . + "Content-Type: text/plain\r\n\r\nA"); + } +} + +class TestOfEncoding extends UnitTestCase { + private $content_so_far; + + function write($content) { + $this->content_so_far .= $content; + } + + function clear() { + $this->content_so_far = ''; + } + + function assertWritten($encoding, $content, $message = '%s') { + $this->clear(); + $encoding->writeTo($this); + $this->assertIdentical($this->content_so_far, $content, $message); + } + + function testGetEmpty() { + $encoding = new SimpleGetEncoding(); + $this->assertIdentical($encoding->getValue('a'), false); + $this->assertIdentical($encoding->asUrlRequest(), ''); + } + + function testPostEmpty() { + $encoding = new SimplePostEncoding(); + $this->assertIdentical($encoding->getValue('a'), false); + $this->assertWritten($encoding, ''); + } + + function testPrefilled() { + $encoding = new SimplePostEncoding(array('a' => 'aaa')); + $this->assertIdentical($encoding->getValue('a'), 'aaa'); + $this->assertWritten($encoding, 'a=aaa'); + } + + function testPrefilledWithTwoLevels() { + $query = array('a' => array('aa' => 'aaa')); + $encoding = new SimplePostEncoding($query); + $this->assertTrue($encoding->hasMoreThanOneLevel($query)); + $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[aa]' => 'aaa')); + $this->assertIdentical($encoding->getValue('a[aa]'), 'aaa'); + $this->assertWritten($encoding, 'a%5Baa%5D=aaa'); + } + + function testPrefilledWithThreeLevels() { + $query = array('a' => array('aa' => array('aaa' => 'aaaa'))); + $encoding = new SimplePostEncoding($query); + $this->assertTrue($encoding->hasMoreThanOneLevel($query)); + $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[aa][aaa]' => 'aaaa')); + $this->assertIdentical($encoding->getValue('a[aa][aaa]'), 'aaaa'); + $this->assertWritten($encoding, 'a%5Baa%5D%5Baaa%5D=aaaa'); + } + + function testPrefilledWithObject() { + $encoding = new SimplePostEncoding(new SimpleEncoding(array('a' => 'aaa'))); + $this->assertIdentical($encoding->getValue('a'), 'aaa'); + $this->assertWritten($encoding, 'a=aaa'); + } + + function testMultiplePrefilled() { + $query = array('a' => array('a1', 'a2')); + $encoding = new SimplePostEncoding($query); + $this->assertTrue($encoding->hasMoreThanOneLevel($query)); + $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[0]' => 'a1', 'a[1]' => 'a2')); + $this->assertIdentical($encoding->getValue('a[0]'), 'a1'); + $this->assertIdentical($encoding->getValue('a[1]'), 'a2'); + $this->assertWritten($encoding, 'a%5B0%5D=a1&a%5B1%5D=a2'); + } + + function testSingleParameter() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', 'Hello'); + $this->assertEqual($encoding->getValue('a'), 'Hello'); + $this->assertWritten($encoding, 'a=Hello'); + } + + function testFalseParameter() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', false); + $this->assertEqual($encoding->getValue('a'), false); + $this->assertWritten($encoding, ''); + } + + function testUrlEncoding() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', 'Hello there!'); + $this->assertWritten($encoding, 'a=Hello+there%21'); + } + + function testUrlEncodingOfKey() { + $encoding = new SimplePostEncoding(); + $encoding->add('a!', 'Hello'); + $this->assertWritten($encoding, 'a%21=Hello'); + } + + function testMultipleParameter() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', 'Hello'); + $encoding->add('b', 'Goodbye'); + $this->assertWritten($encoding, 'a=Hello&b=Goodbye'); + } + + function testEmptyParameters() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', ''); + $encoding->add('b', ''); + $this->assertWritten($encoding, 'a=&b='); + } + + function testRepeatedParameter() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', 'Hello'); + $encoding->add('a', 'Goodbye'); + $this->assertIdentical($encoding->getValue('a'), array('Hello', 'Goodbye')); + $this->assertWritten($encoding, 'a=Hello&a=Goodbye'); + } + + function testAddingLists() { + $encoding = new SimplePostEncoding(); + $encoding->add('a', array('Hello', 'Goodbye')); + $this->assertIdentical($encoding->getValue('a'), array('Hello', 'Goodbye')); + $this->assertWritten($encoding, 'a=Hello&a=Goodbye'); + } + + function testMergeInHash() { + $encoding = new SimpleGetEncoding(array('a' => 'A1', 'b' => 'B')); + $encoding->merge(array('a' => 'A2')); + $this->assertIdentical($encoding->getValue('a'), array('A1', 'A2')); + $this->assertIdentical($encoding->getValue('b'), 'B'); + } + + function testMergeInObject() { + $encoding = new SimpleGetEncoding(array('a' => 'A1', 'b' => 'B')); + $encoding->merge(new SimpleEncoding(array('a' => 'A2'))); + $this->assertIdentical($encoding->getValue('a'), array('A1', 'A2')); + $this->assertIdentical($encoding->getValue('b'), 'B'); + } + + function testPrefilledMultipart() { + $encoding = new SimpleMultipartEncoding(array('a' => 'aaa'), 'boundary'); + $this->assertIdentical($encoding->getValue('a'), 'aaa'); + $this->assertwritten($encoding, + "--boundary\r\n" . + "Content-Disposition: form-data; name=\"a\"\r\n" . + "\r\n" . + "aaa\r\n" . + "--boundary--\r\n"); + } + + function testAttachment() { + $encoding = new SimpleMultipartEncoding(array(), 'boundary'); + $encoding->attach('a', 'aaa', 'aaa.txt'); + $this->assertIdentical($encoding->getValue('a'), 'aaa.txt'); + $this->assertwritten($encoding, + "--boundary\r\n" . + "Content-Disposition: form-data; name=\"a\"; filename=\"aaa.txt\"\r\n" . + "Content-Type: text/plain\r\n" . + "\r\n" . + "aaa\r\n" . + "--boundary--\r\n"); + } + + function testEntityEncodingDefaultContentType() { + $encoding = new SimpleEntityEncoding(); + $this->assertIdentical($encoding->getContentType(), 'application/x-www-form-urlencoded'); + $this->assertWritten($encoding, ''); + } + + function testEntityEncodingTextBody() { + $encoding = new SimpleEntityEncoding('plain text'); + $this->assertIdentical($encoding->getContentType(), 'text/plain'); + $this->assertWritten($encoding, 'plain text'); + } + + function testEntityEncodingXmlBody() { + $encoding = new SimpleEntityEncoding('

                      xmltext

                      ', 'text/xml'); + $this->assertIdentical($encoding->getContentType(), 'text/xml'); + $this->assertWritten($encoding, '

                      xmltext

                      '); + } +} + +class TestOfEncodingHeaders extends UnitTestCase { + + function testEmptyEncodingWritesZeroContentLength() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 0\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); + $encoding = new SimpleEntityEncoding(); + $encoding->writeHeadersTo($socket); + } + + function testTextEncodingWritesDefaultContentType() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 18\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: text/plain\r\n")); + $encoding = new SimpleEntityEncoding('one two three four'); + $encoding->writeHeadersTo($socket); + } + + function testEmptyMultipartEncodingWritesEndBoundaryContentLength() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 14\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: multipart/form-data; boundary=boundary\r\n")); + $encoding = new SimpleMultipartEncoding(array(), 'boundary'); + $encoding->writeHeadersTo($socket); + } + +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/errors_test.php b/webdata/stdlibs/simpletest/test/errors_test.php new file mode 100644 index 0000000..ebb9e05 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/errors_test.php @@ -0,0 +1,229 @@ +get('SimpleErrorQueue'); + $queue->clear(); + } + + function tearDown() { + $context = SimpleTest::getContext(); + $queue = $context->get('SimpleErrorQueue'); + $queue->clear(); + } + + function testExpectationMatchCancelsIncomingError() { + $test = new MockSimpleTestCase(); + $test->expectOnce('assert', array( + new IdenticalExpectation(new AnythingExpectation()), + 'B', + 'a message')); + $test->setReturnValue('assert', true); + $test->expectNever('error'); + $queue = new SimpleErrorQueue(); + $queue->setTestCase($test); + $queue->expectError(new AnythingExpectation(), 'a message'); + $queue->add(1024, 'B', 'b.php', 100); + } +} + +class TestOfErrorTrap extends UnitTestCase { + private $old; + + function setUp() { + $this->old = error_reporting(E_ALL); + set_error_handler('SimpleTestErrorHandler'); + } + + function tearDown() { + restore_error_handler(); + error_reporting($this->old); + } + + function testQueueStartsEmpty() { + $context = SimpleTest::getContext(); + $queue = $context->get('SimpleErrorQueue'); + $this->assertFalse($queue->extract()); + } + + function testErrorsAreSwallowedByMatchingExpectation() { + $this->expectError('Ouch!'); + trigger_error('Ouch!'); + } + + function testErrorsAreSwallowedInOrder() { + $this->expectError('a'); + $this->expectError('b'); + trigger_error('a'); + trigger_error('b'); + } + + function testAnyErrorCanBeSwallowed() { + $this->expectError(); + trigger_error('Ouch!'); + } + + function testErrorCanBeSwallowedByPatternMatching() { + $this->expectError(new PatternExpectation('/ouch/i')); + trigger_error('Ouch!'); + } + + function testErrorWithPercentsPassesWithNoSprintfError() { + $this->expectError("%"); + trigger_error('%'); + } +} + +class TestOfErrors extends UnitTestCase { + private $old; + + function setUp() { + $this->old = error_reporting(E_ALL); + } + + function tearDown() { + error_reporting($this->old); + } + + function testDefaultWhenAllReported() { + error_reporting(E_ALL); + $this->expectError('Ouch!'); + trigger_error('Ouch!'); + } + + function testNoticeWhenReported() { + error_reporting(E_ALL); + $this->expectError('Ouch!'); + trigger_error('Ouch!', E_USER_NOTICE); + } + + function testWarningWhenReported() { + error_reporting(E_ALL); + $this->expectError('Ouch!'); + trigger_error('Ouch!', E_USER_WARNING); + } + + function testErrorWhenReported() { + error_reporting(E_ALL); + $this->expectError('Ouch!'); + trigger_error('Ouch!', E_USER_ERROR); + } + + function testNoNoticeWhenNotReported() { + error_reporting(0); + trigger_error('Ouch!', E_USER_NOTICE); + } + + function testNoWarningWhenNotReported() { + error_reporting(0); + trigger_error('Ouch!', E_USER_WARNING); + } + + function testNoticeSuppressedWhenReported() { + error_reporting(E_ALL); + @trigger_error('Ouch!', E_USER_NOTICE); + } + + function testWarningSuppressedWhenReported() { + error_reporting(E_ALL); + @trigger_error('Ouch!', E_USER_WARNING); + } + + function testErrorWithPercentsReportedWithNoSprintfError() { + $this->expectError('%'); + trigger_error('%'); + } +} + +class TestOfPHP52RecoverableErrors extends UnitTestCase { + function skip() { + $this->skipIf( + version_compare(phpversion(), '5.2', '<'), + 'E_RECOVERABLE_ERROR not tested for PHP below 5.2'); + } + + function testError() { + eval(' + class RecoverableErrorTestingStub { + function ouch(RecoverableErrorTestingStub $obj) { + } + } + '); + + $stub = new RecoverableErrorTestingStub(); + $this->expectError(new PatternExpectation('/must be an instance of RecoverableErrorTestingStub/i')); + $stub->ouch(new stdClass()); + } +} + +class TestOfErrorsExcludingPHP52AndAbove extends UnitTestCase { + function skip() { + $this->skipIf( + version_compare(phpversion(), '5.2', '>='), + 'E_USER_ERROR not tested for PHP 5.2 and above'); + } + + function testNoErrorWhenNotReported() { + error_reporting(0); + trigger_error('Ouch!', E_USER_ERROR); + } + + function testErrorSuppressedWhenReported() { + error_reporting(E_ALL); + @trigger_error('Ouch!', E_USER_ERROR); + } +} + +SimpleTest::ignore('TestOfNotEnoughErrors'); +/** + * This test is ignored as it is used by {@link TestRunnerForLeftOverAndNotEnoughErrors} + * to verify that it fails as expected. + * + * @ignore + */ +class TestOfNotEnoughErrors extends UnitTestCase { + function testExpectTwoErrorsThrowOne() { + $this->expectError('Error 1'); + trigger_error('Error 1'); + $this->expectError('Error 2'); + } +} + +SimpleTest::ignore('TestOfLeftOverErrors'); +/** + * This test is ignored as it is used by {@link TestRunnerForLeftOverAndNotEnoughErrors} + * to verify that it fails as expected. + * + * @ignore + */ +class TestOfLeftOverErrors extends UnitTestCase { + function testExpectOneErrorGetTwo() { + $this->expectError('Error 1'); + trigger_error('Error 1'); + trigger_error('Error 2'); + } +} + +class TestRunnerForLeftOverAndNotEnoughErrors extends UnitTestCase { + function testRunLeftOverErrorsTestCase() { + $test = new TestOfLeftOverErrors(); + $this->assertFalse($test->run(new SimpleReporter())); + } + + function testRunNotEnoughErrors() { + $test = new TestOfNotEnoughErrors(); + $this->assertFalse($test->run(new SimpleReporter())); + } +} + +// TODO: Add stacked error handler test +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/exceptions_test.php b/webdata/stdlibs/simpletest/test/exceptions_test.php new file mode 100644 index 0000000..1011543 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/exceptions_test.php @@ -0,0 +1,183 @@ +assertTrue($expectation->test(new MyTestException())); + $this->assertTrue($expectation->test(new HigherTestException())); + $this->assertFalse($expectation->test(new OtherTestException())); + } + + function testMatchesClassAndMessageWhenExceptionExpected() { + $expectation = new ExceptionExpectation(new MyTestException('Hello')); + $this->assertTrue($expectation->test(new MyTestException('Hello'))); + $this->assertFalse($expectation->test(new HigherTestException('Hello'))); + $this->assertFalse($expectation->test(new OtherTestException('Hello'))); + $this->assertFalse($expectation->test(new MyTestException('Goodbye'))); + $this->assertFalse($expectation->test(new MyTestException())); + } + + function testMessagelessExceptionMatchesOnlyOnClass() { + $expectation = new ExceptionExpectation(new MyTestException()); + $this->assertTrue($expectation->test(new MyTestException())); + $this->assertFalse($expectation->test(new HigherTestException())); + } +} + +class TestOfExceptionTrap extends UnitTestCase { + + function testNoExceptionsInQueueMeansNoTestMessages() { + $test = new MockSimpleTestCase(); + $test->expectNever('assert'); + $queue = new SimpleExceptionTrap(); + $this->assertFalse($queue->isExpected($test, new Exception())); + } + + function testMatchingExceptionGivesTrue() { + $expectation = new MockSimpleExpectation(); + $expectation->setReturnValue('test', true); + $test = new MockSimpleTestCase(); + $test->setReturnValue('assert', true); + $queue = new SimpleExceptionTrap(); + $queue->expectException($expectation, 'message'); + $this->assertTrue($queue->isExpected($test, new Exception())); + } + + function testMatchingExceptionTriggersAssertion() { + $test = new MockSimpleTestCase(); + $test->expectOnce('assert', array( + '*', + new ExceptionExpectation(new Exception()), + 'message')); + $queue = new SimpleExceptionTrap(); + $queue->expectException(new ExceptionExpectation(new Exception()), 'message'); + $queue->isExpected($test, new Exception()); + } +} + +class TestOfCatchingExceptions extends UnitTestCase { + + function testCanCatchAnyExpectedException() { + $this->expectException(); + throw new Exception(); + } + + function testCanMatchExceptionByClass() { + $this->expectException('MyTestException'); + throw new HigherTestException(); + } + + function testCanMatchExceptionExactly() { + $this->expectException(new Exception('Ouch')); + throw new Exception('Ouch'); + } + + function testLastListedExceptionIsTheOneThatCounts() { + $this->expectException('OtherTestException'); + $this->expectException('MyTestException'); + throw new HigherTestException(); + } +} + +class TestOfIgnoringExceptions extends UnitTestCase { + + function testCanIgnoreAnyException() { + $this->ignoreException(); + throw new Exception(); + } + + function testCanIgnoreSpecificException() { + $this->ignoreException('MyTestException'); + throw new MyTestException(); + } + + function testCanIgnoreExceptionExactly() { + $this->ignoreException(new Exception('Ouch')); + throw new Exception('Ouch'); + } + + function testIgnoredExceptionsDoNotMaskExpectedExceptions() { + $this->ignoreException('Exception'); + $this->expectException('MyTestException'); + throw new MyTestException(); + } + + function testCanIgnoreMultipleExceptions() { + $this->ignoreException('MyTestException'); + $this->ignoreException('OtherTestException'); + throw new OtherTestException(); + } +} + +class TestOfCallingTearDownAfterExceptions extends UnitTestCase { + private $debri = 0; + + function tearDown() { + $this->debri--; + } + + function testLeaveSomeDebri() { + $this->debri++; + $this->expectException(); + throw new Exception(__FUNCTION__); + } + + function testDebriWasRemovedOnce() { + $this->assertEqual($this->debri, 0); + } +} + +class TestOfExceptionThrownInSetUpDoesNotRunTestBody extends UnitTestCase { + + function setUp() { + $this->expectException(); + throw new Exception(); + } + + function testShouldNotBeRun() { + $this->fail('This test body should not be run'); + } + + function testShouldNotBeRunEither() { + $this->fail('This test body should not be run either'); + } +} + +class TestOfExpectExceptionWithSetUp extends UnitTestCase { + + function setUp() { + $this->expectException(); + } + + function testThisExceptionShouldBeCaught() { + throw new Exception(); + } + + function testJustThrowingMyTestException() { + throw new MyTestException(); + } +} + +class TestOfThrowingExceptionsInTearDown extends UnitTestCase { + + function tearDown() { + throw new Exception(); + } + + function testDoesntFatal() { + $this->expectException(); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/expectation_test.php b/webdata/stdlibs/simpletest/test/expectation_test.php new file mode 100644 index 0000000..31fbe65 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/expectation_test.php @@ -0,0 +1,317 @@ +assertTrue($is_true->test(true)); + $this->assertFalse($is_true->test(false)); + } + + function testStringMatch() { + $hello = new EqualExpectation("Hello"); + $this->assertTrue($hello->test("Hello")); + $this->assertFalse($hello->test("Goodbye")); + } + + function testInteger() { + $fifteen = new EqualExpectation(15); + $this->assertTrue($fifteen->test(15)); + $this->assertFalse($fifteen->test(14)); + } + + function testFloat() { + $pi = new EqualExpectation(3.14); + $this->assertTrue($pi->test(3.14)); + $this->assertFalse($pi->test(3.15)); + } + + function testArray() { + $colours = new EqualExpectation(array("r", "g", "b")); + $this->assertTrue($colours->test(array("r", "g", "b"))); + $this->assertFalse($colours->test(array("g", "b", "r"))); + } + + function testHash() { + $is_blue = new EqualExpectation(array("r" => 0, "g" => 0, "b" => 255)); + $this->assertTrue($is_blue->test(array("r" => 0, "g" => 0, "b" => 255))); + $this->assertFalse($is_blue->test(array("r" => 0, "g" => 255, "b" => 0))); + } + + function testHashWithOutOfOrderKeysShouldStillMatch() { + $any_order = new EqualExpectation(array('a' => 1, 'b' => 2)); + $this->assertTrue($any_order->test(array('b' => 2, 'a' => 1))); + } +} + +class TestOfWithin extends UnitTestCase { + + function testWithinFloatingPointMargin() { + $within = new WithinMarginExpectation(1.0, 0.2); + $this->assertFalse($within->test(0.7)); + $this->assertTrue($within->test(0.8)); + $this->assertTrue($within->test(0.9)); + $this->assertTrue($within->test(1.1)); + $this->assertTrue($within->test(1.2)); + $this->assertFalse($within->test(1.3)); + } + + function testOutsideFloatingPointMargin() { + $within = new OutsideMarginExpectation(1.0, 0.2); + $this->assertTrue($within->test(0.7)); + $this->assertFalse($within->test(0.8)); + $this->assertFalse($within->test(1.2)); + $this->assertTrue($within->test(1.3)); + } +} + +class TestOfInequality extends UnitTestCase { + + function testStringMismatch() { + $not_hello = new NotEqualExpectation("Hello"); + $this->assertTrue($not_hello->test("Goodbye")); + $this->assertFalse($not_hello->test("Hello")); + } +} + +class RecursiveNasty { + private $me; + + function RecursiveNasty() { + $this->me = $this; + } +} + +class OpaqueContainer { + private $stuff; + private $value; + + public function __construct($value) { + $this->value = $value; + } +} + +class DerivedOpaqueContainer extends OpaqueContainer { + // Deliberately have a variable whose name with the same suffix as a later + // variable + private $new_value = 1; + + // Deliberately obscures the variable of the same name in the base + // class. + private $value; + + public function __construct($value, $base_value) { + parent::__construct($base_value); + $this->value = $value; + } +} + +class TestOfIdentity extends UnitTestCase { + + function testType() { + $string = new IdenticalExpectation("37"); + $this->assertTrue($string->test("37")); + $this->assertFalse($string->test(37)); + $this->assertFalse($string->test("38")); + } + + function _testNastyPhp5Bug() { + $this->assertFalse(new RecursiveNasty() != new RecursiveNasty()); + } + + function _testReallyHorribleRecursiveStructure() { + $hopeful = new IdenticalExpectation(new RecursiveNasty()); + $this->assertTrue($hopeful->test(new RecursiveNasty())); + } + + function testCanComparePrivateMembers() { + $expectFive = new IdenticalExpectation(new OpaqueContainer(5)); + $this->assertTrue($expectFive->test(new OpaqueContainer(5))); + $this->assertFalse($expectFive->test(new OpaqueContainer(6))); + } + + function testCanComparePrivateMembersOfObjectsInArrays() { + $expectFive = new IdenticalExpectation(array(new OpaqueContainer(5))); + $this->assertTrue($expectFive->test(array(new OpaqueContainer(5)))); + $this->assertFalse($expectFive->test(array(new OpaqueContainer(6)))); + } + + function testCanComparePrivateMembersOfObjectsWherePrivateMemberOfBaseClassIsObscured() { + $expectFive = new IdenticalExpectation(array(new DerivedOpaqueContainer(1,2))); + $this->assertTrue($expectFive->test(array(new DerivedOpaqueContainer(1,2)))); + $this->assertFalse($expectFive->test(array(new DerivedOpaqueContainer(0,2)))); + $this->assertFalse($expectFive->test(array(new DerivedOpaqueContainer(0,9)))); + $this->assertFalse($expectFive->test(array(new DerivedOpaqueContainer(1,0)))); + } +} + +class TransparentContainer { + public $value; + + public function __construct($value) { + $this->value = $value; + } +} + +class TestOfMemberComparison extends UnitTestCase { + + function testMemberExpectationCanMatchPublicMember() { + $expect_five = new MemberExpectation('value', 5); + $this->assertTrue($expect_five->test(new TransparentContainer(5))); + $this->assertFalse($expect_five->test(new TransparentContainer(8))); + } + + function testMemberExpectationCanMatchPrivateMember() { + $expect_five = new MemberExpectation('value', 5); + $this->assertTrue($expect_five->test(new OpaqueContainer(5))); + $this->assertFalse($expect_five->test(new OpaqueContainer(8))); + } + + function testMemberExpectationCanMatchPrivateMemberObscuredByDerivedClass() { + $expect_five = new MemberExpectation('value', 5); + $this->assertTrue($expect_five->test(new DerivedOpaqueContainer(5,8))); + $this->assertTrue($expect_five->test(new DerivedOpaqueContainer(5,5))); + $this->assertFalse($expect_five->test(new DerivedOpaqueContainer(8,8))); + $this->assertFalse($expect_five->test(new DerivedOpaqueContainer(8,5))); + } + +} + +class DummyReferencedObject{} + +class TestOfReference extends UnitTestCase { + + function testReference() { + $foo = "foo"; + $ref = &$foo; + $not_ref = $foo; + $bar = "bar"; + + $expect = new ReferenceExpectation($foo); + $this->assertTrue($expect->test($ref)); + $this->assertFalse($expect->test($not_ref)); + $this->assertFalse($expect->test($bar)); + } +} + +class TestOfNonIdentity extends UnitTestCase { + + function testType() { + $string = new NotIdenticalExpectation("37"); + $this->assertTrue($string->test("38")); + $this->assertTrue($string->test(37)); + $this->assertFalse($string->test("37")); + } +} + +class TestOfPatterns extends UnitTestCase { + + function testWanted() { + $pattern = new PatternExpectation('/hello/i'); + $this->assertTrue($pattern->test("Hello world")); + $this->assertFalse($pattern->test("Goodbye world")); + } + + function testUnwanted() { + $pattern = new NoPatternExpectation('/hello/i'); + $this->assertFalse($pattern->test("Hello world")); + $this->assertTrue($pattern->test("Goodbye world")); + } +} + +class ExpectedMethodTarget { + function hasThisMethod() {} +} + +class TestOfMethodExistence extends UnitTestCase { + + function testHasMethod() { + $instance = new ExpectedMethodTarget(); + $expectation = new MethodExistsExpectation('hasThisMethod'); + $this->assertTrue($expectation->test($instance)); + $expectation = new MethodExistsExpectation('doesNotHaveThisMethod'); + $this->assertFalse($expectation->test($instance)); + } +} + +class TestOfIsA extends UnitTestCase { + + function testString() { + $expectation = new IsAExpectation('string'); + $this->assertTrue($expectation->test('Hello')); + $this->assertFalse($expectation->test(5)); + } + + function testBoolean() { + $expectation = new IsAExpectation('boolean'); + $this->assertTrue($expectation->test(true)); + $this->assertFalse($expectation->test(1)); + } + + function testBool() { + $expectation = new IsAExpectation('bool'); + $this->assertTrue($expectation->test(true)); + $this->assertFalse($expectation->test(1)); + } + + function testDouble() { + $expectation = new IsAExpectation('double'); + $this->assertTrue($expectation->test(5.0)); + $this->assertFalse($expectation->test(5)); + } + + function testFloat() { + $expectation = new IsAExpectation('float'); + $this->assertTrue($expectation->test(5.0)); + $this->assertFalse($expectation->test(5)); + } + + function testReal() { + $expectation = new IsAExpectation('real'); + $this->assertTrue($expectation->test(5.0)); + $this->assertFalse($expectation->test(5)); + } + + function testInteger() { + $expectation = new IsAExpectation('integer'); + $this->assertTrue($expectation->test(5)); + $this->assertFalse($expectation->test(5.0)); + } + + function testInt() { + $expectation = new IsAExpectation('int'); + $this->assertTrue($expectation->test(5)); + $this->assertFalse($expectation->test(5.0)); + } + + function testScalar() { + $expectation = new IsAExpectation('scalar'); + $this->assertTrue($expectation->test(5)); + $this->assertFalse($expectation->test(array(5))); + } + + function testNumeric() { + $expectation = new IsAExpectation('numeric'); + $this->assertTrue($expectation->test(5)); + $this->assertFalse($expectation->test('string')); + } + + function testNull() { + $expectation = new IsAExpectation('null'); + $this->assertTrue($expectation->test(null)); + $this->assertFalse($expectation->test('string')); + } +} + +class TestOfNotA extends UnitTestCase { + + function testString() { + $expectation = new NotAExpectation('string'); + $this->assertFalse($expectation->test('Hello')); + $this->assertTrue($expectation->test(5)); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/form_test.php b/webdata/stdlibs/simpletest/test/form_test.php new file mode 100644 index 0000000..70a18f2 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/form_test.php @@ -0,0 +1,344 @@ +returns('getUrl', new SimpleUrl($url)); + $page->returns('expandUrl', new SimpleUrl($url)); + return $page; + } + + function testFormAttributes() { + $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php', 'id' => '33')); + $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); + $this->assertEqual($form->getMethod(), 'get'); + $this->assertIdentical($form->getId(), '33'); + $this->assertNull($form->getValue(new SimpleByName('a'))); + } + + function testAction() { + $page = new MockSimplePage(); + $page->expectOnce('expandUrl', array(new SimpleUrl('here.php'))); + $page->setReturnValue('expandUrl', new SimpleUrl('http://host/here.php')); + $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php')); + $form = new SimpleForm($tag, $page); + $this->assertEqual($form->getAction(), new SimpleUrl('http://host/here.php')); + } + + function testEmptyAction() { + $tag = new SimpleFormTag(array('method' => 'GET', 'action' => '', 'id' => '33')); + $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); + $this->assertEqual( + $form->getAction(), + new SimpleUrl('http://host/a/index.html')); + } + + function testMissingAction() { + $tag = new SimpleFormTag(array('method' => 'GET')); + $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); + $this->assertEqual( + $form->getAction(), + new SimpleUrl('http://host/a/index.html')); + } + + function testRootAction() { + $page = new MockSimplePage(); + $page->expectOnce('expandUrl', array(new SimpleUrl('/'))); + $page->setReturnValue('expandUrl', new SimpleUrl('http://host/')); + $tag = new SimpleFormTag(array('method' => 'GET', 'action' => '/')); + $form = new SimpleForm($tag, $page); + $this->assertEqual( + $form->getAction(), + new SimpleUrl('http://host/')); + } + + function testDefaultFrameTargetOnForm() { + $page = new MockSimplePage(); + $page->expectOnce('expandUrl', array(new SimpleUrl('here.php'))); + $page->setReturnValue('expandUrl', new SimpleUrl('http://host/here.php')); + $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php')); + $form = new SimpleForm($tag, $page); + $form->setDefaultTarget('frame'); + $expected = new SimpleUrl('http://host/here.php'); + $expected->setTarget('frame'); + $this->assertEqual($form->getAction(), $expected); + } + + function testTextWidget() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleTextTag( + array('name' => 'me', 'type' => 'text', 'value' => 'Myself'))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'Myself'); + $this->assertTrue($form->setField(new SimpleByName('me'), 'Not me')); + $this->assertFalse($form->setField(new SimpleByName('not_present'), 'Not me')); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'Not me'); + $this->assertNull($form->getValue(new SimpleByName('not_present'))); + } + + function testTextWidgetById() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleTextTag( + array('name' => 'me', 'type' => 'text', 'value' => 'Myself', 'id' => 50))); + $this->assertIdentical($form->getValue(new SimpleById(50)), 'Myself'); + $this->assertTrue($form->setField(new SimpleById(50), 'Not me')); + $this->assertIdentical($form->getValue(new SimpleById(50)), 'Not me'); + } + + function testTextWidgetByLabel() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $widget = new SimpleTextTag(array('name' => 'me', 'type' => 'text', 'value' => 'a')); + $form->addWidget($widget); + $widget->setLabel('thing'); + $this->assertIdentical($form->getValue(new SimpleByLabel('thing')), 'a'); + $this->assertTrue($form->setField(new SimpleByLabel('thing'), 'b')); + $this->assertIdentical($form->getValue(new SimpleByLabel('thing')), 'b'); + } + + function testSubmitEmpty() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $this->assertIdentical($form->submit(), new SimpleGetEncoding()); + } + + function testSubmitButton() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); + $form->addWidget(new SimpleSubmitTag( + array('type' => 'submit', 'name' => 'go', 'value' => 'Go!', 'id' => '9'))); + $this->assertTrue($form->hasSubmit(new SimpleByName('go'))); + $this->assertEqual($form->getValue(new SimpleByName('go')), 'Go!'); + $this->assertEqual($form->getValue(new SimpleById(9)), 'Go!'); + $this->assertEqual( + $form->submitButton(new SimpleByName('go')), + new SimpleGetEncoding(array('go' => 'Go!'))); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Go!')), + new SimpleGetEncoding(array('go' => 'Go!'))); + $this->assertEqual( + $form->submitButton(new SimpleById(9)), + new SimpleGetEncoding(array('go' => 'Go!'))); + } + + function testSubmitWithAdditionalParameters() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); + $form->addWidget(new SimpleSubmitTag( + array('type' => 'submit', 'name' => 'go', 'value' => 'Go!'))); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Go!'), array('a' => 'A')), + new SimpleGetEncoding(array('go' => 'Go!', 'a' => 'A'))); + } + + function testSubmitButtonWithLabelOfSubmit() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); + $form->addWidget(new SimpleSubmitTag( + array('type' => 'submit', 'name' => 'test', 'value' => 'Submit'))); + $this->assertEqual( + $form->submitButton(new SimpleByName('test')), + new SimpleGetEncoding(array('test' => 'Submit'))); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Submit')), + new SimpleGetEncoding(array('test' => 'Submit'))); + } + + function testSubmitButtonWithWhitespacePaddedLabelOfSubmit() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); + $form->addWidget(new SimpleSubmitTag( + array('type' => 'submit', 'name' => 'test', 'value' => ' Submit '))); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Submit')), + new SimpleGetEncoding(array('test' => ' Submit '))); + } + + function testImageSubmitButton() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleImageSubmitTag(array( + 'type' => 'image', + 'src' => 'source.jpg', + 'name' => 'go', + 'alt' => 'Go!', + 'id' => '9'))); + $this->assertTrue($form->hasImage(new SimpleByLabel('Go!'))); + $this->assertEqual( + $form->submitImage(new SimpleByLabel('Go!'), 100, 101), + new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); + $this->assertTrue($form->hasImage(new SimpleByName('go'))); + $this->assertEqual( + $form->submitImage(new SimpleByName('go'), 100, 101), + new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); + $this->assertTrue($form->hasImage(new SimpleById(9))); + $this->assertEqual( + $form->submitImage(new SimpleById(9), 100, 101), + new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); + } + + function testImageSubmitButtonWithAdditionalData() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleImageSubmitTag(array( + 'type' => 'image', + 'src' => 'source.jpg', + 'name' => 'go', + 'alt' => 'Go!'))); + $this->assertEqual( + $form->submitImage(new SimpleByLabel('Go!'), 100, 101, array('a' => 'A')), + new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101, 'a' => 'A'))); + } + + function testButtonTag() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); + $widget = new SimpleButtonTag( + array('type' => 'submit', 'name' => 'go', 'value' => 'Go', 'id' => '9')); + $widget->addContent('Go!'); + $form->addWidget($widget); + $this->assertTrue($form->hasSubmit(new SimpleByName('go'))); + $this->assertTrue($form->hasSubmit(new SimpleByLabel('Go!'))); + $this->assertEqual( + $form->submitButton(new SimpleByName('go')), + new SimpleGetEncoding(array('go' => 'Go'))); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Go!')), + new SimpleGetEncoding(array('go' => 'Go'))); + $this->assertEqual( + $form->submitButton(new SimpleById(9)), + new SimpleGetEncoding(array('go' => 'Go'))); + } + + function testMultipleFieldsWithSameNameSubmitted() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $input = new SimpleTextTag(array('name' => 'elements[]', 'value' => '1')); + $form->addWidget($input); + $input = new SimpleTextTag(array('name' => 'elements[]', 'value' => '2')); + $form->addWidget($input); + $form->setField(new SimpleByLabelOrName('elements[]'), '3', 1); + $form->setField(new SimpleByLabelOrName('elements[]'), '4', 2); + $submit = $form->submit(); + $requests = $submit->getAll(); + $this->assertEqual(count($requests), 2); + $this->assertIdentical($requests[0], new SimpleEncodedPair('elements[]', '3')); + $this->assertIdentical($requests[1], new SimpleEncodedPair('elements[]', '4')); + } + + function testSingleSelectFieldSubmitted() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $select = new SimpleSelectionTag(array('name' => 'a')); + $select->addTag(new SimpleOptionTag( + array('value' => 'aaa', 'selected' => ''))); + $form->addWidget($select); + $this->assertIdentical( + $form->submit(), + new SimpleGetEncoding(array('a' => 'aaa'))); + } + + function testSingleSelectFieldSubmittedWithPost() { + $form = new SimpleForm(new SimpleFormTag(array('method' => 'post')), $this->page('htp://host')); + $select = new SimpleSelectionTag(array('name' => 'a')); + $select->addTag(new SimpleOptionTag( + array('value' => 'aaa', 'selected' => ''))); + $form->addWidget($select); + $this->assertIdentical( + $form->submit(), + new SimplePostEncoding(array('a' => 'aaa'))); + } + + function testUnchecked() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleCheckboxTag( + array('name' => 'me', 'type' => 'checkbox'))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), false); + $this->assertTrue($form->setField(new SimpleByName('me'), 'on')); + $this->assertEqual($form->getValue(new SimpleByName('me')), 'on'); + $this->assertFalse($form->setField(new SimpleByName('me'), 'other')); + $this->assertEqual($form->getValue(new SimpleByName('me')), 'on'); + } + + function testChecked() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleCheckboxTag( + array('name' => 'me', 'value' => 'a', 'type' => 'checkbox', 'checked' => ''))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); + $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); + $this->assertEqual($form->getValue(new SimpleByName('me')), 'a'); + $this->assertTrue($form->setField(new SimpleByName('me'), false)); + $this->assertEqual($form->getValue(new SimpleByName('me')), false); + } + + function testSingleUncheckedRadioButton() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), false); + $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); + $this->assertEqual($form->getValue(new SimpleByName('me')), 'a'); + } + + function testSingleCheckedRadioButton() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'a', 'type' => 'radio', 'checked' => ''))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); + $this->assertFalse($form->setField(new SimpleByName('me'), 'other')); + } + + function testUncheckedRadioButtons() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'b', 'type' => 'radio'))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), false); + $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); + $this->assertTrue($form->setField(new SimpleByName('me'), 'b')); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); + $this->assertFalse($form->setField(new SimpleByName('me'), 'c')); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); + } + + function testCheckedRadioButtons() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); + $form->addWidget(new SimpleRadioButtonTag( + array('name' => 'me', 'value' => 'b', 'type' => 'radio', 'checked' => ''))); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); + $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); + $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); + } + + function testMultipleFieldsWithSameKey() { + $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); + $form->addWidget(new SimpleCheckboxTag( + array('name' => 'a', 'type' => 'checkbox', 'value' => 'me'))); + $form->addWidget(new SimpleCheckboxTag( + array('name' => 'a', 'type' => 'checkbox', 'value' => 'you'))); + $this->assertIdentical($form->getValue(new SimpleByName('a')), false); + $this->assertTrue($form->setField(new SimpleByName('a'), 'me')); + $this->assertIdentical($form->getValue(new SimpleByName('a')), 'me'); + } + + function testRemoveGetParamsFromAction() { + Mock::generatePartial('SimplePage', 'MockPartialSimplePage', array('getUrl')); + $page = new MockPartialSimplePage(); + $page->returns('getUrl', new SimpleUrl('htp://host/')); + + # Keep GET params in "action", if the form has no widgets + $form = new SimpleForm(new SimpleFormTag(array('action'=>'?test=1')), $page); + $this->assertEqual($form->getAction()->asString(), 'htp://host/'); + + $form = new SimpleForm(new SimpleFormTag(array('action'=>'?test=1')), $page); + $form->addWidget(new SimpleTextTag(array('name' => 'me', 'type' => 'text', 'value' => 'a'))); + $this->assertEqual($form->getAction()->asString(), 'htp://host/'); + + $form = new SimpleForm(new SimpleFormTag(array('action'=>'')), $page); + $this->assertEqual($form->getAction()->asString(), 'htp://host/'); + + $form = new SimpleForm(new SimpleFormTag(array('action'=>'?test=1', 'method'=>'post')), $page); + $this->assertEqual($form->getAction()->asString(), 'htp://host/?test=1'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/frames_test.php b/webdata/stdlibs/simpletest/test/frames_test.php new file mode 100644 index 0000000..2930970 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/frames_test.php @@ -0,0 +1,549 @@ +setReturnValue('getTitle', 'This page'); + $frameset = new SimpleFrameset($page); + $this->assertEqual($frameset->getTitle(), 'This page'); + } + + function TestHeadersReadFromFramesetByDefault() { + $page = new MockSimplePage(); + $page->setReturnValue('getHeaders', 'Header: content'); + $page->setReturnValue('getMimeType', 'text/xml'); + $page->setReturnValue('getResponseCode', 401); + $page->setReturnValue('getTransportError', 'Could not parse headers'); + $page->setReturnValue('getAuthentication', 'Basic'); + $page->setReturnValue('getRealm', 'Safe place'); + + $frameset = new SimpleFrameset($page); + + $this->assertIdentical($frameset->getHeaders(), 'Header: content'); + $this->assertIdentical($frameset->getMimeType(), 'text/xml'); + $this->assertIdentical($frameset->getResponseCode(), 401); + $this->assertIdentical($frameset->getTransportError(), 'Could not parse headers'); + $this->assertIdentical($frameset->getAuthentication(), 'Basic'); + $this->assertIdentical($frameset->getRealm(), 'Safe place'); + } + + function testEmptyFramesetHasNoContent() { + $page = new MockSimplePage(); + $page->setReturnValue('getRaw', 'This content'); + $frameset = new SimpleFrameset($page); + $this->assertEqual($frameset->getRaw(), ''); + } + + function testRawContentIsFromOnlyFrame() { + $page = new MockSimplePage(); + $page->expectNever('getRaw'); + + $frame = new MockSimplePage(); + $frame->setReturnValue('getRaw', 'Stuff'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame); + $this->assertEqual($frameset->getRaw(), 'Stuff'); + } + + function testRawContentIsFromAllFrames() { + $page = new MockSimplePage(); + $page->expectNever('getRaw'); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getRaw', 'Stuff1'); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getRaw', 'Stuff2'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); + } + + function testTextContentIsFromOnlyFrame() { + $page = new MockSimplePage(); + $page->expectNever('getText'); + + $frame = new MockSimplePage(); + $frame->setReturnValue('getText', 'Stuff'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame); + $this->assertEqual($frameset->getText(), 'Stuff'); + } + + function testTextContentIsFromAllFrames() { + $page = new MockSimplePage(); + $page->expectNever('getText'); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getText', 'Stuff1'); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getText', 'Stuff2'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + $this->assertEqual($frameset->getText(), 'Stuff1 Stuff2'); + } + + function testFieldFoundIsFirstInFramelist() { + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getField', null); + $frame1->expectOnce('getField', array(new SimpleByName('a'))); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getField', 'A'); + $frame2->expectOnce('getField', array(new SimpleByName('a'))); + + $frame3 = new MockSimplePage(); + $frame3->expectNever('getField'); + + $page = new MockSimplePage(); + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + $frameset->addFrame($frame3); + $this->assertIdentical($frameset->getField(new SimpleByName('a')), 'A'); + } + + function testFrameReplacementByIndex() { + $page = new MockSimplePage(); + $page->expectNever('getRaw'); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getRaw', 'Stuff1'); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getRaw', 'Stuff2'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->setFrame(array(1), $frame2); + $this->assertEqual($frameset->getRaw(), 'Stuff2'); + } + + function testFrameReplacementByName() { + $page = new MockSimplePage(); + $page->expectNever('getRaw'); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getRaw', 'Stuff1'); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getRaw', 'Stuff2'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1, 'a'); + $frameset->setFrame(array('a'), $frame2); + $this->assertEqual($frameset->getRaw(), 'Stuff2'); + } +} + +class TestOfFrameNavigation extends UnitTestCase { + + function testStartsWithoutFrameFocus() { + $page = new MockSimplePage(); + $frameset = new SimpleFrameset($page); + $frameset->addFrame(new MockSimplePage()); + $this->assertFalse($frameset->getFrameFocus()); + } + + function testCanFocusOnSingleFrame() { + $page = new MockSimplePage(); + $page->expectNever('getRaw'); + + $frame = new MockSimplePage(); + $frame->setReturnValue('getFrameFocus', array()); + $frame->setReturnValue('getRaw', 'Stuff'); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame); + + $this->assertFalse($frameset->setFrameFocusByIndex(0)); + $this->assertTrue($frameset->setFrameFocusByIndex(1)); + $this->assertEqual($frameset->getRaw(), 'Stuff'); + $this->assertFalse($frameset->setFrameFocusByIndex(2)); + $this->assertIdentical($frameset->getFrameFocus(), array(1)); + } + + function testContentComesFromFrameInFocus() { + $page = new MockSimplePage(); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getRaw', 'Stuff1'); + $frame1->setReturnValue('getFrameFocus', array()); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getRaw', 'Stuff2'); + $frame2->setReturnValue('getFrameFocus', array()); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + + $this->assertTrue($frameset->setFrameFocusByIndex(1)); + $this->assertEqual($frameset->getFrameFocus(), array(1)); + $this->assertEqual($frameset->getRaw(), 'Stuff1'); + + $this->assertTrue($frameset->setFrameFocusByIndex(2)); + $this->assertEqual($frameset->getFrameFocus(), array(2)); + $this->assertEqual($frameset->getRaw(), 'Stuff2'); + + $this->assertFalse($frameset->setFrameFocusByIndex(3)); + $this->assertEqual($frameset->getFrameFocus(), array(2)); + + $frameset->clearFrameFocus(); + $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); + } + + function testCanFocusByName() { + $page = new MockSimplePage(); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getRaw', 'Stuff1'); + $frame1->setReturnValue('getFrameFocus', array()); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getRaw', 'Stuff2'); + $frame2->setReturnValue('getFrameFocus', array()); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1, 'A'); + $frameset->addFrame($frame2, 'B'); + + $this->assertTrue($frameset->setFrameFocus('A')); + $this->assertEqual($frameset->getFrameFocus(), array('A')); + $this->assertEqual($frameset->getRaw(), 'Stuff1'); + + $this->assertTrue($frameset->setFrameFocusByIndex(2)); + $this->assertEqual($frameset->getFrameFocus(), array('B')); + $this->assertEqual($frameset->getRaw(), 'Stuff2'); + + $this->assertFalse($frameset->setFrameFocus('z')); + + $frameset->clearFrameFocus(); + $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); + } +} + +class TestOfFramesetPageInterface extends UnitTestCase { + private $page_interface; + private $frameset_interface; + + function __construct() { + parent::__construct(); + $this->page_interface = $this->getPageMethods(); + $this->frameset_interface = $this->getFramesetMethods(); + } + + function assertListInAnyOrder($list, $expected) { + sort($list); + sort($expected); + $this->assertEqual($list, $expected); + } + + private function getPageMethods() { + $methods = array(); + foreach (get_class_methods('SimplePage') as $method) { + if (strtolower($method) == strtolower('SimplePage')) { + continue; + } + if (strtolower($method) == strtolower('getFrameset')) { + continue; + } + if (strncmp($method, '_', 1) == 0) { + continue; + } + if (in_array($method, array('setTitle', 'setBase', 'setForms', 'normalise', 'setFrames', 'addLink'))) { + continue; + } + $methods[] = $method; + } + return $methods; + } + + private function getFramesetMethods() { + $methods = array(); + foreach (get_class_methods('SimpleFrameset') as $method) { + if (strtolower($method) == strtolower('SimpleFrameset')) { + continue; + } + if (strncmp($method, '_', 1) == 0) { + continue; + } + if (strncmp($method, 'add', 3) == 0) { + continue; + } + $methods[] = $method; + } + return $methods; + } + + function testFramsetHasPageInterface() { + $difference = array(); + foreach ($this->page_interface as $method) { + if (! in_array($method, $this->frameset_interface)) { + $this->fail("No [$method] in Frameset class"); + return; + } + } + $this->pass('Frameset covers Page interface'); + } + + function testHeadersReadFromFrameIfInFocus() { + $frame = new MockSimplePage(); + $frame->setReturnValue('getUrl', new SimpleUrl('http://localhost/stuff')); + + $frame->setReturnValue('getRequest', 'POST stuff'); + $frame->setReturnValue('getMethod', 'POST'); + $frame->setReturnValue('getRequestData', array('a' => 'A')); + $frame->setReturnValue('getHeaders', 'Header: content'); + $frame->setReturnValue('getMimeType', 'text/xml'); + $frame->setReturnValue('getResponseCode', 401); + $frame->setReturnValue('getTransportError', 'Could not parse headers'); + $frame->setReturnValue('getAuthentication', 'Basic'); + $frame->setReturnValue('getRealm', 'Safe place'); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame); + $frameset->setFrameFocusByIndex(1); + + $url = new SimpleUrl('http://localhost/stuff'); + $url->setTarget(1); + $this->assertIdentical($frameset->getUrl(), $url); + + $this->assertIdentical($frameset->getRequest(), 'POST stuff'); + $this->assertIdentical($frameset->getMethod(), 'POST'); + $this->assertIdentical($frameset->getRequestData(), array('a' => 'A')); + $this->assertIdentical($frameset->getHeaders(), 'Header: content'); + $this->assertIdentical($frameset->getMimeType(), 'text/xml'); + $this->assertIdentical($frameset->getResponseCode(), 401); + $this->assertIdentical($frameset->getTransportError(), 'Could not parse headers'); + $this->assertIdentical($frameset->getAuthentication(), 'Basic'); + $this->assertIdentical($frameset->getRealm(), 'Safe place'); + } + + function testUrlsComeFromBothFrames() { + $page = new MockSimplePage(); + $page->expectNever('getUrls'); + + $frame1 = new MockSimplePage(); + $frame1->setReturnValue( + 'getUrls', + array('http://www.lastcraft.com/', 'http://myserver/')); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue( + 'getUrls', + array('http://www.lastcraft.com/', 'http://test/')); + + $frameset = new SimpleFrameset($page); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + $this->assertListInAnyOrder( + $frameset->getUrls(), + array('http://www.lastcraft.com/', 'http://myserver/', 'http://test/')); + } + + function testLabelledUrlsComeFromBothFrames() { + $frame1 = new MockSimplePage(); + $frame1->setReturnValue( + 'getUrlsByLabel', + array(new SimpleUrl('goodbye.php')), + array('a')); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue( + 'getUrlsByLabel', + array(new SimpleUrl('hello.php')), + array('a')); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2, 'Two'); + + $expected1 = new SimpleUrl('goodbye.php'); + $expected1->setTarget(1); + $expected2 = new SimpleUrl('hello.php'); + $expected2->setTarget('Two'); + $this->assertEqual( + $frameset->getUrlsByLabel('a'), + array($expected1, $expected2)); + } + + function testUrlByIdComesFromFirstFrameToRespond() { + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getUrlById', new SimpleUrl('four.php'), array(4)); + $frame1->setReturnValue('getUrlById', false, array(5)); + + $frame2 = new MockSimplePage(); + $frame2->setReturnValue('getUrlById', false, array(4)); + $frame2->setReturnValue('getUrlById', new SimpleUrl('five.php'), array(5)); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1); + $frameset->addFrame($frame2); + + $four = new SimpleUrl('four.php'); + $four->setTarget(1); + $this->assertEqual($frameset->getUrlById(4), $four); + $five = new SimpleUrl('five.php'); + $five->setTarget(2); + $this->assertEqual($frameset->getUrlById(5), $five); + } + + function testReadUrlsFromFrameInFocus() { + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getUrls', array('a')); + $frame1->setReturnValue('getUrlsByLabel', array(new SimpleUrl('l'))); + $frame1->setReturnValue('getUrlById', new SimpleUrl('i')); + + $frame2 = new MockSimplePage(); + $frame2->expectNever('getUrls'); + $frame2->expectNever('getUrlsByLabel'); + $frame2->expectNever('getUrlById'); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1, 'A'); + $frameset->addFrame($frame2, 'B'); + $frameset->setFrameFocus('A'); + + $this->assertIdentical($frameset->getUrls(), array('a')); + $expected = new SimpleUrl('l'); + $expected->setTarget('A'); + $this->assertIdentical($frameset->getUrlsByLabel('label'), array($expected)); + $expected = new SimpleUrl('i'); + $expected->setTarget('A'); + $this->assertIdentical($frameset->getUrlById(99), $expected); + } + + function testReadFrameTaggedUrlsFromFrameInFocus() { + $frame = new MockSimplePage(); + + $by_label = new SimpleUrl('l'); + $by_label->setTarget('L'); + $frame->setReturnValue('getUrlsByLabel', array($by_label)); + + $by_id = new SimpleUrl('i'); + $by_id->setTarget('I'); + $frame->setReturnValue('getUrlById', $by_id); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame, 'A'); + $frameset->setFrameFocus('A'); + + $this->assertIdentical($frameset->getUrlsByLabel('label'), array($by_label)); + $this->assertIdentical($frameset->getUrlById(99), $by_id); + } + + function testFindingFormsById() { + $frame = new MockSimplePage(); + $form = new MockSimpleForm(); + $frame->returns('getFormById', $form, array('a')); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame(new MockSimplePage(), 'A'); + $frameset->addFrame($frame, 'B'); + $this->assertSame($frameset->getFormById('a'), $form); + + $frameset->setFrameFocus('A'); + $this->assertNull($frameset->getFormById('a')); + + $frameset->setFrameFocus('B'); + $this->assertSame($frameset->getFormById('a'), $form); + } + + function testFindingFormsBySubmit() { + $frame = new MockSimplePage(); + $form = new MockSimpleForm(); + $frame->returns( + 'getFormBySubmit', + $form, + array(new SimpleByLabel('a'))); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame(new MockSimplePage(), 'A'); + $frameset->addFrame($frame, 'B'); + $this->assertSame($frameset->getFormBySubmit(new SimpleByLabel('a')), $form); + + $frameset->setFrameFocus('A'); + $this->assertNull($frameset->getFormBySubmit(new SimpleByLabel('a'))); + + $frameset->setFrameFocus('B'); + $this->assertSame($frameset->getFormBySubmit(new SimpleByLabel('a')), $form); + } + + function testFindingFormsByImage() { + $frame = new MockSimplePage(); + $form = new MockSimpleForm(); + $frame->returns( + 'getFormByImage', + $form, + array(new SimpleByLabel('a'))); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame(new MockSimplePage(), 'A'); + $frameset->addFrame($frame, 'B'); + $this->assertSame($frameset->getFormByImage(new SimpleByLabel('a')), $form); + + $frameset->setFrameFocus('A'); + $this->assertNull($frameset->getFormByImage(new SimpleByLabel('a'))); + + $frameset->setFrameFocus('B'); + $this->assertSame($frameset->getFormByImage(new SimpleByLabel('a')), $form); + } + + function testSettingAllFrameFieldsWhenNoFrameFocus() { + $frame1 = new MockSimplePage(); + $frame1->expectOnce('setField', array(new SimpleById(22), 'A')); + + $frame2 = new MockSimplePage(); + $frame2->expectOnce('setField', array(new SimpleById(22), 'A')); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1, 'A'); + $frameset->addFrame($frame2, 'B'); + $frameset->setField(new SimpleById(22), 'A'); + } + + function testOnlySettingFieldFromFocusedFrame() { + $frame1 = new MockSimplePage(); + $frame1->expectOnce('setField', array(new SimpleByLabelOrName('a'), 'A')); + + $frame2 = new MockSimplePage(); + $frame2->expectNever('setField'); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1, 'A'); + $frameset->addFrame($frame2, 'B'); + $frameset->setFrameFocus('A'); + $frameset->setField(new SimpleByLabelOrName('a'), 'A'); + } + + function testOnlyGettingFieldFromFocusedFrame() { + $frame1 = new MockSimplePage(); + $frame1->setReturnValue('getField', 'f', array(new SimpleByName('a'))); + + $frame2 = new MockSimplePage(); + $frame2->expectNever('getField'); + + $frameset = new SimpleFrameset(new MockSimplePage()); + $frameset->addFrame($frame1, 'A'); + $frameset->addFrame($frame2, 'B'); + $frameset->setFrameFocus('A'); + $this->assertIdentical($frameset->getField(new SimpleByName('a')), 'f'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/http_test.php b/webdata/stdlibs/simpletest/test/http_test.php new file mode 100644 index 0000000..bd3fdd0 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/http_test.php @@ -0,0 +1,492 @@ +expectAt(0, 'write', array("GET /here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); + $this->assertSame($route->createConnection('GET', 15), $socket); + } + + function testDefaultPostRequest() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("POST /here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); + + $route->createConnection('POST', 15); + } + + function testDefaultDeleteRequest() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("DELETE /here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); + $this->assertSame($route->createConnection('DELETE', 15), $socket); + } + + function testDefaultHeadRequest() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("HEAD /here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); + $this->assertSame($route->createConnection('HEAD', 15), $socket); + } + + function testGetWithPort() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET /here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host:81\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host:81/here.html')); + + $route->createConnection('GET', 15); + } + + function testGetWithParameters() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET /here.html?a=1&b=2 HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct(new SimpleUrl('http://a.valid.host/here.html?a=1&b=2')); + + $route->createConnection('GET', 15); + } +} + +class TestOfProxyRoute extends UnitTestCase { + + function testDefaultGet() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleProxyRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct( + new SimpleUrl('http://a.valid.host/here.html'), + new SimpleUrl('http://my-proxy')); + $route->createConnection('GET', 15); + } + + function testDefaultPost() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("POST http://a.valid.host/here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleProxyRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct( + new SimpleUrl('http://a.valid.host/here.html'), + new SimpleUrl('http://my-proxy')); + $route->createConnection('POST', 15); + } + + function testGetWithPort() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET http://a.valid.host:81/here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: my-proxy:8081\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleProxyRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct( + new SimpleUrl('http://a.valid.host:81/here.html'), + new SimpleUrl('http://my-proxy:8081')); + $route->createConnection('GET', 15); + } + + function testGetWithParameters() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html?a=1&b=2 HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); + $socket->expectAt(2, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 3); + + $route = new PartialSimpleProxyRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct( + new SimpleUrl('http://a.valid.host/here.html?a=1&b=2'), + new SimpleUrl('http://my-proxy')); + $route->createConnection('GET', 15); + } + + function testGetWithAuthentication() { + $encoded = base64_encode('Me:Secret'); + + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html HTTP/1.0\r\n")); + $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); + $socket->expectAt(2, 'write', array("Proxy-Authorization: Basic $encoded\r\n")); + $socket->expectAt(3, 'write', array("Connection: close\r\n")); + $socket->expectCallCount('write', 4); + + $route = new PartialSimpleProxyRoute(); + $route->setReturnReference('createSocket', $socket); + $route->__construct( + new SimpleUrl('http://a.valid.host/here.html'), + new SimpleUrl('http://my-proxy'), + 'Me', + 'Secret'); + $route->createConnection('GET', 15); + } +} + +class TestOfHttpRequest extends UnitTestCase { + + function testReadingBadConnection() { + $socket = new MockSimpleSocket(); + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); + $reponse = $request->fetch(15); + $this->assertTrue($reponse->isError()); + } + + function testReadingGoodConnection() { + $socket = new MockSimpleSocket(); + $socket->expectOnce('write', array("\r\n")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('GET', 15)); + + $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } + + function testWritingAdditionalHeaders() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("My: stuff\r\n")); + $socket->expectAt(1, 'write', array("\r\n")); + $socket->expectCallCount('write', 2); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + + $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); + $request->addHeaderLine('My: stuff'); + $request->fetch(15); + } + + function testCookieWriting() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Cookie: a=A\r\n")); + $socket->expectAt(1, 'write', array("\r\n")); + $socket->expectCallCount('write', 2); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A'); + + $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); + $request->readCookiesFromJar($jar, new SimpleUrl('/')); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } + + function testMultipleCookieWriting() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Cookie: a=A;b=B\r\n")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A'); + $jar->setCookie('b', 'B'); + + $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); + $request->readCookiesFromJar($jar, new SimpleUrl('/')); + $request->fetch(15); + } + + function testReadingDeleteConnection() { + $socket = new MockSimpleSocket(); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('DELETE', 15)); + + $request = new SimpleHttpRequest($route, new SimpleDeleteEncoding()); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } +} + +class TestOfHttpPostRequest extends UnitTestCase { + + function testReadingBadConnectionCausesErrorBecauseOfDeadSocket() { + $socket = new MockSimpleSocket(); + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $request = new SimpleHttpRequest($route, new SimplePostEncoding()); + $reponse = $request->fetch(15); + $this->assertTrue($reponse->isError()); + } + + function testReadingGoodConnection() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 0\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); + $socket->expectAt(2, 'write', array("\r\n")); + $socket->expectAt(3, 'write', array("")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('POST', 15)); + + $request = new SimpleHttpRequest($route, new SimplePostEncoding()); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } + + function testContentHeadersCalculatedWithUrlEncodedParams() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 3\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); + $socket->expectAt(2, 'write', array("\r\n")); + $socket->expectAt(3, 'write', array("a=A")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('POST', 15)); + + $request = new SimpleHttpRequest( + $route, + new SimplePostEncoding(array('a' => 'A'))); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } + + function testContentHeadersCalculatedWithRawEntityBody() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 8\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: text/plain\r\n")); + $socket->expectAt(2, 'write', array("\r\n")); + $socket->expectAt(3, 'write', array("raw body")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('POST', 15)); + + $request = new SimpleHttpRequest( + $route, + new SimplePostEncoding('raw body')); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } + + function testContentHeadersCalculatedWithXmlEntityBody() { + $socket = new MockSimpleSocket(); + $socket->expectAt(0, 'write', array("Content-Length: 27\r\n")); + $socket->expectAt(1, 'write', array("Content-Type: text/xml\r\n")); + $socket->expectAt(2, 'write', array("\r\n")); + $socket->expectAt(3, 'write', array("onetwo")); + + $route = new MockSimpleRoute(); + $route->setReturnReference('createConnection', $socket); + $route->expect('createConnection', array('POST', 15)); + + $request = new SimpleHttpRequest( + $route, + new SimplePostEncoding('onetwo', 'text/xml')); + $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); + } +} + +class TestOfHttpHeaders extends UnitTestCase { + + function testParseBasicHeaders() { + $headers = new SimpleHttpHeaders( + "HTTP/1.1 200 OK\r\n" . + "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n" . + "Content-Type: text/plain\r\n" . + "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\n" . + "Connection: close"); + $this->assertIdentical($headers->getHttpVersion(), "1.1"); + $this->assertIdentical($headers->getResponseCode(), 200); + $this->assertEqual($headers->getMimeType(), "text/plain"); + } + + function testNonStandardResponseHeader() { + $headers = new SimpleHttpHeaders( + "HTTP/1.1 302 (HTTP-Version SP Status-Code CRLF)\r\n" . + "Connection: close"); + $this->assertIdentical($headers->getResponseCode(), 302); + } + + function testCanParseMultipleCookies() { + $jar = new MockSimpleCookieJar(); + $jar->expectAt(0, 'setCookie', array('a', 'aaa', 'host', '/here/', 'Wed, 25 Dec 2002 04:24:20 GMT')); + $jar->expectAt(1, 'setCookie', array('b', 'bbb', 'host', '/', false)); + + $headers = new SimpleHttpHeaders( + "HTTP/1.1 200 OK\r\n" . + "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n" . + "Content-Type: text/plain\r\n" . + "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\n" . + "Set-Cookie: a=aaa; expires=Wed, 25-Dec-02 04:24:20 GMT; path=/here/\r\n" . + "Set-Cookie: b=bbb\r\n" . + "Connection: close"); + $headers->writeCookiesToJar($jar, new SimpleUrl('http://host')); + } + + function testCanRecogniseRedirect() { + $headers = new SimpleHttpHeaders("HTTP/1.1 301 OK\r\n" . + "Content-Type: text/plain\r\n" . + "Content-Length: 0\r\n" . + "Location: http://www.somewhere-else.com/\r\n" . + "Connection: close"); + $this->assertIdentical($headers->getResponseCode(), 301); + $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com/"); + $this->assertTrue($headers->isRedirect()); + } + + function testCanParseChallenge() { + $headers = new SimpleHttpHeaders("HTTP/1.1 401 Authorization required\r\n" . + "Content-Type: text/plain\r\n" . + "Connection: close\r\n" . + "WWW-Authenticate: Basic realm=\"Somewhere\""); + $this->assertEqual($headers->getAuthentication(), 'Basic'); + $this->assertEqual($headers->getRealm(), 'Somewhere'); + $this->assertTrue($headers->isChallenge()); + } +} + +class TestOfHttpResponse extends UnitTestCase { + + function testBadRequest() { + $socket = new MockSimpleSocket(); + $socket->setReturnValue('getSent', ''); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $this->assertTrue($response->isError()); + $this->assertPattern('/Nothing fetched/', $response->getError()); + $this->assertIdentical($response->getContent(), false); + $this->assertIdentical($response->getSent(), ''); + } + + function testBadSocketDuringResponse() { + $socket = new MockSimpleSocket(); + $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\n"); + $socket->setReturnValueAt(1, "read", "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); + $socket->setReturnValue("read", ""); + $socket->setReturnValue('getSent', 'HTTP/1.1 ...'); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $this->assertTrue($response->isError()); + $this->assertEqual($response->getContent(), ''); + $this->assertEqual($response->getSent(), 'HTTP/1.1 ...'); + } + + function testIncompleteHeader() { + $socket = new MockSimpleSocket(); + $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\n"); + $socket->setReturnValueAt(1, "read", "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); + $socket->setReturnValueAt(2, "read", "Content-Type: text/plain\r\n"); + $socket->setReturnValue("read", ""); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $this->assertTrue($response->isError()); + $this->assertEqual($response->getContent(), ""); + } + + function testParseOfResponseHeadersWhenChunked() { + $socket = new MockSimpleSocket(); + $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\nDate: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); + $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); + $socket->setReturnValueAt(2, "read", "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\nConne"); + $socket->setReturnValueAt(3, "read", "ction: close\r\n\r\nthis is a test file\n"); + $socket->setReturnValueAt(4, "read", "with two lines in it\n"); + $socket->setReturnValue("read", ""); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $this->assertFalse($response->isError()); + $this->assertEqual( + $response->getContent(), + "this is a test file\nwith two lines in it\n"); + $headers = $response->getHeaders(); + $this->assertIdentical($headers->getHttpVersion(), "1.1"); + $this->assertIdentical($headers->getResponseCode(), 200); + $this->assertEqual($headers->getMimeType(), "text/plain"); + $this->assertFalse($headers->isRedirect()); + $this->assertFalse($headers->getLocation()); + } + + function testRedirect() { + $socket = new MockSimpleSocket(); + $socket->setReturnValueAt(0, "read", "HTTP/1.1 301 OK\r\n"); + $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); + $socket->setReturnValueAt(2, "read", "Location: http://www.somewhere-else.com/\r\n"); + $socket->setReturnValueAt(3, "read", "Connection: close\r\n"); + $socket->setReturnValueAt(4, "read", "\r\n"); + $socket->setReturnValue("read", ""); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $headers = $response->getHeaders(); + $this->assertTrue($headers->isRedirect()); + $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com/"); + } + + function testRedirectWithPort() { + $socket = new MockSimpleSocket(); + $socket->setReturnValueAt(0, "read", "HTTP/1.1 301 OK\r\n"); + $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); + $socket->setReturnValueAt(2, "read", "Location: http://www.somewhere-else.com:80/\r\n"); + $socket->setReturnValueAt(3, "read", "Connection: close\r\n"); + $socket->setReturnValueAt(4, "read", "\r\n"); + $socket->setReturnValue("read", ""); + + $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); + $headers = $response->getHeaders(); + $this->assertTrue($headers->isRedirect()); + $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com:80/"); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/interfaces_test.php b/webdata/stdlibs/simpletest/test/interfaces_test.php new file mode 100644 index 0000000..ab30fe4 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/interfaces_test.php @@ -0,0 +1,137 @@ +=')) { + include(dirname(__FILE__) . '/interfaces_test_php5_1.php'); +} + +interface DummyInterface { + function aMethod(); + function anotherMethod($a); + function &referenceMethod(&$a); +} + +Mock::generate('DummyInterface'); +Mock::generatePartial('DummyInterface', 'PartialDummyInterface', array()); + +class TestOfMockInterfaces extends UnitTestCase { + + function testCanMockAnInterface() { + $mock = new MockDummyInterface(); + $this->assertIsA($mock, 'SimpleMock'); + $this->assertIsA($mock, 'MockDummyInterface'); + $this->assertTrue(method_exists($mock, 'aMethod')); + $this->assertTrue(method_exists($mock, 'anotherMethod')); + $this->assertNull($mock->aMethod()); + } + + function testMockedInterfaceExpectsParameters() { + $mock = new MockDummyInterface(); + $this->expectError(); + $mock->anotherMethod(); + } + + function testCannotPartiallyMockAnInterface() { + $this->assertFalse(class_exists('PartialDummyInterface')); + } +} + +class TestOfSpl extends UnitTestCase { + + function skip() { + $this->skipUnless(function_exists('spl_classes'), 'No SPL module loaded'); + } + + function testCanMockAllSplClasses() { + if (! function_exists('spl_classes')) { + return; + } + foreach(spl_classes() as $class) { + if ($class == 'SplHeap' or $class = 'SplFileObject') { + continue; + } + if (version_compare(PHP_VERSION, '5.1', '<') && + $class == 'CachingIterator' || + $class == 'CachingRecursiveIterator' || + $class == 'FilterIterator' || + $class == 'LimitIterator' || + $class == 'ParentIterator') { + // These iterators require an iterator be passed to them during + // construction in PHP 5.0; there is no way for SimpleTest + // to supply such an iterator, however, so support for it is + // disabled. + continue; + } + $mock_class = "Mock$class"; + Mock::generate($class); + $this->assertIsA(new $mock_class(), $mock_class); + } + } + + function testExtensionOfCommonSplClasses() { + Mock::generate('IteratorImplementation'); + $this->assertIsA( + new IteratorImplementation(), + 'IteratorImplementation'); + Mock::generate('IteratorAggregateImplementation'); + $this->assertIsA( + new IteratorAggregateImplementation(), + 'IteratorAggregateImplementation'); + } +} + +class WithHint { + function hinted(DummyInterface $object) { } +} + +class ImplementsDummy implements DummyInterface { + function aMethod() { } + function anotherMethod($a) { } + function &referenceMethod(&$a) { } + function extraMethod($a = false) { } +} +Mock::generate('ImplementsDummy'); + +class TestOfImplementations extends UnitTestCase { + + function testMockedInterfaceCanPassThroughTypeHint() { + $mock = new MockDummyInterface(); + $hinter = new WithHint(); + $hinter->hinted($mock); + } + + function testImplementedInterfacesAreCarried() { + $mock = new MockImplementsDummy(); + $hinter = new WithHint(); + $hinter->hinted($mock); + } + + function testNoSpuriousWarningsWhenSkippingDefaultedParameter() { + $mock = new MockImplementsDummy(); + $mock->extraMethod(); + } +} + +interface SampleInterfaceWithConstruct { + function __construct($something); +} + +class TestOfInterfaceMocksWithConstruct extends UnitTestCase { + function TODO_testBasicConstructOfAnInterface() { // Fails in PHP 5.3dev + Mock::generate('SampleInterfaceWithConstruct'); + } +} + +interface SampleInterfaceWithClone { + function __clone(); +} + +class TestOfSampleInterfaceWithClone extends UnitTestCase { + function testCanMockWithoutErrors() { + Mock::generate('SampleInterfaceWithClone'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/interfaces_test_php5_1.php b/webdata/stdlibs/simpletest/test/interfaces_test_php5_1.php new file mode 100644 index 0000000..3d154f9 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/interfaces_test_php5_1.php @@ -0,0 +1,14 @@ +assertIsA($mock, 'SampleInterfaceWithHintInSignature'); + } +} + diff --git a/webdata/stdlibs/simpletest/test/live_test.php b/webdata/stdlibs/simpletest/test/live_test.php new file mode 100644 index 0000000..3fbb544 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/live_test.php @@ -0,0 +1,47 @@ +assertTrue($socket->isError()); + $this->assertPattern( + '/Cannot open \\[bad_url:111\\] with \\[/', + $socket->getError()); + $this->assertFalse($socket->isOpen()); + $this->assertFalse($socket->write('A message')); + } + + function testSocketClosure() { + $socket = new SimpleSocket('www.lastcraft.com', 80, 15, 8); + $this->assertTrue($socket->isOpen()); + $this->assertTrue($socket->write("GET /test/network_confirm.php HTTP/1.0\r\n")); + $socket->write("Host: www.lastcraft.com\r\n"); + $socket->write("Connection: close\r\n\r\n"); + $this->assertEqual($socket->read(), "HTTP/1.1"); + $socket->close(); + $this->assertIdentical($socket->read(), false); + } + + function testRecordOfSentCharacters() { + $socket = new SimpleSocket('www.lastcraft.com', 80, 15); + $this->assertTrue($socket->write("GET /test/network_confirm.php HTTP/1.0\r\n")); + $socket->write("Host: www.lastcraft.com\r\n"); + $socket->write("Connection: close\r\n\r\n"); + $socket->close(); + $this->assertEqual($socket->getSent(), + "GET /test/network_confirm.php HTTP/1.0\r\n" . + "Host: www.lastcraft.com\r\n" . + "Connection: close\r\n\r\n"); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/mock_objects_test.php b/webdata/stdlibs/simpletest/test/mock_objects_test.php new file mode 100644 index 0000000..7f31789 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/mock_objects_test.php @@ -0,0 +1,985 @@ +assertTrue($expectation->test(33)); + $this->assertTrue($expectation->test(false)); + $this->assertTrue($expectation->test(null)); + } +} + +class TestOfParametersExpectation extends UnitTestCase { + + function testEmptyMatch() { + $expectation = new ParametersExpectation(array()); + $this->assertTrue($expectation->test(array())); + $this->assertFalse($expectation->test(array(33))); + } + + function testSingleMatch() { + $expectation = new ParametersExpectation(array(0)); + $this->assertFalse($expectation->test(array(1))); + $this->assertTrue($expectation->test(array(0))); + } + + function testAnyMatch() { + $expectation = new ParametersExpectation(false); + $this->assertTrue($expectation->test(array())); + $this->assertTrue($expectation->test(array(1, 2))); + } + + function testMissingParameter() { + $expectation = new ParametersExpectation(array(0)); + $this->assertFalse($expectation->test(array())); + } + + function testNullParameter() { + $expectation = new ParametersExpectation(array(null)); + $this->assertTrue($expectation->test(array(null))); + $this->assertFalse($expectation->test(array())); + } + + function testAnythingExpectations() { + $expectation = new ParametersExpectation(array(new AnythingExpectation())); + $this->assertFalse($expectation->test(array())); + $this->assertIdentical($expectation->test(array(null)), true); + $this->assertIdentical($expectation->test(array(13)), true); + } + + function testOtherExpectations() { + $expectation = new ParametersExpectation( + array(new PatternExpectation('/hello/i'))); + $this->assertFalse($expectation->test(array('Goodbye'))); + $this->assertTrue($expectation->test(array('hello'))); + $this->assertTrue($expectation->test(array('Hello'))); + } + + function testIdentityOnly() { + $expectation = new ParametersExpectation(array("0")); + $this->assertFalse($expectation->test(array(0))); + $this->assertTrue($expectation->test(array("0"))); + } + + function testLongList() { + $expectation = new ParametersExpectation( + array("0", 0, new AnythingExpectation(), false)); + $this->assertTrue($expectation->test(array("0", 0, 37, false))); + $this->assertFalse($expectation->test(array("0", 0, 37, true))); + $this->assertFalse($expectation->test(array("0", 0, 37))); + } +} + +class TestOfSimpleSignatureMap extends UnitTestCase { + + function testEmpty() { + $map = new SimpleSignatureMap(); + $this->assertFalse($map->isMatch("any", array())); + $this->assertNull($map->findFirstAction("any", array())); + } + + function testDifferentCallSignaturesCanHaveDifferentReferences() { + $map = new SimpleSignatureMap(); + $fred = 'Fred'; + $jim = 'jim'; + $map->add(array(0), $fred); + $map->add(array('0'), $jim); + $this->assertSame($fred, $map->findFirstAction(array(0))); + $this->assertSame($jim, $map->findFirstAction(array('0'))); + } + + function testWildcard() { + $fred = 'Fred'; + $map = new SimpleSignatureMap(); + $map->add(array(new AnythingExpectation(), 1, 3), $fred); + $this->assertTrue($map->isMatch(array(2, 1, 3))); + $this->assertSame($map->findFirstAction(array(2, 1, 3)), $fred); + } + + function testAllWildcard() { + $fred = 'Fred'; + $map = new SimpleSignatureMap(); + $this->assertFalse($map->isMatch(array(2, 1, 3))); + $map->add('', $fred); + $this->assertTrue($map->isMatch(array(2, 1, 3))); + $this->assertSame($map->findFirstAction(array(2, 1, 3)), $fred); + } + + function testOrdering() { + $map = new SimpleSignatureMap(); + $map->add(array(1, 2), new SimpleByValue("1, 2")); + $map->add(array(1, 3), new SimpleByValue("1, 3")); + $map->add(array(1), new SimpleByValue("1")); + $map->add(array(1, 4), new SimpleByValue("1, 4")); + $map->add(array(new AnythingExpectation()), new SimpleByValue("Any")); + $map->add(array(2), new SimpleByValue("2")); + $map->add("", new SimpleByValue("Default")); + $map->add(array(), new SimpleByValue("None")); + $this->assertEqual($map->findFirstAction(array(1, 2)), new SimpleByValue("1, 2")); + $this->assertEqual($map->findFirstAction(array(1, 3)), new SimpleByValue("1, 3")); + $this->assertEqual($map->findFirstAction(array(1, 4)), new SimpleByValue("1, 4")); + $this->assertEqual($map->findFirstAction(array(1)), new SimpleByValue("1")); + $this->assertEqual($map->findFirstAction(array(2)), new SimpleByValue("Any")); + $this->assertEqual($map->findFirstAction(array(3)), new SimpleByValue("Any")); + $this->assertEqual($map->findFirstAction(array()), new SimpleByValue("Default")); + } +} + +class TestOfCallSchedule extends UnitTestCase { + function testCanBeSetToAlwaysReturnTheSameReference() { + $a = 5; + $schedule = new SimpleCallSchedule(); + $schedule->register('aMethod', false, new SimpleByReference($a)); + $this->assertReference($schedule->respond(0, 'aMethod', array()), $a); + $this->assertReference($schedule->respond(1, 'aMethod', array()), $a); + } + + function testSpecificSignaturesOverrideTheAlwaysCase() { + $any = 'any'; + $one = 'two'; + $schedule = new SimpleCallSchedule(); + $schedule->register('aMethod', array(1), new SimpleByReference($one)); + $schedule->register('aMethod', false, new SimpleByReference($any)); + $this->assertReference($schedule->respond(0, 'aMethod', array(2)), $any); + $this->assertReference($schedule->respond(0, 'aMethod', array(1)), $one); + } + + function testReturnsCanBeSetOverTime() { + $one = 'one'; + $two = 'two'; + $schedule = new SimpleCallSchedule(); + $schedule->registerAt(0, 'aMethod', false, new SimpleByReference($one)); + $schedule->registerAt(1, 'aMethod', false, new SimpleByReference($two)); + $this->assertReference($schedule->respond(0, 'aMethod', array()), $one); + $this->assertReference($schedule->respond(1, 'aMethod', array()), $two); + } + + function testReturnsOverTimecanBeAlteredByTheArguments() { + $one = '1'; + $two = '2'; + $two_a = '2a'; + $schedule = new SimpleCallSchedule(); + $schedule->registerAt(0, 'aMethod', false, new SimpleByReference($one)); + $schedule->registerAt(1, 'aMethod', array('a'), new SimpleByReference($two_a)); + $schedule->registerAt(1, 'aMethod', false, new SimpleByReference($two)); + $this->assertReference($schedule->respond(0, 'aMethod', array()), $one); + $this->assertReference($schedule->respond(1, 'aMethod', array()), $two); + $this->assertReference($schedule->respond(1, 'aMethod', array('a')), $two_a); + } + + function testCanReturnByValue() { + $a = 5; + $schedule = new SimpleCallSchedule(); + $schedule->register('aMethod', false, new SimpleByValue($a)); + $this->assertCopy($schedule->respond(0, 'aMethod', array()), $a); + } + + function testCanThrowException() { + if (version_compare(phpversion(), '5', '>=')) { + $schedule = new SimpleCallSchedule(); + $schedule->register('aMethod', false, new SimpleThrower(new Exception('Ouch'))); + $this->expectException(new Exception('Ouch')); + $schedule->respond(0, 'aMethod', array()); + } + } + + function testCanEmitError() { + $schedule = new SimpleCallSchedule(); + $schedule->register('aMethod', false, new SimpleErrorThrower('Ouch', E_USER_WARNING)); + $this->expectError('Ouch'); + $schedule->respond(0, 'aMethod', array()); + } +} + +class Dummy { + function Dummy() { + } + + function aMethod() { + return true; + } + + function &aReferenceMethod() { + return true; + } + + function anotherMethod() { + return true; + } +} +Mock::generate('Dummy'); +Mock::generate('Dummy', 'AnotherMockDummy'); +Mock::generate('Dummy', 'MockDummyWithExtraMethods', array('extraMethod')); + +class TestOfMockGeneration extends UnitTestCase { + + function testCloning() { + $mock = new MockDummy(); + $this->assertTrue(method_exists($mock, "aMethod")); + $this->assertNull($mock->aMethod()); + } + + function testCloningWithExtraMethod() { + $mock = new MockDummyWithExtraMethods(); + $this->assertTrue(method_exists($mock, "extraMethod")); + } + + function testCloningWithChosenClassName() { + $mock = new AnotherMockDummy(); + $this->assertTrue(method_exists($mock, "aMethod")); + } +} + +class TestOfMockReturns extends UnitTestCase { + + function testDefaultReturn() { + $mock = new MockDummy(); + $mock->returnsByValue("aMethod", "aaa"); + $this->assertIdentical($mock->aMethod(), "aaa"); + $this->assertIdentical($mock->aMethod(), "aaa"); + } + + function testParameteredReturn() { + $mock = new MockDummy(); + $mock->returnsByValue('aMethod', 'aaa', array(1, 2, 3)); + $this->assertNull($mock->aMethod()); + $this->assertIdentical($mock->aMethod(1, 2, 3), 'aaa'); + } + + function testSetReturnGivesObjectReference() { + $mock = new MockDummy(); + $object = new Dummy(); + $mock->returns('aMethod', $object, array(1, 2, 3)); + $this->assertSame($mock->aMethod(1, 2, 3), $object); + } + + function testSetReturnReferenceGivesOriginalReference() { + $mock = new MockDummy(); + $object = 1; + $mock->returnsByReference('aReferenceMethod', $object, array(1, 2, 3)); + $this->assertReference($mock->aReferenceMethod(1, 2, 3), $object); + } + + function testReturnValueCanBeChosenJustByPatternMatchingArguments() { + $mock = new MockDummy(); + $mock->returnsByValue( + "aMethod", + "aaa", + array(new PatternExpectation('/hello/i'))); + $this->assertIdentical($mock->aMethod('Hello'), 'aaa'); + $this->assertNull($mock->aMethod('Goodbye')); + } + + function testMultipleMethods() { + $mock = new MockDummy(); + $mock->returnsByValue("aMethod", 100, array(1)); + $mock->returnsByValue("aMethod", 200, array(2)); + $mock->returnsByValue("anotherMethod", 10, array(1)); + $mock->returnsByValue("anotherMethod", 20, array(2)); + $this->assertIdentical($mock->aMethod(1), 100); + $this->assertIdentical($mock->anotherMethod(1), 10); + $this->assertIdentical($mock->aMethod(2), 200); + $this->assertIdentical($mock->anotherMethod(2), 20); + } + + function testReturnSequence() { + $mock = new MockDummy(); + $mock->returnsByValueAt(0, "aMethod", "aaa"); + $mock->returnsByValueAt(1, "aMethod", "bbb"); + $mock->returnsByValueAt(3, "aMethod", "ddd"); + $this->assertIdentical($mock->aMethod(), "aaa"); + $this->assertIdentical($mock->aMethod(), "bbb"); + $this->assertNull($mock->aMethod()); + $this->assertIdentical($mock->aMethod(), "ddd"); + } + + function testSetReturnReferenceAtGivesOriginal() { + $mock = new MockDummy(); + $object = 100; + $mock->returnsByReferenceAt(1, "aReferenceMethod", $object); + $this->assertNull($mock->aReferenceMethod()); + $this->assertReference($mock->aReferenceMethod(), $object); + $this->assertNull($mock->aReferenceMethod()); + } + + function testReturnsAtGivesOriginalObjectHandle() { + $mock = new MockDummy(); + $object = new Dummy(); + $mock->returnsAt(1, "aMethod", $object); + $this->assertNull($mock->aMethod()); + $this->assertSame($mock->aMethod(), $object); + $this->assertNull($mock->aMethod()); + } + + function testComplicatedReturnSequence() { + $mock = new MockDummy(); + $object = new Dummy(); + $mock->returnsAt(1, "aMethod", "aaa", array("a")); + $mock->returnsAt(1, "aMethod", "bbb"); + $mock->returnsAt(2, "aMethod", $object, array('*', 2)); + $mock->returnsAt(2, "aMethod", "value", array('*', 3)); + $mock->returns("aMethod", 3, array(3)); + $this->assertNull($mock->aMethod()); + $this->assertEqual($mock->aMethod("a"), "aaa"); + $this->assertSame($mock->aMethod(1, 2), $object); + $this->assertEqual($mock->aMethod(3), 3); + $this->assertNull($mock->aMethod()); + } + + function testMultipleMethodSequences() { + $mock = new MockDummy(); + $mock->returnsByValueAt(0, "aMethod", "aaa"); + $mock->returnsByValueAt(1, "aMethod", "bbb"); + $mock->returnsByValueAt(0, "anotherMethod", "ccc"); + $mock->returnsByValueAt(1, "anotherMethod", "ddd"); + $this->assertIdentical($mock->aMethod(), "aaa"); + $this->assertIdentical($mock->anotherMethod(), "ccc"); + $this->assertIdentical($mock->aMethod(), "bbb"); + $this->assertIdentical($mock->anotherMethod(), "ddd"); + } + + function testSequenceFallback() { + $mock = new MockDummy(); + $mock->returnsByValueAt(0, "aMethod", "aaa", array('a')); + $mock->returnsByValueAt(1, "aMethod", "bbb", array('a')); + $mock->returnsByValue("aMethod", "AAA"); + $this->assertIdentical($mock->aMethod('a'), "aaa"); + $this->assertIdentical($mock->aMethod('b'), "AAA"); + } + + function testMethodInterference() { + $mock = new MockDummy(); + $mock->returnsByValueAt(0, "anotherMethod", "aaa"); + $mock->returnsByValue("aMethod", "AAA"); + $this->assertIdentical($mock->aMethod(), "AAA"); + $this->assertIdentical($mock->anotherMethod(), "aaa"); + } +} + +class TestOfMockExpectationsThatPass extends UnitTestCase { + + function testAnyArgument() { + $mock = new MockDummy(); + $mock->expect('aMethod', array('*')); + $mock->aMethod(1); + $mock->aMethod('hello'); + } + + function testAnyTwoArguments() { + $mock = new MockDummy(); + $mock->expect('aMethod', array('*', '*')); + $mock->aMethod(1, 2); + } + + function testSpecificArgument() { + $mock = new MockDummy(); + $mock->expect('aMethod', array(1)); + $mock->aMethod(1); + } + + function testExpectation() { + $mock = new MockDummy(); + $mock->expect('aMethod', array(new IsAExpectation('Dummy'))); + $mock->aMethod(new Dummy()); + } + + function testArgumentsInSequence() { + $mock = new MockDummy(); + $mock->expectAt(0, 'aMethod', array(1, 2)); + $mock->expectAt(1, 'aMethod', array(3, 4)); + $mock->aMethod(1, 2); + $mock->aMethod(3, 4); + } + + function testAtLeastOnceSatisfiedByOneCall() { + $mock = new MockDummy(); + $mock->expectAtLeastOnce('aMethod'); + $mock->aMethod(); + } + + function testAtLeastOnceSatisfiedByTwoCalls() { + $mock = new MockDummy(); + $mock->expectAtLeastOnce('aMethod'); + $mock->aMethod(); + $mock->aMethod(); + } + + function testOnceSatisfiedByOneCall() { + $mock = new MockDummy(); + $mock->expectOnce('aMethod'); + $mock->aMethod(); + } + + function testMinimumCallsSatisfiedByEnoughCalls() { + $mock = new MockDummy(); + $mock->expectMinimumCallCount('aMethod', 1); + $mock->aMethod(); + } + + function testMinimumCallsSatisfiedByTooManyCalls() { + $mock = new MockDummy(); + $mock->expectMinimumCallCount('aMethod', 3); + $mock->aMethod(); + $mock->aMethod(); + $mock->aMethod(); + $mock->aMethod(); + } + + function testMaximumCallsSatisfiedByEnoughCalls() { + $mock = new MockDummy(); + $mock->expectMaximumCallCount('aMethod', 1); + $mock->aMethod(); + } + + function testMaximumCallsSatisfiedByNoCalls() { + $mock = new MockDummy(); + $mock->expectMaximumCallCount('aMethod', 1); + } +} + +class MockWithInjectedTestCase extends SimpleMock { + protected function getCurrentTestCase() { + return SimpleTest::getContext()->getTest()->getMockedTest(); + } +} +SimpleTest::setMockBaseClass('MockWithInjectedTestCase'); +Mock::generate('Dummy', 'MockDummyWithInjectedTestCase'); +SimpleTest::setMockBaseClass('SimpleMock'); +Mock::generate('SimpleTestCase'); + +class LikeExpectation extends IdenticalExpectation { + function __construct($expectation) { + $expectation->message = ''; + parent::__construct($expectation); + } + + function test($compare) { + $compare->message = ''; + return parent::test($compare); + } + + function testMessage($compare) { + $compare->message = ''; + return parent::testMessage($compare); + } +} + +class TestOfMockExpectations extends UnitTestCase { + private $test; + + function setUp() { + $this->test = new MockSimpleTestCase(); + } + + function getMockedTest() { + return $this->test; + } + + function testSettingExpectationOnNonMethodThrowsError() { + $mock = new MockDummyWithInjectedTestCase(); + $this->expectError(); + $mock->expectMaximumCallCount('aMissingMethod', 2); + } + + function testMaxCallsDetectsOverrun() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 2), 3)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectMaximumCallCount('aMethod', 2); + $mock->aMethod(); + $mock->aMethod(); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testTallyOnMaxCallsSendsPassOnUnderrun() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 2), 2)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectMaximumCallCount("aMethod", 2); + $mock->aMethod(); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testExpectNeverDetectsOverrun() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 0), 1)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectNever('aMethod'); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testTallyOnExpectNeverStillSendsPassOnUnderrun() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 0), 0)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectNever('aMethod'); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testMinCalls() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 2), 2)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectMinimumCallCount('aMethod', 2); + $mock->aMethod(); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testFailedNever() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 0), 1)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectNever('aMethod'); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testUnderOnce() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 1), 0)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectOnce('aMethod'); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testOverOnce() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 1), 2)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectOnce('aMethod'); + $mock->aMethod(); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testUnderAtLeastOnce() { + $this->test->expectOnce('assert', array(new MemberExpectation('count', 1), 0)); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectAtLeastOnce("aMethod"); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testZeroArguments() { + $this->test->expectOnce('assert', + array(new MemberExpectation('expected', array()), array(), '*')); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expect('aMethod', array()); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testExpectedArguments() { + $this->test->expectOnce('assert', + array(new MemberExpectation('expected', array(1, 2, 3)), array(1, 2, 3), '*')); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expect('aMethod', array(1, 2, 3)); + $mock->aMethod(1, 2, 3); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testFailedArguments() { + $this->test->expectOnce('assert', + array(new MemberExpectation('expected', array('this')), array('that'), '*')); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expect('aMethod', array('this')); + $mock->aMethod('that'); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testWildcardsAreTranslatedToAnythingExpectations() { + $this->test->expectOnce('assert', + array(new MemberExpectation('expected', + array(new AnythingExpectation(), + 123, + new AnythingExpectation())), + array(100, 123, 101), '*')); + $mock = new MockDummyWithInjectedTestCase($this); + $mock->expect("aMethod", array('*', 123, '*')); + $mock->aMethod(100, 123, 101); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testSpecificPassingSequence() { + $this->test->expectAt(0, 'assert', + array(new MemberExpectation('expected', array(1, 2, 3)), array(1, 2, 3), '*')); + $this->test->expectAt(1, 'assert', + array(new MemberExpectation('expected', array('Hello')), array('Hello'), '*')); + $mock = new MockDummyWithInjectedTestCase(); + $mock->expectAt(1, 'aMethod', array(1, 2, 3)); + $mock->expectAt(2, 'aMethod', array('Hello')); + $mock->aMethod(); + $mock->aMethod(1, 2, 3); + $mock->aMethod('Hello'); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } + + function testNonArrayForExpectedParametersGivesError() { + $mock = new MockDummyWithInjectedTestCase(); + $this->expectError(new PatternExpectation('/\$args.*not an array/i')); + $mock->expect("aMethod", "foo"); + $mock->aMethod(); + $mock->mock->atTestEnd('testSomething', $this->test); + } +} + +class TestOfMockComparisons extends UnitTestCase { + + function testEqualComparisonOfMocksDoesNotCrash() { + $expectation = new EqualExpectation(new MockDummy()); + $this->assertTrue($expectation->test(new MockDummy(), true)); + } + + function testIdenticalComparisonOfMocksDoesNotCrash() { + $expectation = new IdenticalExpectation(new MockDummy()); + $this->assertTrue($expectation->test(new MockDummy())); + } +} + +class ClassWithSpecialMethods { + function __get($name) { } + function __set($name, $value) { } + function __isset($name) { } + function __unset($name) { } + function __call($method, $arguments) { } + function __toString() { } +} +Mock::generate('ClassWithSpecialMethods'); + +class TestOfSpecialMethodsAfterPHP51 extends UnitTestCase { + + function skip() { + $this->skipIf(version_compare(phpversion(), '5.1', '<'), '__isset and __unset overloading not tested unless PHP 5.1+'); + } + + function testCanEmulateIsset() { + $mock = new MockClassWithSpecialMethods(); + $mock->returnsByValue('__isset', true); + $this->assertIdentical(isset($mock->a), true); + } + + function testCanExpectUnset() { + $mock = new MockClassWithSpecialMethods(); + $mock->expectOnce('__unset', array('a')); + unset($mock->a); + } + +} + +class TestOfSpecialMethods extends UnitTestCase { + function skip() { + $this->skipIf(version_compare(phpversion(), '5', '<'), 'Overloading not tested unless PHP 5+'); + } + + function testCanMockTheThingAtAll() { + $mock = new MockClassWithSpecialMethods(); + } + + function testReturnFromSpecialAccessor() { + $mock = new MockClassWithSpecialMethods(); + $mock->returnsByValue('__get', '1st Return', array('first')); + $mock->returnsByValue('__get', '2nd Return', array('second')); + $this->assertEqual($mock->first, '1st Return'); + $this->assertEqual($mock->second, '2nd Return'); + } + + function testcanExpectTheSettingOfValue() { + $mock = new MockClassWithSpecialMethods(); + $mock->expectOnce('__set', array('a', 'A')); + $mock->a = 'A'; + } + + function testCanSimulateAnOverloadmethod() { + $mock = new MockClassWithSpecialMethods(); + $mock->expectOnce('__call', array('amOverloaded', array('A'))); + $mock->returnsByValue('__call', 'aaa'); + $this->assertIdentical($mock->amOverloaded('A'), 'aaa'); + } + + function testToStringMagic() { + $mock = new MockClassWithSpecialMethods(); + $mock->expectOnce('__toString'); + $mock->returnsByValue('__toString', 'AAA'); + ob_start(); + print $mock; + $output = ob_get_contents(); + ob_end_clean(); + $this->assertEqual($output, 'AAA'); + } +} + +class WithStaticMethod { + static function aStaticMethod() { } +} +Mock::generate('WithStaticMethod'); + +class TestOfMockingClassesWithStaticMethods extends UnitTestCase { + + function testStaticMethodIsMockedAsStatic() { + $mock = new WithStaticMethod(); + $reflection = new ReflectionClass($mock); + $method = $reflection->getMethod('aStaticMethod'); + $this->assertTrue($method->isStatic()); + } +} + +class MockTestException extends Exception { } + +class TestOfThrowingExceptionsFromMocks extends UnitTestCase { + + function testCanThrowOnMethodCall() { + $mock = new MockDummy(); + $mock->throwOn('aMethod'); + $this->expectException(); + $mock->aMethod(); + } + + function testCanThrowSpecificExceptionOnMethodCall() { + $mock = new MockDummy(); + $mock->throwOn('aMethod', new MockTestException()); + $this->expectException(); + $mock->aMethod(); + } + + function testThrowsOnlyWhenCallSignatureMatches() { + $mock = new MockDummy(); + $mock->throwOn('aMethod', new MockTestException(), array(3)); + $mock->aMethod(1); + $mock->aMethod(2); + $this->expectException(); + $mock->aMethod(3); + } + + function testCanThrowOnParticularInvocation() { + $mock = new MockDummy(); + $mock->throwAt(2, 'aMethod', new MockTestException()); + $mock->aMethod(); + $mock->aMethod(); + $this->expectException(); + $mock->aMethod(); + } +} + +class TestOfThrowingErrorsFromMocks extends UnitTestCase { + + function testCanGenerateErrorFromMethodCall() { + $mock = new MockDummy(); + $mock->errorOn('aMethod', 'Ouch!'); + $this->expectError('Ouch!'); + $mock->aMethod(); + } + + function testGeneratesErrorOnlyWhenCallSignatureMatches() { + $mock = new MockDummy(); + $mock->errorOn('aMethod', 'Ouch!', array(3)); + $mock->aMethod(1); + $mock->aMethod(2); + $this->expectError(); + $mock->aMethod(3); + } + + function testCanGenerateErrorOnParticularInvocation() { + $mock = new MockDummy(); + $mock->errorAt(2, 'aMethod', 'Ouch!'); + $mock->aMethod(); + $mock->aMethod(); + $this->expectError(); + $mock->aMethod(); + } +} + +Mock::generatePartial('Dummy', 'TestDummy', array('anotherMethod', 'aReferenceMethod')); + +class TestOfPartialMocks extends UnitTestCase { + + function testMethodReplacementWithNoBehaviourReturnsNull() { + $mock = new TestDummy(); + $this->assertEqual($mock->aMethod(99), 99); + $this->assertNull($mock->anotherMethod()); + } + + function testSettingReturns() { + $mock = new TestDummy(); + $mock->returnsByValue('anotherMethod', 33, array(3)); + $mock->returnsByValue('anotherMethod', 22); + $mock->returnsByValueAt(2, 'anotherMethod', 44, array(3)); + $this->assertEqual($mock->anotherMethod(), 22); + $this->assertEqual($mock->anotherMethod(3), 33); + $this->assertEqual($mock->anotherMethod(3), 44); + } + + function testSetReturnReferenceGivesOriginal() { + $mock = new TestDummy(); + $object = 99; + $mock->returnsByReferenceAt(0, 'aReferenceMethod', $object, array(3)); + $this->assertReference($mock->aReferenceMethod(3), $object); + } + + function testReturnsAtGivesOriginalObjectHandle() { + $mock = new TestDummy(); + $object = new Dummy(); + $mock->returnsAt(0, 'anotherMethod', $object, array(3)); + $this->assertSame($mock->anotherMethod(3), $object); + } + + function testExpectations() { + $mock = new TestDummy(); + $mock->expectCallCount('anotherMethod', 2); + $mock->expect('anotherMethod', array(77)); + $mock->expectAt(1, 'anotherMethod', array(66)); + $mock->anotherMethod(77); + $mock->anotherMethod(66); + } + + function testSettingExpectationOnMissingMethodThrowsError() { + $mock = new TestDummy(); + $this->expectError(); + $mock->expectCallCount('aMissingMethod', 2); + } +} + +class ConstructorSuperClass { + function ConstructorSuperClass() { } +} + +class ConstructorSubClass extends ConstructorSuperClass { } + +class TestOfPHP4StyleSuperClassConstruct extends UnitTestCase { + function testBasicConstruct() { + Mock::generate('ConstructorSubClass'); + $mock = new MockConstructorSubClass(); + $this->assertIsA($mock, 'ConstructorSubClass'); + $this->assertTrue(method_exists($mock, 'ConstructorSuperClass')); + } +} + +class TestOfPHP5StaticMethodMocking extends UnitTestCase { + function testCanCreateAMockObjectWithStaticMethodsWithoutError() { + eval(' + class SimpleObjectContainingStaticMethod { + static function someStatic() { } + } + '); + Mock::generate('SimpleObjectContainingStaticMethod'); + } +} + +class TestOfPHP5AbstractMethodMocking extends UnitTestCase { + function testCanCreateAMockObjectFromAnAbstractWithProperFunctionDeclarations() { + eval(' + abstract class SimpleAbstractClassContainingAbstractMethods { + abstract function anAbstract(); + abstract function anAbstractWithParameter($foo); + abstract function anAbstractWithMultipleParameters($foo, $bar); + } + '); + Mock::generate('SimpleAbstractClassContainingAbstractMethods'); + $this->assertTrue( + method_exists( + // Testing with class name alone does not work in PHP 5.0 + new MockSimpleAbstractClassContainingAbstractMethods, + 'anAbstract' + ) + ); + $this->assertTrue( + method_exists( + new MockSimpleAbstractClassContainingAbstractMethods, + 'anAbstractWithParameter' + ) + ); + $this->assertTrue( + method_exists( + new MockSimpleAbstractClassContainingAbstractMethods, + 'anAbstractWithMultipleParameters' + ) + ); + } + + function testMethodsDefinedAsAbstractInParentShouldHaveFullSignature() { + eval(' + abstract class SimpleParentAbstractClassContainingAbstractMethods { + abstract function anAbstract(); + abstract function anAbstractWithParameter($foo); + abstract function anAbstractWithMultipleParameters($foo, $bar); + } + + class SimpleChildAbstractClassContainingAbstractMethods extends SimpleParentAbstractClassContainingAbstractMethods { + function anAbstract(){} + function anAbstractWithParameter($foo){} + function anAbstractWithMultipleParameters($foo, $bar){} + } + + class EvenDeeperEmptyChildClass extends SimpleChildAbstractClassContainingAbstractMethods {} + '); + Mock::generate('SimpleChildAbstractClassContainingAbstractMethods'); + $this->assertTrue( + method_exists( + new MockSimpleChildAbstractClassContainingAbstractMethods, + 'anAbstract' + ) + ); + $this->assertTrue( + method_exists( + new MockSimpleChildAbstractClassContainingAbstractMethods, + 'anAbstractWithParameter' + ) + ); + $this->assertTrue( + method_exists( + new MockSimpleChildAbstractClassContainingAbstractMethods, + 'anAbstractWithMultipleParameters' + ) + ); + Mock::generate('EvenDeeperEmptyChildClass'); + $this->assertTrue( + method_exists( + new MockEvenDeeperEmptyChildClass, + 'anAbstract' + ) + ); + $this->assertTrue( + method_exists( + new MockEvenDeeperEmptyChildClass, + 'anAbstractWithParameter' + ) + ); + $this->assertTrue( + method_exists( + new MockEvenDeeperEmptyChildClass, + 'anAbstractWithMultipleParameters' + ) + ); + } +} + +class DummyWithProtected +{ + public function aMethodCallsProtected() { return $this->aProtectedMethod(); } + protected function aProtectedMethod() { return true; } +} + +Mock::generatePartial('DummyWithProtected', 'TestDummyWithProtected', array('aProtectedMethod')); +class TestOfProtectedMethodPartialMocks extends UnitTestCase +{ + function testProtectedMethodExists() { + $this->assertTrue( + method_exists( + new TestDummyWithProtected, + 'aProtectedMethod' + ) + ); + } + + function testProtectedMethodIsCalled() { + $object = new DummyWithProtected(); + $this->assertTrue($object->aMethodCallsProtected(), 'ensure original was called'); + } + + function testMockedMethodIsCalled() { + $object = new TestDummyWithProtected(); + $object->returnsByValue('aProtectedMethod', false); + $this->assertFalse($object->aMethodCallsProtected()); + } +} + +?> diff --git a/webdata/stdlibs/simpletest/test/page_test.php b/webdata/stdlibs/simpletest/test/page_test.php new file mode 100644 index 0000000..fdc15c5 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/page_test.php @@ -0,0 +1,166 @@ +assertEqual($page->getTransportError(), 'No page fetched yet'); + $this->assertIdentical($page->getRaw(), false); + $this->assertIdentical($page->getHeaders(), false); + $this->assertIdentical($page->getMimeType(), false); + $this->assertIdentical($page->getResponseCode(), false); + $this->assertIdentical($page->getAuthentication(), false); + $this->assertIdentical($page->getRealm(), false); + $this->assertFalse($page->hasFrames()); + $this->assertIdentical($page->getUrls(), array()); + $this->assertIdentical($page->getTitle(), false); + } +} + +class TestOfPageHeaders extends UnitTestCase { + + function testUrlAccessor() { + $headers = new MockSimpleHttpHeaders(); + + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getHeaders', $headers); + $response->setReturnValue('getMethod', 'POST'); + $response->setReturnValue('getUrl', new SimpleUrl('here')); + $response->setReturnValue('getRequestData', array('a' => 'A')); + + $page = new SimplePage($response); + $this->assertEqual($page->getMethod(), 'POST'); + $this->assertEqual($page->getUrl(), new SimpleUrl('here')); + $this->assertEqual($page->getRequestData(), array('a' => 'A')); + } + + function testTransportError() { + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getError', 'Ouch'); + + $page = new SimplePage($response); + $this->assertEqual($page->getTransportError(), 'Ouch'); + } + + function testHeadersAccessor() { + $headers = new MockSimpleHttpHeaders(); + $headers->setReturnValue('getRaw', 'My: Headers'); + + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getHeaders', $headers); + + $page = new SimplePage($response); + $this->assertEqual($page->getHeaders(), 'My: Headers'); + } + + function testMimeAccessor() { + $headers = new MockSimpleHttpHeaders(); + $headers->setReturnValue('getMimeType', 'text/html'); + + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getHeaders', $headers); + + $page = new SimplePage($response); + $this->assertEqual($page->getMimeType(), 'text/html'); + } + + function testResponseAccessor() { + $headers = new MockSimpleHttpHeaders(); + $headers->setReturnValue('getResponseCode', 301); + + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getHeaders', $headers); + + $page = new SimplePage($response); + $this->assertIdentical($page->getResponseCode(), 301); + } + + function testAuthenticationAccessors() { + $headers = new MockSimpleHttpHeaders(); + $headers->setReturnValue('getAuthentication', 'Basic'); + $headers->setReturnValue('getRealm', 'Secret stuff'); + + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getHeaders', $headers); + + $page = new SimplePage($response); + $this->assertEqual($page->getAuthentication(), 'Basic'); + $this->assertEqual($page->getRealm(), 'Secret stuff'); + } +} + +class TestOfHtmlStrippingAndNormalisation extends UnitTestCase { + + function testImageSuppressionWhileKeepingParagraphsAndAltText() { + $this->assertEqual( + SimplePage::normalise('

                      some text

                      bar'), + 'some text bar'); + } + + function testSpaceNormalisation() { + $this->assertEqual( + SimplePage::normalise("\nOne\tTwo \nThree\t"), + 'One Two Three'); + } + + function testMultilinesCommentSuppression() { + $this->assertEqual( + SimplePage::normalise(''), + ''); + } + + function testCommentSuppression() { + $this->assertEqual( + SimplePage::normalise(''), + ''); + } + + function testJavascriptSuppression() { + $this->assertEqual( + SimplePage::normalise(''), + ''); + $this->assertEqual( + SimplePage::normalise(''), + ''); + $this->assertEqual( + SimplePage::normalise(''), + ''); + } + + function testTagSuppression() { + $this->assertEqual( + SimplePage::normalise('Hello'), + 'Hello'); + } + + function testAdjoiningTagSuppression() { + $this->assertEqual( + SimplePage::normalise('HelloGoodbye'), + 'HelloGoodbye'); + } + + function testExtractImageAltTextWithDifferentQuotes() { + $this->assertEqual( + SimplePage::normalise('One\'Two\'Three'), + 'One Two Three'); + } + + function testExtractImageAltTextMultipleTimes() { + $this->assertEqual( + SimplePage::normalise('OneTwoThree'), + 'One Two Three'); + } + + function testHtmlEntityTranslation() { + $this->assertEqual( + SimplePage::normalise('<>"&''), + '<>"&\''); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/parse_error_test.php b/webdata/stdlibs/simpletest/test/parse_error_test.php new file mode 100644 index 0000000..c3ffb3d --- /dev/null +++ b/webdata/stdlibs/simpletest/test/parse_error_test.php @@ -0,0 +1,9 @@ +addFile('test_with_parse_error.php'); +$test->run(new HtmlReporter()); +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/parsing_test.php b/webdata/stdlibs/simpletest/test/parsing_test.php new file mode 100644 index 0000000..2c5e6ca --- /dev/null +++ b/webdata/stdlibs/simpletest/test/parsing_test.php @@ -0,0 +1,642 @@ +whenVisiting('http://host/', 'Raw HTML'); + $this->assertEqual($page->getRaw(), 'Raw HTML'); + } + + function testTextAccessor() { + $page = $this->whenVisiting('http://host/', 'Some "messy" HTML'); + $this->assertEqual($page->getText(), 'Some "messy" HTML'); + } + + function testFramesetAbsence() { + $page = $this->whenVisiting('http://here/', ''); + $this->assertFalse($page->hasFrames()); + $this->assertIdentical($page->getFrameset(), false); + } + + function testPageWithNoUrlsGivesEmptyArrayOfLinks() { + $page = $this->whenVisiting('http://here/', '

                      Stuff

                      '); + $this->assertIdentical($page->getUrls(), array()); + } + + function testAddAbsoluteLink() { + $page = $this->whenVisiting('http://host', + 'Label'); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://somewhere.com'))); + } + + function testUrlLabelsHaveHtmlTagsStripped() { + $page = $this->whenVisiting('http://host', + 'Label'); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://somewhere.com'))); + } + + function testAddStrictRelativeLink() { + $page = $this->whenVisiting('http://host', + 'Label'); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://host/somewhere.php'))); + } + + function testAddBareRelativeLink() { + $page = $this->whenVisiting('http://host', + 'Label'); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://host/somewhere.php'))); + } + + function testAddRelativeLinkWithBaseTag() { + $raw = '' . + 'Label' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://www.lastcraft.com/stuff/somewhere.php'))); + } + + function testAddAbsoluteLinkWithBaseTag() { + $raw = '' . + 'Label' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://here.com/somewhere.php'))); + } + + function testCanFindLinkInsideForm() { + $raw = '
                      Label
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://host/somewhere.php'))); + } + + function testCanGetLinksByIdOrLabel() { + $raw = 'Label'; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + $page->getUrlsByLabel('Label'), + array(new SimpleUrl('http://host/somewhere.php'))); + $this->assertFalse($page->getUrlById(0)); + $this->assertEqual( + $page->getUrlById(33), + new SimpleUrl('http://host/somewhere.php')); + } + + function testCanFindLinkByNormalisedLabel() { + $raw = 'Long & thin'; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + $page->getUrlsByLabel('Long & thin'), + array(new SimpleUrl('http://host/somewhere.php'))); + } + + function testCanFindLinkByImageAltText() { + $raw = '<A picture>'; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual( + array_map(array($this, 'urlToString'), $page->getUrlsByLabel('')), + array('http://host/somewhere.php')); + } + + function testTitle() { + $page = $this->whenVisiting('http://host', + 'Me'); + $this->assertEqual($page->getTitle(), 'Me'); + } + + function testTitleWithEntityReference() { + $page = $this->whenVisiting('http://host', + 'Me&Me'); + $this->assertEqual($page->getTitle(), "Me&Me"); + } + + function testOnlyFramesInFramesetAreRecognised() { + $raw = + '' . + ' ' . + ' ' . + '' . + ''; + $page = $this->whenVisiting('http://here', $raw); + $this->assertTrue($page->hasFrames()); + $this->assertSameFrameset($page->getFrameset(), array( + 1 => new SimpleUrl('http://here/2.html'), + 2 => new SimpleUrl('http://here/3.html'))); + } + + function testReadsNamesInFrames() { + $raw = + '' . + ' ' . + ' ' . + ' ' . + ' ' . + ''; + $page = $this->whenVisiting('http://here', $raw); + $this->assertTrue($page->hasFrames()); + $this->assertSameFrameset($page->getFrameset(), array( + 1 => new SimpleUrl('http://here/1.html'), + 'A' => new SimpleUrl('http://here/2.html'), + 'B' => new SimpleUrl('http://here/3.html'), + 4 => new SimpleUrl('http://here/4.html'))); + } + + function testRelativeFramesRespectBaseTag() { + $raw = ''; + $page = $this->whenVisiting('http://here', $raw); + $this->assertSameFrameset( + $page->getFrameset(), + array(1 => new SimpleUrl('https://there.com/stuff/1.html'))); + } + + function testSingleFrameInNestedFrameset() { + $raw = '' . + '' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->hasFrames()); + $this->assertIdentical( + $page->getFrameset(), + array(1 => new SimpleUrl('http://host/a.html'))); + } + + function testFramesCollectedWithNestedFramesetTags() { + $raw = '' . + '' . + '' . + '' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->hasFrames()); + $this->assertIdentical($page->getFrameset(), array( + 1 => new SimpleUrl('http://host/a.html'), + 2 => new SimpleUrl('http://host/b.html'), + 3 => new SimpleUrl('http://host/c.html'))); + } + + function testNamedFrames() { + $raw = '' . + '' . + '' . + '' . + '' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->hasFrames()); + $this->assertIdentical($page->getFrameset(), array( + 1 => new SimpleUrl('http://host/a.html'), + '_one' => new SimpleUrl('http://host/b.html'), + 3 => new SimpleUrl('http://host/c.html'), + '_two' => new SimpleUrl('http://host/d.html'))); + } + + function testCanReadElementOfCompleteForm() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('here')), "Hello"); + } + + function testCanReadElementOfUnclosedForm() { + $raw = '
                      ' . + '' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('here')), "Hello"); + } + + function testCanReadElementByLabel() { + $raw = '' . + '' . + ''; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('Where')), "Hello"); + } + + function testCanFindFormByLabel() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertNull($page->getFormBySubmit(new SimpleByLabel('submit'))); + $this->assertNull($page->getFormBySubmit(new SimpleByName('submit'))); + $this->assertIsA( + $page->getFormBySubmit(new SimpleByLabel('Submit')), + 'SimpleForm'); + } + + function testConfirmSubmitAttributesAreCaseSensitive() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertIsA( + $page->getFormBySubmit(new SimpleByName('S')), + 'SimpleForm'); + $this->assertIsA( + $page->getFormBySubmit(new SimpleByLabel('S')), + 'SimpleForm'); + } + + function testCanFindFormByImage() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertIsA( + $page->getFormByImage(new SimpleByLabel('Label')), + 'SimpleForm'); + $this->assertIsA( + $page->getFormByImage(new SimpleByName('me')), + 'SimpleForm'); + $this->assertIsA( + $page->getFormByImage(new SimpleById(100)), + 'SimpleForm'); + } + + function testCanFindFormByButtonTag() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertNull($page->getFormBySubmit(new SimpleByLabel('b'))); + $this->assertNull($page->getFormBySubmit(new SimpleByLabel('B'))); + $this->assertIsA( + $page->getFormBySubmit(new SimpleByName('b')), + 'SimpleForm'); + $this->assertIsA( + $page->getFormBySubmit(new SimpleByLabel('BBB')), + 'SimpleForm'); + } + + function testCanFindFormById() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertNull($page->getFormById(54)); + $this->assertIsA($page->getFormById(55), 'SimpleForm'); + } + + function testFormCanBeSubmitted() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $form = $page->getFormBySubmit(new SimpleByLabel('Submit')); + $this->assertEqual( + $form->submitButton(new SimpleByLabel('Submit')), + new SimpleGetEncoding(array('s' => 'Submit'))); + } + + function testUnparsedTagDoesNotCrash() { + $raw = '
                      '; + $this->whenVisiting('http://host', $raw); + } + + function testReadingTextField() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertNull($page->getField(new SimpleByName('missing'))); + $this->assertIdentical($page->getField(new SimpleByName('a')), ''); + $this->assertIdentical($page->getField(new SimpleByName('b')), 'bbb'); + } + + function testEntitiesAreDecodedInDefaultTextFieldValue() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), '&\'"<>'); + } + + function testReadingTextFieldIsCaseInsensitive() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertNull($page->getField(new SimpleByName('missing'))); + $this->assertIdentical($page->getField(new SimpleByName('a')), ''); + $this->assertIdentical($page->getField(new SimpleByName('b')), 'bbb'); + } + + function testSettingTextField() { + $raw = '
                      ' . + '' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByName('a'), 'aaa')); + $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); + $this->assertTrue($page->setField(new SimpleById(3), 'bbb')); + $this->assertEqual($page->getField(new SimpleBYId(3)), 'bbb'); + $this->assertFalse($page->setField(new SimpleByName('z'), 'zzz')); + $this->assertNull($page->getField(new SimpleByName('z'))); + } + + function testSettingTextFieldByEnclosingLabel() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), 'A'); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); + $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'aaa')); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'aaa'); + } + + function testLabelsWithoutForDoNotAttachToInputsWithNoId() { + $raw = '
                      + + +
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabelOrName('Text A')), 'one'); + $this->assertEqual($page->getField(new SimpleByLabelOrName('Text B')), 'two'); + $this->assertTrue($page->setField(new SimpleByLabelOrName('Text A'), '1')); + $this->assertTrue($page->setField(new SimpleByLabelOrName('Text B'), '2')); + $this->assertEqual($page->getField(new SimpleByLabelOrName('Text A')), '1'); + $this->assertEqual($page->getField(new SimpleByLabelOrName('Text B')), '2'); + } + + function testGettingTextFieldByEnclosingLabelWithConflictingOtherFields() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), 'A'); + $this->assertEqual($page->getField(new SimpleByName('b')), 'B'); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); + } + + function testSettingTextFieldByExternalLabel() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); + $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'aaa')); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'aaa'); + } + + function testReadingTextArea() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); + } + + function testEntitiesAreDecodedInTextareaValue() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), '&\'"<>'); + } + + function testNewlinesPreservedInTextArea() { + $raw = "
                      "; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), "hello\r\nworld"); + } + + function testWhitespacePreservedInTextArea() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), ' '); + } + + function testComplexWhitespaceInTextArea() { + $raw = "\n" . + " \n" . + " \n" . + "
                      \n". + " \n" . + "
                      \n" . + " \n" . + ""; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('c')), " "); + } + + function testSettingTextArea() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByName('a'), 'AAA')); + $this->assertEqual($page->getField(new SimpleByName('a')), 'AAA'); + } + + function testDontIncludeTextAreaContentInLabel() { + $raw = '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('Text area C')), 'mouse'); + } + + function testSettingSelectionField() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), 'bbb'); + $this->assertFalse($page->setField(new SimpleByName('a'), 'ccc')); + $this->assertTrue($page->setField(new SimpleByName('a'), 'aaa')); + $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); + } + + function testSelectionOptionsAreNormalised() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('a')), 'Big bold'); + $this->assertTrue($page->setField(new SimpleByName('a'), 'small italic')); + $this->assertEqual($page->getField(new SimpleByName('a')), 'small italic'); + } + + function testCanParseBlankOptions() { + $raw = '
                      + +
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByName('d'), '')); + } + + function testTwoSelectionFieldsAreIndependent() { + $raw = '
                      + + +
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByName('d'), 'd2')); + $this->assertTrue($page->setField(new SimpleByName('h'), 'h1')); + $this->assertEqual($page->getField(new SimpleByName('d')), 'd2'); + } + + function testEmptyOptionDoesNotScrewUpTwoSelectionFields() { + $raw = '
                      + + +
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByName('d'), 'd2')); + $this->assertTrue($page->setField(new SimpleByName('h'), 'h1')); + $this->assertEqual($page->getField(new SimpleByName('d')), 'd2'); + } + + function testSettingSelectionFieldByEnclosingLabel() { + $raw = '
                      ' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); + $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'B')); + $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'B'); + } + + function testTwoSelectionFieldsWithLabelsAreIndependent() { + $raw = '
                      + + +
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertTrue($page->setField(new SimpleByLabel('Labelled D'), 'd2')); + $this->assertTrue($page->setField(new SimpleByLabel('Labelled H'), 'h1')); + $this->assertEqual($page->getField(new SimpleByLabel('Labelled D')), 'd2'); + } + + function testSettingRadioButtonByEnclosingLabel() { + $raw = '
                      ' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('A')), 'a'); + $this->assertTrue($page->setField(new SimpleBylabel('B'), 'b')); + $this->assertEqual($page->getField(new SimpleByLabel('B')), 'b'); + } + + function testCanParseInputsWithAllKindsOfAttributeQuoting() { + $raw = '
                      ' . + '' . + '' . + '' . + '
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByName('first')), 'one'); + $this->assertEqual($page->getField(new SimpleByName('second')), false); + $this->assertEqual($page->getField(new SimpleByName('third')), 'three'); + } + + function urlToString($url) { + return $url->asString(); + } + + function assertSameFrameset($actual, $expected) { + $this->assertIdentical(array_map(array($this, 'urlToString'), $actual), + array_map(array($this, 'urlToString'), $expected)); + } +} + +class TestOfParsingUsingPhpParser extends TestOfParsing { + + function whenVisiting($url, $content) { + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getContent', $content); + $response->setReturnValue('getUrl', new SimpleUrl($url)); + $builder = new SimplePhpPageBuilder(); + return $builder->parse($response); + } + + function testNastyTitle() { + $page = $this->whenVisiting('http://host', + ' <b>Me&Me '); + $this->assertEqual($page->getTitle(), "Me&Me"); + } + + function testLabelShouldStopAtClosingLabelTag() { + $raw = '
                      stuff
                      '; + $page = $this->whenVisiting('http://host', $raw); + $this->assertEqual($page->getField(new SimpleByLabel('startend')), 'stuff'); + } +} + +class TestOfParsingUsingTidyParser extends TestOfParsing { + + function skip() { + $this->skipUnless(extension_loaded('tidy'), 'Install \'tidy\' php extension to enable html tidy based parser'); + } + + function whenVisiting($url, $content) { + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getContent', $content); + $response->setReturnValue('getUrl', new SimpleUrl($url)); + $builder = new SimpleTidyPageBuilder(); + return $builder->parse($response); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/php_parser_test.php b/webdata/stdlibs/simpletest/test/php_parser_test.php new file mode 100644 index 0000000..d95c7d0 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/php_parser_test.php @@ -0,0 +1,489 @@ +assertFalse($regex->match("Hello", $match)); + $this->assertEqual($match, ""); + } + + function testNoSubject() { + $regex = new ParallelRegex(false); + $regex->addPattern(".*"); + $this->assertTrue($regex->match("", $match)); + $this->assertEqual($match, ""); + } + + function testMatchAll() { + $regex = new ParallelRegex(false); + $regex->addPattern(".*"); + $this->assertTrue($regex->match("Hello", $match)); + $this->assertEqual($match, "Hello"); + } + + function testCaseSensitive() { + $regex = new ParallelRegex(true); + $regex->addPattern("abc"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEqual($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEqual($match, "abc"); + } + + function testCaseInsensitive() { + $regex = new ParallelRegex(false); + $regex->addPattern("abc"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEqual($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEqual($match, "ABC"); + } + + function testMatchMultiple() { + $regex = new ParallelRegex(true); + $regex->addPattern("abc"); + $regex->addPattern("ABC"); + $this->assertTrue($regex->match("abcdef", $match)); + $this->assertEqual($match, "abc"); + $this->assertTrue($regex->match("AAABCabcdef", $match)); + $this->assertEqual($match, "ABC"); + $this->assertFalse($regex->match("Hello", $match)); + } + + function testPatternLabels() { + $regex = new ParallelRegex(false); + $regex->addPattern("abc", "letter"); + $regex->addPattern("123", "number"); + $this->assertIdentical($regex->match("abcdef", $match), "letter"); + $this->assertEqual($match, "abc"); + $this->assertIdentical($regex->match("0123456789", $match), "number"); + $this->assertEqual($match, "123"); + } +} + +class TestOfStateStack extends UnitTestCase { + + function testStartState() { + $stack = new SimpleStateStack("one"); + $this->assertEqual($stack->getCurrent(), "one"); + } + + function testExhaustion() { + $stack = new SimpleStateStack("one"); + $this->assertFalse($stack->leave()); + } + + function testStateMoves() { + $stack = new SimpleStateStack("one"); + $stack->enter("two"); + $this->assertEqual($stack->getCurrent(), "two"); + $stack->enter("three"); + $this->assertEqual($stack->getCurrent(), "three"); + $this->assertTrue($stack->leave()); + $this->assertEqual($stack->getCurrent(), "two"); + $stack->enter("third"); + $this->assertEqual($stack->getCurrent(), "third"); + $this->assertTrue($stack->leave()); + $this->assertTrue($stack->leave()); + $this->assertEqual($stack->getCurrent(), "one"); + } +} + +class TestParser { + + function accept() { + } + + function a() { + } + + function b() { + } +} +Mock::generate('TestParser'); + +class TestOfLexer extends UnitTestCase { + + function testEmptyPage() { + $handler = new MockTestParser(); + $handler->expectNever("accept"); + $handler->setReturnValue("accept", true); + $handler->expectNever("accept"); + $handler->setReturnValue("accept", true); + $lexer = new SimpleLexer($handler); + $lexer->addPattern("a+"); + $this->assertTrue($lexer->parse("")); + } + + function testSinglePattern() { + $handler = new MockTestParser(); + $handler->expectAt(0, "accept", array("aaa", LEXER_MATCHED)); + $handler->expectAt(1, "accept", array("x", LEXER_UNMATCHED)); + $handler->expectAt(2, "accept", array("a", LEXER_MATCHED)); + $handler->expectAt(3, "accept", array("yyy", LEXER_UNMATCHED)); + $handler->expectAt(4, "accept", array("a", LEXER_MATCHED)); + $handler->expectAt(5, "accept", array("x", LEXER_UNMATCHED)); + $handler->expectAt(6, "accept", array("aaa", LEXER_MATCHED)); + $handler->expectAt(7, "accept", array("z", LEXER_UNMATCHED)); + $handler->expectCallCount("accept", 8); + $handler->setReturnValue("accept", true); + $lexer = new SimpleLexer($handler); + $lexer->addPattern("a+"); + $this->assertTrue($lexer->parse("aaaxayyyaxaaaz")); + } + + function testMultiplePattern() { + $handler = new MockTestParser(); + $target = array("a", "b", "a", "bb", "x", "b", "a", "xxxxxx", "a", "x"); + for ($i = 0; $i < count($target); $i++) { + $handler->expectAt($i, "accept", array($target[$i], '*')); + } + $handler->expectCallCount("accept", count($target)); + $handler->setReturnValue("accept", true); + $lexer = new SimpleLexer($handler); + $lexer->addPattern("a+"); + $lexer->addPattern("b+"); + $this->assertTrue($lexer->parse("ababbxbaxxxxxxax")); + } +} + +class TestOfLexerModes extends UnitTestCase { + + function testIsolatedPattern() { + $handler = new MockTestParser(); + $handler->expectAt(0, "a", array("a", LEXER_MATCHED)); + $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); + $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(3, "a", array("bxb", LEXER_UNMATCHED)); + $handler->expectAt(4, "a", array("aaa", LEXER_MATCHED)); + $handler->expectAt(5, "a", array("x", LEXER_UNMATCHED)); + $handler->expectAt(6, "a", array("aaaa", LEXER_MATCHED)); + $handler->expectAt(7, "a", array("x", LEXER_UNMATCHED)); + $handler->expectCallCount("a", 8); + $handler->setReturnValue("a", true); + $lexer = new SimpleLexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addPattern("b+", "b"); + $this->assertTrue($lexer->parse("abaabxbaaaxaaaax")); + } + + function testModeChange() { + $handler = new MockTestParser(); + $handler->expectAt(0, "a", array("a", LEXER_MATCHED)); + $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); + $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(3, "a", array("b", LEXER_UNMATCHED)); + $handler->expectAt(4, "a", array("aaa", LEXER_MATCHED)); + $handler->expectAt(0, "b", array(":", LEXER_ENTER)); + $handler->expectAt(1, "b", array("a", LEXER_UNMATCHED)); + $handler->expectAt(2, "b", array("b", LEXER_MATCHED)); + $handler->expectAt(3, "b", array("a", LEXER_UNMATCHED)); + $handler->expectAt(4, "b", array("bb", LEXER_MATCHED)); + $handler->expectAt(5, "b", array("a", LEXER_UNMATCHED)); + $handler->expectAt(6, "b", array("bbb", LEXER_MATCHED)); + $handler->expectAt(7, "b", array("a", LEXER_UNMATCHED)); + $handler->expectCallCount("a", 5); + $handler->expectCallCount("b", 8); + $handler->setReturnValue("a", true); + $handler->setReturnValue("b", true); + $lexer = new SimpleLexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addEntryPattern(":", "a", "b"); + $lexer->addPattern("b+", "b"); + $this->assertTrue($lexer->parse("abaabaaa:ababbabbba")); + } + + function testNesting() { + $handler = new MockTestParser(); + $handler->setReturnValue("a", true); + $handler->setReturnValue("b", true); + $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); + $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(3, "a", array("b", LEXER_UNMATCHED)); + $handler->expectAt(0, "b", array("(", LEXER_ENTER)); + $handler->expectAt(1, "b", array("bb", LEXER_MATCHED)); + $handler->expectAt(2, "b", array("a", LEXER_UNMATCHED)); + $handler->expectAt(3, "b", array("bb", LEXER_MATCHED)); + $handler->expectAt(4, "b", array(")", LEXER_EXIT)); + $handler->expectAt(4, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(5, "a", array("b", LEXER_UNMATCHED)); + $handler->expectCallCount("a", 6); + $handler->expectCallCount("b", 5); + $lexer = new SimpleLexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addEntryPattern("(", "a", "b"); + $lexer->addPattern("b+", "b"); + $lexer->addExitPattern(")", "b"); + $this->assertTrue($lexer->parse("aabaab(bbabb)aab")); + } + + function testSingular() { + $handler = new MockTestParser(); + $handler->setReturnValue("a", true); + $handler->setReturnValue("b", true); + $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(1, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(2, "a", array("xx", LEXER_UNMATCHED)); + $handler->expectAt(3, "a", array("xx", LEXER_UNMATCHED)); + $handler->expectAt(0, "b", array("b", LEXER_SPECIAL)); + $handler->expectAt(1, "b", array("bbb", LEXER_SPECIAL)); + $handler->expectCallCount("a", 4); + $handler->expectCallCount("b", 2); + $lexer = new SimpleLexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addSpecialPattern("b+", "a", "b"); + $this->assertTrue($lexer->parse("aabaaxxbbbxx")); + } + + function testUnwindTooFar() { + $handler = new MockTestParser(); + $handler->setReturnValue("a", true); + $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(1, "a", array(")", LEXER_EXIT)); + $handler->expectCallCount("a", 2); + $lexer = new SimpleLexer($handler, "a"); + $lexer->addPattern("a+", "a"); + $lexer->addExitPattern(")", "a"); + $this->assertFalse($lexer->parse("aa)aa")); + } +} + +class TestOfLexerHandlers extends UnitTestCase { + + function testModeMapping() { + $handler = new MockTestParser(); + $handler->setReturnValue("a", true); + $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); + $handler->expectAt(1, "a", array("(", LEXER_ENTER)); + $handler->expectAt(2, "a", array("bb", LEXER_MATCHED)); + $handler->expectAt(3, "a", array("a", LEXER_UNMATCHED)); + $handler->expectAt(4, "a", array("bb", LEXER_MATCHED)); + $handler->expectAt(5, "a", array(")", LEXER_EXIT)); + $handler->expectAt(6, "a", array("b", LEXER_UNMATCHED)); + $handler->expectCallCount("a", 7); + $lexer = new SimpleLexer($handler, "mode_a"); + $lexer->addPattern("a+", "mode_a"); + $lexer->addEntryPattern("(", "mode_a", "mode_b"); + $lexer->addPattern("b+", "mode_b"); + $lexer->addExitPattern(")", "mode_b"); + $lexer->mapHandler("mode_a", "a"); + $lexer->mapHandler("mode_b", "a"); + $this->assertTrue($lexer->parse("aa(bbabb)b")); + } +} + +class TestOfSimpleHtmlLexer extends UnitTestCase { + + function &createParser() { + $parser = new MockSimpleHtmlSaxParser(); + $parser->setReturnValue('acceptStartToken', true); + $parser->setReturnValue('acceptEndToken', true); + $parser->setReturnValue('acceptAttributeToken', true); + $parser->setReturnValue('acceptEntityToken', true); + $parser->setReturnValue('acceptTextToken', true); + $parser->setReturnValue('ignore', true); + return $parser; + } + + function testNoContent() { + $parser = $this->createParser(); + $parser->expectNever('acceptStartToken'); + $parser->expectNever('acceptEndToken'); + $parser->expectNever('acceptAttributeToken'); + $parser->expectNever('acceptEntityToken'); + $parser->expectNever('acceptTextToken'); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse('')); + } + + function testUninteresting() { + $parser = $this->createParser(); + $parser->expectOnce('acceptTextToken', array('', '*')); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse('')); + } + + function testSkipCss() { + $parser = $this->createParser(); + $parser->expectNever('acceptTextToken'); + $parser->expectAtLeastOnce('ignore'); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse("")); + } + + function testSkipJavaScript() { + $parser = $this->createParser(); + $parser->expectNever('acceptTextToken'); + $parser->expectAtLeastOnce('ignore'); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse("")); + } + + function testSkipHtmlComments() { + $parser = $this->createParser(); + $parser->expectNever('acceptTextToken'); + $parser->expectAtLeastOnce('ignore'); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse("")); + } + + function testTagWithNoAttributes() { + $parser = $this->createParser(); + $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('>', '*')); + $parser->expectCallCount('acceptStartToken', 2); + $parser->expectOnce('acceptTextToken', array('Hello', '*')); + $parser->expectOnce('acceptEndToken', array('', '*')); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse('Hello')); + } + + function testTagWithAttributes() { + $parser = $this->createParser(); + $parser->expectOnce('acceptTextToken', array('label', '*')); + $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('href', '*')); + $parser->expectAt(2, 'acceptStartToken', array('>', '*')); + $parser->expectCallCount('acceptStartToken', 3); + $parser->expectAt(0, 'acceptAttributeToken', array('= "', '*')); + $parser->expectAt(1, 'acceptAttributeToken', array('here.html', '*')); + $parser->expectAt(2, 'acceptAttributeToken', array('"', '*')); + $parser->expectCallCount('acceptAttributeToken', 3); + $parser->expectOnce('acceptEndToken', array('
                      ', '*')); + $lexer = new SimpleHtmlLexer($parser); + $this->assertTrue($lexer->parse('label')); + } +} + +class TestOfHtmlSaxParser extends UnitTestCase { + + function createListener() { + $listener = new MockSimplePhpPageBuilder(); + $listener->setReturnValue('startElement', true); + $listener->setReturnValue('addContent', true); + $listener->setReturnValue('endElement', true); + return $listener; + } + + function testFramesetTag() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('frameset', array())); + $listener->expectOnce('addContent', array('Frames')); + $listener->expectOnce('endElement', array('frameset')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('Frames')); + } + + function testTagWithUnquotedAttributes() { + $listener = $this->createListener(); + $listener->expectOnce( + 'startElement', + array('input', array('name' => 'a.b.c', 'value' => 'd'))); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('')); + } + + function testTagInsideContent() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('a', array())); + $listener->expectAt(0, 'addContent', array('')); + $listener->expectAt(1, 'addContent', array('')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('')); + } + + function testTagWithInternalContent() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('a', array())); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('a')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('label')); + } + + function testLinkAddress() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('a', array('href' => 'here.html'))); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('a')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse("label")); + } + + function testEncodedAttribute() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('a', array('href' => 'here&there.html'))); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('a')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse("label")); + } + + function testTagWithId() { + $listener = $this->createListener(); + $listener->expectOnce('startElement', array('a', array('id' => '0'))); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('a')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('label')); + } + + function testTagWithEmptyAttributes() { + $listener = $this->createListener(); + $listener->expectOnce( + 'startElement', + array('option', array('value' => '', 'selected' => ''))); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('option')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('')); + } + + function testComplexTagWithLotsOfCaseVariations() { + $listener = $this->createListener(); + $listener->expectOnce( + 'startElement', + array('a', array('href' => 'here.html', 'style' => "'cool'"))); + $listener->expectOnce('addContent', array('label')); + $listener->expectOnce('endElement', array('a')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('label')); + } + + function testXhtmlSelfClosingTag() { + $listener = $this->createListener(); + $listener->expectOnce( + 'startElement', + array('input', array('type' => 'submit', 'name' => 'N', 'value' => 'V'))); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse('')); + } + + function testNestedFrameInFrameset() { + $listener = $this->createListener(); + $listener->expectAt(0, 'startElement', array('frameset', array())); + $listener->expectAt(1, 'startElement', array('frame', array('src' => 'frame.html'))); + $listener->expectCallCount('startElement', 2); + $listener->expectOnce('addContent', array('Hello')); + $listener->expectOnce('endElement', array('frameset')); + $parser = new SimpleHtmlSaxParser($listener); + $this->assertTrue($parser->parse( + 'Hello')); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/recorder_test.php b/webdata/stdlibs/simpletest/test/recorder_test.php new file mode 100644 index 0000000..fdae4c1 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/recorder_test.php @@ -0,0 +1,23 @@ +addFile(dirname(__FILE__) . '/support/recorder_sample.php'); + $recorder = new Recorder(new SimpleReporter()); + $test->run($recorder); + $this->assertEqual(count($recorder->results), 2); + $this->assertIsA($recorder->results[0], 'SimpleResultOfPass'); + $this->assertEqual('testTrueIsTrue', array_pop($recorder->results[0]->breadcrumb)); + $this->assertPattern('/ at \[.*\Wrecorder_sample\.php line 7\]/', $recorder->results[0]->message); + $this->assertIsA($recorder->results[1], 'SimpleResultOfFail'); + $this->assertEqual('testFalseIsTrue', array_pop($recorder->results[1]->breadcrumb)); + $this->assertPattern("/Expected false, got \[Boolean: true\] at \[.*\Wrecorder_sample\.php line 11\]/", + $recorder->results[1]->message); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/reflection_php5_test.php b/webdata/stdlibs/simpletest/test/reflection_php5_test.php new file mode 100644 index 0000000..d9f46e6 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/reflection_php5_test.php @@ -0,0 +1,263 @@ +assertTrue($reflection->classOrInterfaceExists()); + $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload()); + $this->assertFalse($reflection->isAbstract()); + $this->assertFalse($reflection->isInterface()); + } + + function testClassNonExistence() { + $reflection = new SimpleReflection('UnknownThing'); + $this->assertFalse($reflection->classOrInterfaceExists()); + $this->assertFalse($reflection->classOrInterfaceExistsSansAutoload()); + } + + function testDetectionOfAbstractClass() { + $reflection = new SimpleReflection('AnyOldClass'); + $this->assertTrue($reflection->isAbstract()); + } + + function testDetectionOfFinalMethods() { + $reflection = new SimpleReflection('AnyOldClass'); + $this->assertFalse($reflection->hasFinal()); + $reflection = new SimpleReflection('AnyOldLeafClassWithAFinal'); + $this->assertTrue($reflection->hasFinal()); + } + + function testFindingParentClass() { + $reflection = new SimpleReflection('AnyOldSubclass'); + $this->assertEqual($reflection->getParent(), 'AnyOldImplementation'); + } + + function testInterfaceExistence() { + $reflection = new SimpleReflection('AnyOldInterface'); + $this->assertTrue($reflection->classOrInterfaceExists()); + $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload()); + $this->assertTrue($reflection->isInterface()); + } + + function testMethodsListFromClass() { + $reflection = new SimpleReflection('AnyOldClass'); + $this->assertIdentical($reflection->getMethods(), array('aMethod')); + } + + function testMethodsListFromInterface() { + $reflection = new SimpleReflection('AnyOldInterface'); + $this->assertIdentical($reflection->getMethods(), array('aMethod')); + $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod')); + } + + function testMethodsComeFromDescendentInterfacesASWell() { + $reflection = new SimpleReflection('AnyDescendentInterface'); + $this->assertIdentical($reflection->getMethods(), array('aMethod')); + } + + function testCanSeparateInterfaceMethodsFromOthers() { + $reflection = new SimpleReflection('AnyOldImplementation'); + $this->assertIdentical($reflection->getMethods(), array('aMethod', 'extraMethod')); + $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod')); + } + + function testMethodsComeFromDescendentInterfacesInAbstractClass() { + $reflection = new SimpleReflection('AnyAbstractImplementation'); + $this->assertIdentical($reflection->getMethods(), array('aMethod')); + } + + function testInterfaceHasOnlyItselfToImplement() { + $reflection = new SimpleReflection('AnyOldInterface'); + $this->assertEqual( + $reflection->getInterfaces(), + array('AnyOldInterface')); + } + + function testInterfacesListedForClass() { + $reflection = new SimpleReflection('AnyOldImplementation'); + $this->assertEqual( + $reflection->getInterfaces(), + array('AnyOldInterface')); + } + + function testInterfacesListedForSubclass() { + $reflection = new SimpleReflection('AnyOldSubclass'); + $this->assertEqual( + $reflection->getInterfaces(), + array('AnyOldInterface')); + } + + function testNoParameterCreationWhenNoInterface() { + $reflection = new SimpleReflection('AnyOldArgumentClass'); + $function = $reflection->getSignature('aMethod'); + if (version_compare(phpversion(), '5.0.2', '<=')) { + $this->assertEqual('function amethod($argument)', strtolower($function)); + } else { + $this->assertEqual('function aMethod($argument)', $function); + } + } + + function testParameterCreationWithoutTypeHinting() { + $reflection = new SimpleReflection('AnyOldArgumentImplementation'); + $function = $reflection->getSignature('aMethod'); + if (version_compare(phpversion(), '5.0.2', '<=')) { + $this->assertEqual('function amethod(AnyOldInterface $argument)', $function); + } else { + $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function); + } + } + + function testParameterCreationForTypeHinting() { + $reflection = new SimpleReflection('AnyOldTypeHintedClass'); + $function = $reflection->getSignature('aMethod'); + if (version_compare(phpversion(), '5.0.2', '<=')) { + $this->assertEqual('function amethod(AnyOldInterface $argument)', $function); + } else { + $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function); + } + } + + function testIssetFunctionSignature() { + $reflection = new SimpleReflection('AnyOldOverloadedClass'); + $function = $reflection->getSignature('__isset'); + $this->assertEqual('function __isset($key)', $function); + } + + function testUnsetFunctionSignature() { + $reflection = new SimpleReflection('AnyOldOverloadedClass'); + $function = $reflection->getSignature('__unset'); + $this->assertEqual('function __unset($key)', $function); + } + + function testProperlyReflectsTheFinalInterfaceWhenObjectImplementsAnExtendedInterface() { + $reflection = new SimpleReflection('AnyDescendentImplementation'); + $interfaces = $reflection->getInterfaces(); + $this->assertEqual(1, count($interfaces)); + $this->assertEqual('AnyDescendentInterface', array_shift($interfaces)); + } + + function testCreatingSignatureForAbstractMethod() { + $reflection = new SimpleReflection('AnotherOldAbstractClass'); + $this->assertEqual($reflection->getSignature('aMethod'), 'function aMethod(AnyOldInterface $argument)'); + } + + function testCanProperlyGenerateStaticMethodSignatures() { + $reflection = new SimpleReflection('AnyOldClassWithStaticMethods'); + $this->assertEqual('static function aStatic()', $reflection->getSignature('aStatic')); + $this->assertEqual( + 'static function aStaticWithParameters($arg1, $arg2)', + $reflection->getSignature('aStaticWithParameters') + ); + } +} + +class TestOfReflectionWithTypeHints extends UnitTestCase { + function skip() { + $this->skipIf(version_compare(phpversion(), '5.1.0', '<'), 'Reflection with type hints only tested for PHP 5.1.0 and above'); + } + + function testParameterCreationForTypeHintingWithArray() { + eval('interface AnyOldArrayTypeHintedInterface { + function amethod(array $argument); + } + class AnyOldArrayTypeHintedClass implements AnyOldArrayTypeHintedInterface { + function amethod(array $argument) {} + }'); + $reflection = new SimpleReflection('AnyOldArrayTypeHintedClass'); + $function = $reflection->getSignature('amethod'); + $this->assertEqual('function amethod(array $argument)', $function); + } +} + +class TestOfAbstractsWithAbstractMethods extends UnitTestCase { + function testCanProperlyGenerateAbstractMethods() { + $reflection = new SimpleReflection('AnyOldAbstractClassWithAbstractMethods'); + $this->assertEqual( + 'function anAbstract()', + $reflection->getSignature('anAbstract') + ); + $this->assertEqual( + 'function anAbstractWithParameter($foo)', + $reflection->getSignature('anAbstractWithParameter') + ); + $this->assertEqual( + 'function anAbstractWithMultipleParameters($foo, $bar)', + $reflection->getSignature('anAbstractWithMultipleParameters') + ); + } +} + +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/remote_test.php b/webdata/stdlibs/simpletest/test/remote_test.php new file mode 100644 index 0000000..5f3f96a --- /dev/null +++ b/webdata/stdlibs/simpletest/test/remote_test.php @@ -0,0 +1,19 @@ +add(new RemoteTestCase($test_url . '?xml=yes', $test_url . '?xml=yes&dry=yes')); +if (SimpleReporter::inCli()) { + exit ($test->run(new TextReporter()) ? 0 : 1); +} +$test->run(new HtmlReporter()); diff --git a/webdata/stdlibs/simpletest/test/shell_test.php b/webdata/stdlibs/simpletest/test/shell_test.php new file mode 100644 index 0000000..d1d769a --- /dev/null +++ b/webdata/stdlibs/simpletest/test/shell_test.php @@ -0,0 +1,38 @@ +assertIdentical($shell->execute('echo Hello'), 0); + $this->assertPattern('/Hello/', $shell->getOutput()); + } + + function testBadCommand() { + $shell = new SimpleShell(); + $this->assertNotEqual($ret = $shell->execute('blurgh! 2>&1'), 0); + } +} + +class TestOfShellTesterAndShell extends ShellTestCase { + + function testEcho() { + $this->assertTrue($this->execute('echo Hello')); + $this->assertExitCode(0); + $this->assertoutput('Hello'); + } + + function testFileExistence() { + $this->assertFileExists(dirname(__FILE__) . '/all_tests.php'); + $this->assertFileNotExists('wibble'); + } + + function testFilePatterns() { + $this->assertFilePattern('/all[_ ]tests/i', dirname(__FILE__) . '/all_tests.php'); + $this->assertNoFilePattern('/sputnik/i', dirname(__FILE__) . '/all_tests.php'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/shell_tester_test.php b/webdata/stdlibs/simpletest/test/shell_tester_test.php new file mode 100644 index 0000000..b12c602 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/shell_tester_test.php @@ -0,0 +1,42 @@ +mock_shell; + } + + function testGenericEquality() { + $this->assertEqual('a', 'a'); + $this->assertNotEqual('a', 'A'); + } + + function testExitCode() { + $this->mock_shell = new MockSimpleShell(); + $this->mock_shell->setReturnValue('execute', 0); + $this->mock_shell->expectOnce('execute', array('ls')); + $this->assertTrue($this->execute('ls')); + $this->assertExitCode(0); + } + + function testOutput() { + $this->mock_shell = new MockSimpleShell(); + $this->mock_shell->setReturnValue('execute', 0); + $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n"); + $this->assertOutput("Line 1\nLine 2\n"); + } + + function testOutputPatterns() { + $this->mock_shell = new MockSimpleShell(); + $this->mock_shell->setReturnValue('execute', 0); + $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n"); + $this->assertOutputPattern('/line/i'); + $this->assertNoOutputPattern('/line 2/'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/simpletest_test.php b/webdata/stdlibs/simpletest/test/simpletest_test.php new file mode 100644 index 0000000..daa65c6 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/simpletest_test.php @@ -0,0 +1,58 @@ +fail('Should be ignored'); + } +} + +class ShouldNeverBeRunEither extends ShouldNeverBeRun { } + +class TestOfStackTrace extends UnitTestCase { + + function testCanFindAssertInTrace() { + $trace = new SimpleStackTrace(array('assert')); + $this->assertEqual( + $trace->traceMethod(array(array( + 'file' => '/my_test.php', + 'line' => 24, + 'function' => 'assertSomething'))), + ' at [/my_test.php line 24]'); + } +} + +class DummyResource { } + +class TestOfContext extends UnitTestCase { + + function testCurrentContextIsUnique() { + $this->assertSame( + SimpleTest::getContext(), + SimpleTest::getContext()); + } + + function testContextHoldsCurrentTestCase() { + $context = SimpleTest::getContext(); + $this->assertSame($this, $context->getTest()); + } + + function testResourceIsSingleInstanceWithContext() { + $context = new SimpleTestContext(); + $this->assertSame( + $context->get('DummyResource'), + $context->get('DummyResource')); + } + + function testClearingContextResetsResources() { + $context = new SimpleTestContext(); + $resource = $context->get('DummyResource'); + $context->clear(); + $this->assertClone($resource, $context->get('DummyResource')); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/site/file.html b/webdata/stdlibs/simpletest/test/site/file.html new file mode 100644 index 0000000..cc41aee --- /dev/null +++ b/webdata/stdlibs/simpletest/test/site/file.html @@ -0,0 +1,6 @@ + + Link to SimpleTest + + Link to SimpleTest + + \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/socket_test.php b/webdata/stdlibs/simpletest/test/socket_test.php new file mode 100644 index 0000000..729adda --- /dev/null +++ b/webdata/stdlibs/simpletest/test/socket_test.php @@ -0,0 +1,25 @@ +assertFalse($error->isError()); + $error->setError('Ouch'); + $this->assertTrue($error->isError()); + $this->assertEqual($error->getError(), 'Ouch'); + } + + function testClearingError() { + $error = new SimpleStickyError(); + $error->setError('Ouch'); + $this->assertTrue($error->isError()); + $error->clearError(); + $this->assertFalse($error->isError()); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/collector/collectable.1 b/webdata/stdlibs/simpletest/test/support/collector/collectable.1 new file mode 100644 index 0000000..e69de29 diff --git a/webdata/stdlibs/simpletest/test/support/collector/collectable.2 b/webdata/stdlibs/simpletest/test/support/collector/collectable.2 new file mode 100644 index 0000000..e69de29 diff --git a/webdata/stdlibs/simpletest/test/support/empty_test_file.php b/webdata/stdlibs/simpletest/test/support/empty_test_file.php new file mode 100644 index 0000000..31e3f7b --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/empty_test_file.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/failing_test.php b/webdata/stdlibs/simpletest/test/support/failing_test.php new file mode 100644 index 0000000..30f0d75 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/failing_test.php @@ -0,0 +1,9 @@ +assertEqual(1,2); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/latin1_sample b/webdata/stdlibs/simpletest/test/support/latin1_sample new file mode 100644 index 0000000..1903525 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/latin1_sample @@ -0,0 +1 @@ +@櫻 \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/passing_test.php b/webdata/stdlibs/simpletest/test/support/passing_test.php new file mode 100644 index 0000000..b786321 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/passing_test.php @@ -0,0 +1,9 @@ +assertEqual(2,2); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/recorder_sample.php b/webdata/stdlibs/simpletest/test/support/recorder_sample.php new file mode 100644 index 0000000..4f157f6 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/recorder_sample.php @@ -0,0 +1,14 @@ +assertTrue(true); + } + + function testFalseIsTrue() { + $this->assertFalse(true); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/spl_examples.php b/webdata/stdlibs/simpletest/test/support/spl_examples.php new file mode 100644 index 0000000..45add35 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/spl_examples.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/supplementary_upload_sample.txt b/webdata/stdlibs/simpletest/test/support/supplementary_upload_sample.txt new file mode 100644 index 0000000..d8aa9e8 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/supplementary_upload_sample.txt @@ -0,0 +1 @@ +Some more text content \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/support/test1.php b/webdata/stdlibs/simpletest/test/support/test1.php new file mode 100644 index 0000000..b414586 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/test1.php @@ -0,0 +1,7 @@ +assertEqual(3,1+2, "pass1"); + } +} +?> diff --git a/webdata/stdlibs/simpletest/test/support/upload_sample.txt b/webdata/stdlibs/simpletest/test/support/upload_sample.txt new file mode 100644 index 0000000..ec98d7c --- /dev/null +++ b/webdata/stdlibs/simpletest/test/support/upload_sample.txt @@ -0,0 +1 @@ +Sample for testing file upload \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/tag_test.php b/webdata/stdlibs/simpletest/test/tag_test.php new file mode 100644 index 0000000..5e8a377 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/tag_test.php @@ -0,0 +1,554 @@ + '1', 'b' => '')); + $this->assertEqual($tag->getTagName(), 'title'); + $this->assertIdentical($tag->getAttribute('a'), '1'); + $this->assertIdentical($tag->getAttribute('b'), ''); + $this->assertIdentical($tag->getAttribute('c'), false); + $this->assertIdentical($tag->getContent(), ''); + } + + function testTitleContent() { + $tag = new SimpleTitleTag(array()); + $this->assertTrue($tag->expectEndTag()); + $tag->addContent('Hello'); + $tag->addContent('World'); + $this->assertEqual($tag->getText(), 'HelloWorld'); + } + + function testMessyTitleContent() { + $tag = new SimpleTitleTag(array()); + $this->assertTrue($tag->expectEndTag()); + $tag->addContent('Hello'); + $tag->addContent('World'); + $this->assertEqual($tag->getText(), 'HelloWorld'); + } + + function testTagWithNoEnd() { + $tag = new SimpleTextTag(array()); + $this->assertFalse($tag->expectEndTag()); + } + + function testAnchorHref() { + $tag = new SimpleAnchorTag(array('href' => 'http://here/')); + $this->assertEqual($tag->getHref(), 'http://here/'); + + $tag = new SimpleAnchorTag(array('href' => '')); + $this->assertIdentical($tag->getAttribute('href'), ''); + $this->assertIdentical($tag->getHref(), ''); + + $tag = new SimpleAnchorTag(array()); + $this->assertIdentical($tag->getAttribute('href'), false); + $this->assertIdentical($tag->getHref(), ''); + } + + function testIsIdMatchesIdAttribute() { + $tag = new SimpleAnchorTag(array('href' => 'http://here/', 'id' => 7)); + $this->assertIdentical($tag->getAttribute('id'), '7'); + $this->assertTrue($tag->isId(7)); + } +} + +class TestOfWidget extends UnitTestCase { + + function testTextEmptyDefault() { + $tag = new SimpleTextTag(array('type' => 'text')); + $this->assertIdentical($tag->getDefault(), ''); + $this->assertIdentical($tag->getValue(), ''); + } + + function testSettingOfExternalLabel() { + $tag = new SimpleTextTag(array('type' => 'text')); + $tag->setLabel('it'); + $this->assertTrue($tag->isLabel('it')); + } + + function testTextDefault() { + $tag = new SimpleTextTag(array('value' => 'aaa')); + $this->assertEqual($tag->getDefault(), 'aaa'); + $this->assertEqual($tag->getValue(), 'aaa'); + } + + function testSettingTextValue() { + $tag = new SimpleTextTag(array('value' => 'aaa')); + $tag->setValue('bbb'); + $this->assertEqual($tag->getValue(), 'bbb'); + $tag->resetValue(); + $this->assertEqual($tag->getValue(), 'aaa'); + } + + function testFailToSetHiddenValue() { + $tag = new SimpleTextTag(array('value' => 'aaa', 'type' => 'hidden')); + $this->assertFalse($tag->setValue('bbb')); + $this->assertEqual($tag->getValue(), 'aaa'); + } + + function testSubmitDefaults() { + $tag = new SimpleSubmitTag(array('type' => 'submit')); + $this->assertIdentical($tag->getName(), false); + $this->assertEqual($tag->getValue(), 'Submit'); + $this->assertFalse($tag->setValue('Cannot set this')); + $this->assertEqual($tag->getValue(), 'Submit'); + $this->assertEqual($tag->getLabel(), 'Submit'); + + $encoding = new MockSimpleMultipartEncoding(); + $encoding->expectNever('add'); + $tag->write($encoding); + } + + function testPopulatedSubmit() { + $tag = new SimpleSubmitTag( + array('type' => 'submit', 'name' => 's', 'value' => 'Ok!')); + $this->assertEqual($tag->getName(), 's'); + $this->assertEqual($tag->getValue(), 'Ok!'); + $this->assertEqual($tag->getLabel(), 'Ok!'); + + $encoding = new MockSimpleMultipartEncoding(); + $encoding->expectOnce('add', array('s', 'Ok!')); + $tag->write($encoding); + } + + function testImageSubmit() { + $tag = new SimpleImageSubmitTag( + array('type' => 'image', 'name' => 's', 'alt' => 'Label')); + $this->assertEqual($tag->getName(), 's'); + $this->assertEqual($tag->getLabel(), 'Label'); + + $encoding = new MockSimpleMultipartEncoding(); + $encoding->expectAt(0, 'add', array('s.x', 20)); + $encoding->expectAt(1, 'add', array('s.y', 30)); + $tag->write($encoding, 20, 30); + } + + function testImageSubmitTitlePreferredOverAltForLabel() { + $tag = new SimpleImageSubmitTag( + array('type' => 'image', 'name' => 's', 'alt' => 'Label', 'title' => 'Title')); + $this->assertEqual($tag->getLabel(), 'Title'); + } + + function testButton() { + $tag = new SimpleButtonTag( + array('type' => 'submit', 'name' => 's', 'value' => 'do')); + $tag->addContent('I am a button'); + $this->assertEqual($tag->getName(), 's'); + $this->assertEqual($tag->getValue(), 'do'); + $this->assertEqual($tag->getLabel(), 'I am a button'); + + $encoding = new MockSimpleMultipartEncoding(); + $encoding->expectOnce('add', array('s', 'do')); + $tag->write($encoding); + } +} + +class TestOfTextArea extends UnitTestCase { + + function testDefault() { + $tag = new SimpleTextAreaTag(array('name' => 'a')); + $tag->addContent('Some text'); + $this->assertEqual($tag->getName(), 'a'); + $this->assertEqual($tag->getDefault(), 'Some text'); + } + + function testWrapping() { + $tag = new SimpleTextAreaTag(array('cols' => '10', 'wrap' => 'physical')); + $tag->addContent("Lot's of text that should be wrapped"); + $this->assertEqual( + $tag->getDefault(), + "Lot's of\r\ntext that\r\nshould be\r\nwrapped"); + $tag->setValue("New long text\r\nwith two lines"); + $this->assertEqual( + $tag->getValue(), + "New long\r\ntext\r\nwith two\r\nlines"); + } + + function testWrappingRemovesLeadingcariageReturn() { + $tag = new SimpleTextAreaTag(array('cols' => '20', 'wrap' => 'physical')); + $tag->addContent("\rStuff"); + $this->assertEqual($tag->getDefault(), 'Stuff'); + $tag->setValue("\nNew stuff\n"); + $this->assertEqual($tag->getValue(), "New stuff\r\n"); + } + + function testBreaksAreNewlineAndCarriageReturn() { + $tag = new SimpleTextAreaTag(array('cols' => '10')); + $tag->addContent("Some\nText\rwith\r\nbreaks"); + $this->assertEqual($tag->getValue(), "Some\r\nText\r\nwith\r\nbreaks"); + } +} + +class TestOfCheckbox extends UnitTestCase { + + function testCanSetCheckboxToNamedValueWithBooleanTrue() { + $tag = new SimpleCheckboxTag(array('name' => 'a', 'value' => 'A')); + $this->assertEqual($tag->getValue(), false); + $tag->setValue(true); + $this->assertIdentical($tag->getValue(), 'A'); + } +} + +class TestOfSelection extends UnitTestCase { + + function testEmpty() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $this->assertIdentical($tag->getValue(), ''); + } + + function testSingle() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $option = new SimpleOptionTag(array()); + $option->addContent('AAA'); + $tag->addTag($option); + $this->assertEqual($tag->getValue(), 'AAA'); + } + + function testSingleDefault() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $option = new SimpleOptionTag(array('selected' => '')); + $option->addContent('AAA'); + $tag->addTag($option); + $this->assertEqual($tag->getValue(), 'AAA'); + } + + function testSingleMappedDefault() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $option = new SimpleOptionTag(array('selected' => '', 'value' => 'aaa')); + $option->addContent('AAA'); + $tag->addTag($option); + $this->assertEqual($tag->getValue(), 'aaa'); + } + + function testStartsWithDefault() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array()); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('selected' => '')); + $b->addContent('BBB'); + $tag->addTag($b); + $c = new SimpleOptionTag(array()); + $c->addContent('CCC'); + $tag->addTag($c); + $this->assertEqual($tag->getValue(), 'BBB'); + } + + function testSettingOption() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array()); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('selected' => '')); + $b->addContent('BBB'); + $tag->addTag($b); + $c = new SimpleOptionTag(array()); + $c->addContent('CCC'); + $tag->setValue('AAA'); + $this->assertEqual($tag->getValue(), 'AAA'); + } + + function testSettingMappedOption() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array('value' => 'aaa')); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('value' => 'bbb', 'selected' => '')); + $b->addContent('BBB'); + $tag->addTag($b); + $c = new SimpleOptionTag(array('value' => 'ccc')); + $c->addContent('CCC'); + $tag->addTag($c); + $tag->setValue('AAA'); + $this->assertEqual($tag->getValue(), 'aaa'); + $tag->setValue('ccc'); + $this->assertEqual($tag->getValue(), 'ccc'); + } + + function testSelectionDespiteSpuriousWhitespace() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array()); + $a->addContent(' AAA '); + $tag->addTag($a); + $b = new SimpleOptionTag(array('selected' => '')); + $b->addContent(' BBB '); + $tag->addTag($b); + $c = new SimpleOptionTag(array()); + $c->addContent(' CCC '); + $tag->addTag($c); + $this->assertEqual($tag->getValue(), ' BBB '); + $tag->setValue('AAA'); + $this->assertEqual($tag->getValue(), ' AAA '); + } + + function testFailToSetIllegalOption() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array()); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('selected' => '')); + $b->addContent('BBB'); + $tag->addTag($b); + $c = new SimpleOptionTag(array()); + $c->addContent('CCC'); + $tag->addTag($c); + $this->assertFalse($tag->setValue('Not present')); + $this->assertEqual($tag->getValue(), 'BBB'); + } + + function testNastyOptionValuesThatLookLikeFalse() { + $tag = new SimpleSelectionTag(array('name' => 'a')); + $a = new SimpleOptionTag(array('value' => '1')); + $a->addContent('One'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('value' => '0')); + $b->addContent('Zero'); + $tag->addTag($b); + $this->assertIdentical($tag->getValue(), '1'); + $tag->setValue('Zero'); + $this->assertIdentical($tag->getValue(), '0'); + } + + function testBlankOption() { + $tag = new SimpleSelectionTag(array('name' => 'A')); + $a = new SimpleOptionTag(array()); + $tag->addTag($a); + $b = new SimpleOptionTag(array()); + $b->addContent('b'); + $tag->addTag($b); + $this->assertIdentical($tag->getValue(), ''); + $tag->setValue('b'); + $this->assertIdentical($tag->getValue(), 'b'); + $tag->setValue(''); + $this->assertIdentical($tag->getValue(), ''); + } + + function testMultipleDefaultWithNoSelections() { + $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); + $a = new SimpleOptionTag(array()); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array()); + $b->addContent('BBB'); + $tag->addTag($b); + $this->assertIdentical($tag->getDefault(), array()); + $this->assertIdentical($tag->getValue(), array()); + } + + function testMultipleDefaultWithSelections() { + $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); + $a = new SimpleOptionTag(array('selected' => '')); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array('selected' => '')); + $b->addContent('BBB'); + $tag->addTag($b); + $this->assertIdentical($tag->getDefault(), array('AAA', 'BBB')); + $this->assertIdentical($tag->getValue(), array('AAA', 'BBB')); + } + + function testSettingMultiple() { + $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); + $a = new SimpleOptionTag(array('selected' => '')); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array()); + $b->addContent('BBB'); + $tag->addTag($b); + $c = new SimpleOptionTag(array('selected' => '', 'value' => 'ccc')); + $c->addContent('CCC'); + $tag->addTag($c); + $this->assertIdentical($tag->getDefault(), array('AAA', 'ccc')); + $this->assertTrue($tag->setValue(array('BBB', 'ccc'))); + $this->assertIdentical($tag->getValue(), array('BBB', 'ccc')); + $this->assertTrue($tag->setValue(array())); + $this->assertIdentical($tag->getValue(), array()); + } + + function testFailToSetIllegalOptionsInMultiple() { + $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); + $a = new SimpleOptionTag(array('selected' => '')); + $a->addContent('AAA'); + $tag->addTag($a); + $b = new SimpleOptionTag(array()); + $b->addContent('BBB'); + $tag->addTag($b); + $this->assertFalse($tag->setValue(array('CCC'))); + $this->assertTrue($tag->setValue(array('AAA', 'BBB'))); + $this->assertFalse($tag->setValue(array('AAA', 'CCC'))); + } +} + +class TestOfRadioGroup extends UnitTestCase { + + function testEmptyGroup() { + $group = new SimpleRadioGroup(); + $this->assertIdentical($group->getDefault(), false); + $this->assertIdentical($group->getValue(), false); + $this->assertFalse($group->setValue('a')); + } + + function testReadingSingleButtonGroup() { + $group = new SimpleRadioGroup(); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'A', 'checked' => ''))); + $this->assertIdentical($group->getDefault(), 'A'); + $this->assertIdentical($group->getValue(), 'A'); + } + + function testReadingMultipleButtonGroup() { + $group = new SimpleRadioGroup(); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'A'))); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'B', 'checked' => ''))); + $this->assertIdentical($group->getDefault(), 'B'); + $this->assertIdentical($group->getValue(), 'B'); + } + + function testFailToSetUnlistedValue() { + $group = new SimpleRadioGroup(); + $group->addWidget(new SimpleRadioButtonTag(array('value' => 'z'))); + $this->assertFalse($group->setValue('a')); + $this->assertIdentical($group->getValue(), false); + } + + function testSettingNewValueClearsTheOldOne() { + $group = new SimpleRadioGroup(); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'A'))); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'B', 'checked' => ''))); + $this->assertTrue($group->setValue('A')); + $this->assertIdentical($group->getValue(), 'A'); + } + + function testIsIdMatchesAnyWidgetInSet() { + $group = new SimpleRadioGroup(); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'A', 'id' => 'i1'))); + $group->addWidget(new SimpleRadioButtonTag( + array('value' => 'B', 'id' => 'i2'))); + $this->assertFalse($group->isId('i0')); + $this->assertTrue($group->isId('i1')); + $this->assertTrue($group->isId('i2')); + } + + function testIsLabelMatchesAnyWidgetInSet() { + $group = new SimpleRadioGroup(); + $button1 = new SimpleRadioButtonTag(array('value' => 'A')); + $button1->setLabel('one'); + $group->addWidget($button1); + $button2 = new SimpleRadioButtonTag(array('value' => 'B')); + $button2->setLabel('two'); + $group->addWidget($button2); + $this->assertFalse($group->isLabel('three')); + $this->assertTrue($group->isLabel('one')); + $this->assertTrue($group->isLabel('two')); + } +} + +class TestOfTagGroup extends UnitTestCase { + + function testReadingMultipleCheckboxGroup() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag( + array('value' => 'B', 'checked' => ''))); + $this->assertIdentical($group->getDefault(), 'B'); + $this->assertIdentical($group->getValue(), 'B'); + } + + function testReadingMultipleUncheckedItems() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); + $this->assertIdentical($group->getDefault(), false); + $this->assertIdentical($group->getValue(), false); + } + + function testReadingMultipleCheckedItems() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag( + array('value' => 'A', 'checked' => ''))); + $group->addWidget(new SimpleCheckboxTag( + array('value' => 'B', 'checked' => ''))); + $this->assertIdentical($group->getDefault(), array('A', 'B')); + $this->assertIdentical($group->getValue(), array('A', 'B')); + } + + function testSettingSingleValue() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); + $this->assertTrue($group->setValue('A')); + $this->assertIdentical($group->getValue(), 'A'); + $this->assertTrue($group->setValue('B')); + $this->assertIdentical($group->getValue(), 'B'); + } + + function testSettingMultipleValues() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); + $this->assertTrue($group->setValue(array('A', 'B'))); + $this->assertIdentical($group->getValue(), array('A', 'B')); + } + + function testSettingNoValue() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); + $this->assertTrue($group->setValue(false)); + $this->assertIdentical($group->getValue(), false); + } + + function testIsIdMatchesAnyIdInSet() { + $group = new SimpleCheckboxGroup(); + $group->addWidget(new SimpleCheckboxTag(array('id' => 1, 'value' => 'A'))); + $group->addWidget(new SimpleCheckboxTag(array('id' => 2, 'value' => 'B'))); + $this->assertFalse($group->isId(0)); + $this->assertTrue($group->isId(1)); + $this->assertTrue($group->isId(2)); + } +} + +class TestOfUploadWidget extends UnitTestCase { + + function testValueIsFilePath() { + $upload = new SimpleUploadTag(array('name' => 'a')); + $upload->setValue(dirname(__FILE__) . '/support/upload_sample.txt'); + $this->assertEqual($upload->getValue(), dirname(__FILE__) . '/support/upload_sample.txt'); + } + + function testSubmitsFileContents() { + $encoding = new MockSimpleMultipartEncoding(); + $encoding->expectOnce('attach', array( + 'a', + 'Sample for testing file upload', + 'upload_sample.txt')); + $upload = new SimpleUploadTag(array('name' => 'a')); + $upload->setValue(dirname(__FILE__) . '/support/upload_sample.txt'); + $upload->write($encoding); + } +} + +class TestOfLabelTag extends UnitTestCase { + + function testLabelShouldHaveAnEndTag() { + $label = new SimpleLabelTag(array()); + $this->assertTrue($label->expectEndTag()); + } + + function testContentIsTextOnly() { + $label = new SimpleLabelTag(array()); + $label->addContent('Here are words'); + $this->assertEqual($label->getText(), 'Here are words'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/test_with_parse_error.php b/webdata/stdlibs/simpletest/test/test_with_parse_error.php new file mode 100644 index 0000000..41a5832 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/test_with_parse_error.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/unit_tester_test.php b/webdata/stdlibs/simpletest/test/unit_tester_test.php new file mode 100644 index 0000000..ce9850f --- /dev/null +++ b/webdata/stdlibs/simpletest/test/unit_tester_test.php @@ -0,0 +1,61 @@ +assertTrue($this->assertTrue(true)); + } + + function testAssertFalseReturnsAssertionAsBoolean() { + $this->assertTrue($this->assertFalse(false)); + } + + function testAssertEqualReturnsAssertionAsBoolean() { + $this->assertTrue($this->assertEqual(5, 5)); + } + + function testAssertIdenticalReturnsAssertionAsBoolean() { + $this->assertTrue($this->assertIdentical(5, 5)); + } + + function testCoreAssertionsDoNotThrowErrors() { + $this->assertIsA($this, 'UnitTestCase'); + $this->assertNotA($this, 'WebTestCase'); + } + + function testReferenceAssertionOnObjects() { + $a = new ReferenceForTesting(); + $b = $a; + $this->assertSame($a, $b); + } + + function testReferenceAssertionOnScalars() { + $a = 25; + $b = &$a; + $this->assertReference($a, $b); + } + + function testCloneOnObjects() { + $a = new ReferenceForTesting(); + $b = new ReferenceForTesting(); + $this->assertClone($a, $b); + } + + function TODO_testCloneOnScalars() { + $a = 25; + $b = 25; + $this->assertClone($a, $b); + } + + function testCopyOnScalars() { + $a = 25; + $b = 25; + $this->assertCopy($a, $b); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/unit_tests.php b/webdata/stdlibs/simpletest/test/unit_tests.php new file mode 100644 index 0000000..9e62129 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/unit_tests.php @@ -0,0 +1,49 @@ +TestSuite('Unit tests'); + $path = dirname(__FILE__); + $this->addFile($path . '/errors_test.php'); + $this->addFile($path . '/exceptions_test.php'); + $this->addFile($path . '/arguments_test.php'); + $this->addFile($path . '/autorun_test.php'); + $this->addFile($path . '/compatibility_test.php'); + $this->addFile($path . '/simpletest_test.php'); + $this->addFile($path . '/dumper_test.php'); + $this->addFile($path . '/expectation_test.php'); + $this->addFile($path . '/unit_tester_test.php'); + $this->addFile($path . '/reflection_php5_test.php'); + $this->addFile($path . '/mock_objects_test.php'); + $this->addFile($path . '/interfaces_test.php'); + $this->addFile($path . '/collector_test.php'); + $this->addFile($path . '/recorder_test.php'); + $this->addFile($path . '/adapter_test.php'); + $this->addFile($path . '/socket_test.php'); + $this->addFile($path . '/encoding_test.php'); + $this->addFile($path . '/url_test.php'); + $this->addFile($path . '/cookies_test.php'); + $this->addFile($path . '/http_test.php'); + $this->addFile($path . '/authentication_test.php'); + $this->addFile($path . '/user_agent_test.php'); + $this->addFile($path . '/php_parser_test.php'); + $this->addFile($path . '/parsing_test.php'); + $this->addFile($path . '/tag_test.php'); + $this->addFile($path . '/form_test.php'); + $this->addFile($path . '/page_test.php'); + $this->addFile($path . '/frames_test.php'); + $this->addFile($path . '/browser_test.php'); + $this->addFile($path . '/web_tester_test.php'); + $this->addFile($path . '/shell_tester_test.php'); + $this->addFile($path . '/xml_test.php'); + $this->addFile($path . '/../extensions/testdox/test.php'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/url_test.php b/webdata/stdlibs/simpletest/test/url_test.php new file mode 100644 index 0000000..80119af --- /dev/null +++ b/webdata/stdlibs/simpletest/test/url_test.php @@ -0,0 +1,515 @@ +assertEqual($url->getScheme(), ''); + $this->assertEqual($url->getHost(), ''); + $this->assertEqual($url->getScheme('http'), 'http'); + $this->assertEqual($url->getHost('localhost'), 'localhost'); + $this->assertEqual($url->getPath(), ''); + } + + function testBasicParsing() { + $url = new SimpleUrl('https://www.lastcraft.com/test/'); + $this->assertEqual($url->getScheme(), 'https'); + $this->assertEqual($url->getHost(), 'www.lastcraft.com'); + $this->assertEqual($url->getPath(), '/test/'); + } + + function testRelativeUrls() { + $url = new SimpleUrl('../somewhere.php'); + $this->assertEqual($url->getScheme(), false); + $this->assertEqual($url->getHost(), false); + $this->assertEqual($url->getPath(), '../somewhere.php'); + } + + function testParseBareParameter() { + $url = new SimpleUrl('?a'); + $this->assertEqual($url->getPath(), ''); + $this->assertEqual($url->getEncodedRequest(), '?a'); + $url->addRequestParameter('x', 'X'); + $this->assertEqual($url->getEncodedRequest(), '?a=&x=X'); + } + + function testParseEmptyParameter() { + $url = new SimpleUrl('?a='); + $this->assertEqual($url->getPath(), ''); + $this->assertEqual($url->getEncodedRequest(), '?a='); + $url->addRequestParameter('x', 'X'); + $this->assertEqual($url->getEncodedRequest(), '?a=&x=X'); + } + + function testParseParameterPair() { + $url = new SimpleUrl('?a=A'); + $this->assertEqual($url->getPath(), ''); + $this->assertEqual($url->getEncodedRequest(), '?a=A'); + $url->addRequestParameter('x', 'X'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&x=X'); + } + + function testParseMultipleParameters() { + $url = new SimpleUrl('?a=A&b=B'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B'); + $url->addRequestParameter('x', 'X'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B&x=X'); + } + + function testParsingParameterMixture() { + $url = new SimpleUrl('?a=A&b=&c'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c'); + $url->addRequestParameter('x', 'X'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c=&x=X'); + } + + function testAddParametersFromScratch() { + $url = new SimpleUrl(''); + $url->addRequestParameter('a', 'A'); + $this->assertEqual($url->getEncodedRequest(), '?a=A'); + $url->addRequestParameter('b', 'B'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B'); + $url->addRequestParameter('a', 'aaa'); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B&a=aaa'); + } + + function testClearingParameters() { + $url = new SimpleUrl(''); + $url->addRequestParameter('a', 'A'); + $url->clearRequest(); + $this->assertIdentical($url->getEncodedRequest(), ''); + } + + function testEncodingParameters() { + $url = new SimpleUrl(''); + $url->addRequestParameter('a', '?!"\'#~@[]{}:;<>,./|$%^&*()_+-='); + $this->assertIdentical( + $request = $url->getEncodedRequest(), + '?a=%3F%21%22%27%23%7E%40%5B%5D%7B%7D%3A%3B%3C%3E%2C.%2F%7C%24%25%5E%26%2A%28%29_%2B-%3D'); + } + + function testDecodingParameters() { + $url = new SimpleUrl('?a=%3F%21%22%27%23%7E%40%5B%5D%7B%7D%3A%3B%3C%3E%2C.%2F%7C%24%25%5E%26%2A%28%29_%2B-%3D'); + $this->assertEqual( + $url->getEncodedRequest(), + '?a=' . urlencode('?!"\'#~@[]{}:;<>,./|$%^&*()_+-=')); + } + + function testUrlInQueryDoesNotConfuseParsing() { + $url = new SimpleUrl('wibble/login.php?url=http://www.google.com/moo/'); + $this->assertFalse($url->getScheme()); + $this->assertFalse($url->getHost()); + $this->assertEqual($url->getPath(), 'wibble/login.php'); + $this->assertEqual($url->getEncodedRequest(), '?url=http://www.google.com/moo/'); + } + + function testSettingCordinates() { + $url = new SimpleUrl(''); + $url->setCoordinates('32', '45'); + $this->assertIdentical($url->getX(), 32); + $this->assertIdentical($url->getY(), 45); + $this->assertEqual($url->getEncodedRequest(), ''); + } + + function testParseCordinates() { + $url = new SimpleUrl('?32,45'); + $this->assertIdentical($url->getX(), 32); + $this->assertIdentical($url->getY(), 45); + } + + function testClearingCordinates() { + $url = new SimpleUrl('?32,45'); + $url->setCoordinates(); + $this->assertIdentical($url->getX(), false); + $this->assertIdentical($url->getY(), false); + } + + function testParsingParameterCordinateMixture() { + $url = new SimpleUrl('?a=A&b=&c?32,45'); + $this->assertIdentical($url->getX(), 32); + $this->assertIdentical($url->getY(), 45); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c'); + } + + function testParsingParameterWithBadCordinates() { + $url = new SimpleUrl('?a=A&b=&c?32'); + $this->assertIdentical($url->getX(), false); + $this->assertIdentical($url->getY(), false); + $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c?32'); + } + + function testPageSplitting() { + $url = new SimpleUrl('./here/../there/somewhere.php'); + $this->assertEqual($url->getPath(), './here/../there/somewhere.php'); + $this->assertEqual($url->getPage(), 'somewhere.php'); + $this->assertEqual($url->getBasePath(), './here/../there/'); + } + + function testAbsolutePathPageSplitting() { + $url = new SimpleUrl("http://host.com/here/there/somewhere.php"); + $this->assertEqual($url->getPath(), "/here/there/somewhere.php"); + $this->assertEqual($url->getPage(), "somewhere.php"); + $this->assertEqual($url->getBasePath(), "/here/there/"); + } + + function testSplittingUrlWithNoPageGivesEmptyPage() { + $url = new SimpleUrl('/here/there/'); + $this->assertEqual($url->getPath(), '/here/there/'); + $this->assertEqual($url->getPage(), ''); + $this->assertEqual($url->getBasePath(), '/here/there/'); + } + + function testPathNormalisation() { + $url = new SimpleUrl(); + $this->assertEqual( + $url->normalisePath('https://host.com/I/am/here/../there/somewhere.php'), + 'https://host.com/I/am/there/somewhere.php'); + } + + // regression test for #1535407 + function testPathNormalisationWithSinglePeriod() { + $url = new SimpleUrl(); + $this->assertEqual( + $url->normalisePath('https://host.com/I/am/here/./../there/somewhere.php'), + 'https://host.com/I/am/there/somewhere.php'); + } + + // regression test for #1852413 + function testHostnameExtractedFromUContainingAtSign() { + $url = new SimpleUrl("http://localhost/name@example.com"); + $this->assertEqual($url->getScheme(), "http"); + $this->assertEqual($url->getUsername(), ""); + $this->assertEqual($url->getPassword(), ""); + $this->assertEqual($url->getHost(), "localhost"); + $this->assertEqual($url->getPath(), "/name@example.com"); + } + + function testHostnameInLocalhost() { + $url = new SimpleUrl("http://localhost/name/example.com"); + $this->assertEqual($url->getScheme(), "http"); + $this->assertEqual($url->getUsername(), ""); + $this->assertEqual($url->getPassword(), ""); + $this->assertEqual($url->getHost(), "localhost"); + $this->assertEqual($url->getPath(), "/name/example.com"); + } + + function testUsernameAndPasswordAreUrlDecoded() { + $url = new SimpleUrl('http://' . urlencode('test@test') . + ':' . urlencode('$!�@*&%') . '@www.lastcraft.com'); + $this->assertEqual($url->getUsername(), 'test@test'); + $this->assertEqual($url->getPassword(), '$!�@*&%'); + } + + function testBlitz() { + $this->assertUrl( + "https://username:password@www.somewhere.com:243/this/that/here.php?a=1&b=2#anchor", + array("https", "username", "password", "www.somewhere.com", 243, "/this/that/here.php", "com", "?a=1&b=2", "anchor"), + array("a" => "1", "b" => "2")); + $this->assertUrl( + "username:password@www.somewhere.com/this/that/here.php?a=1", + array(false, "username", "password", "www.somewhere.com", false, "/this/that/here.php", "com", "?a=1", false), + array("a" => "1")); + $this->assertUrl( + "username:password@somewhere.com:243?1,2", + array(false, "username", "password", "somewhere.com", 243, "/", "com", "", false), + array(), + array(1, 2)); + $this->assertUrl( + "https://www.somewhere.com", + array("https", false, false, "www.somewhere.com", false, "/", "com", "", false)); + $this->assertUrl( + "username@www.somewhere.com:243#anchor", + array(false, "username", false, "www.somewhere.com", 243, "/", "com", "", "anchor")); + $this->assertUrl( + "/this/that/here.php?a=1&b=2?3,4", + array(false, false, false, false, false, "/this/that/here.php", false, "?a=1&b=2", false), + array("a" => "1", "b" => "2"), + array(3, 4)); + $this->assertUrl( + "username@/here.php?a=1&b=2", + array(false, "username", false, false, false, "/here.php", false, "?a=1&b=2", false), + array("a" => "1", "b" => "2")); + } + + function testAmbiguousHosts() { + $this->assertUrl( + "tigger", + array(false, false, false, false, false, "tigger", false, "", false)); + $this->assertUrl( + "/tigger", + array(false, false, false, false, false, "/tigger", false, "", false)); + $this->assertUrl( + "//tigger", + array(false, false, false, "tigger", false, "/", false, "", false)); + $this->assertUrl( + "//tigger/", + array(false, false, false, "tigger", false, "/", false, "", false)); + $this->assertUrl( + "tigger.com", + array(false, false, false, "tigger.com", false, "/", "com", "", false)); + $this->assertUrl( + "me.net/tigger", + array(false, false, false, "me.net", false, "/tigger", "net", "", false)); + } + + function testAsString() { + $this->assertPreserved('https://www.here.com'); + $this->assertPreserved('http://me:secret@www.here.com'); + $this->assertPreserved('http://here/there'); + $this->assertPreserved('http://here/there?a=A&b=B'); + $this->assertPreserved('http://here/there?a=1&a=2'); + $this->assertPreserved('http://here/there?a=1&a=2?9,8'); + $this->assertPreserved('http://host?a=1&a=2'); + $this->assertPreserved('http://host#stuff'); + $this->assertPreserved('http://me:secret@www.here.com/a/b/c/here.html?a=A?7,6'); + $this->assertPreserved('http://www.here.com/?a=A__b=B'); + $this->assertPreserved('http://www.example.com:8080/'); + } + + function testUrlWithTwoSlashesInPath() { + $url = new SimpleUrl('/article/categoryedit/insert//'); + $this->assertEqual($url->getPath(), '/article/categoryedit/insert//'); + } + + function testUrlWithRequestKeyEncoded() { + $url = new SimpleUrl('/?foo%5B1%5D=bar'); + $this->assertEqual($url->getEncodedRequest(), '?foo%5B1%5D=bar'); + $url->addRequestParameter('a[1]', 'b[]'); + $this->assertEqual($url->getEncodedRequest(), '?foo%5B1%5D=bar&a%5B1%5D=b%5B%5D'); + + $url = new SimpleUrl('/'); + $url->addRequestParameter('a[1]', 'b[]'); + $this->assertEqual($url->getEncodedRequest(), '?a%5B1%5D=b%5B%5D'); + } + + function testUrlWithRequestKeyEncodedAndParamNamLookingLikePair() { + $url = new SimpleUrl('/'); + $url->addRequestParameter('foo[]=bar', ''); + $this->assertEqual($url->getEncodedRequest(), '?foo%5B%5D%3Dbar='); + $url = new SimpleUrl('/?foo%5B%5D%3Dbar='); + $this->assertEqual($url->getEncodedRequest(), '?foo%5B%5D%3Dbar='); + } + + function assertUrl($raw, $parts, $params = false, $coords = false) { + if (! is_array($params)) { + $params = array(); + } + $url = new SimpleUrl($raw); + $this->assertIdentical($url->getScheme(), $parts[0], "[$raw] scheme -> %s"); + $this->assertIdentical($url->getUsername(), $parts[1], "[$raw] username -> %s"); + $this->assertIdentical($url->getPassword(), $parts[2], "[$raw] password -> %s"); + $this->assertIdentical($url->getHost(), $parts[3], "[$raw] host -> %s"); + $this->assertIdentical($url->getPort(), $parts[4], "[$raw] port -> %s"); + $this->assertIdentical($url->getPath(), $parts[5], "[$raw] path -> %s"); + $this->assertIdentical($url->getTld(), $parts[6], "[$raw] tld -> %s"); + $this->assertIdentical($url->getEncodedRequest(), $parts[7], "[$raw] encoded -> %s"); + $this->assertIdentical($url->getFragment(), $parts[8], "[$raw] fragment -> %s"); + if ($coords) { + $this->assertIdentical($url->getX(), $coords[0], "[$raw] x -> %s"); + $this->assertIdentical($url->getY(), $coords[1], "[$raw] y -> %s"); + } + } + + function assertPreserved($string) { + $url = new SimpleUrl($string); + $this->assertEqual($url->asString(), $string); + } +} + +class TestOfAbsoluteUrls extends UnitTestCase { + + function testDirectoriesAfterFilename() { + $string = '../../index.php/foo/bar'; + $url = new SimpleUrl($string); + $this->assertEqual($url->asString(), $string); + + $absolute = $url->makeAbsolute('http://www.domain.com/some/path/'); + $this->assertEqual($absolute->asString(), 'http://www.domain.com/index.php/foo/bar'); + } + + function testMakingAbsolute() { + $url = new SimpleUrl('../there/somewhere.php'); + $this->assertEqual($url->getPath(), '../there/somewhere.php'); + $absolute = $url->makeAbsolute('https://host.com:1234/I/am/here/'); + $this->assertEqual($absolute->getScheme(), 'https'); + $this->assertEqual($absolute->getHost(), 'host.com'); + $this->assertEqual($absolute->getPort(), 1234); + $this->assertEqual($absolute->getPath(), '/I/am/there/somewhere.php'); + } + + function testMakingAnEmptyUrlAbsolute() { + $url = new SimpleUrl(''); + $this->assertEqual($url->getPath(), ''); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); + $this->assertEqual($absolute->getScheme(), 'http'); + $this->assertEqual($absolute->getHost(), 'host.com'); + $this->assertEqual($absolute->getPath(), '/I/am/here/page.html'); + } + + function testMakingAnEmptyUrlAbsoluteWithMissingPageName() { + $url = new SimpleUrl(''); + $this->assertEqual($url->getPath(), ''); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); + $this->assertEqual($absolute->getScheme(), 'http'); + $this->assertEqual($absolute->getHost(), 'host.com'); + $this->assertEqual($absolute->getPath(), '/I/am/here/'); + } + + function testMakingAShortQueryUrlAbsolute() { + $url = new SimpleUrl('?a#b'); + $this->assertEqual($url->getPath(), ''); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); + $this->assertEqual($absolute->getScheme(), 'http'); + $this->assertEqual($absolute->getHost(), 'host.com'); + $this->assertEqual($absolute->getPath(), '/I/am/here/'); + $this->assertEqual($absolute->getEncodedRequest(), '?a'); + $this->assertEqual($absolute->getFragment(), 'b'); + } + + function testMakingADirectoryUrlAbsolute() { + $url = new SimpleUrl('hello/'); + $this->assertEqual($url->getPath(), 'hello/'); + $this->assertEqual($url->getBasePath(), 'hello/'); + $this->assertEqual($url->getPage(), ''); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); + $this->assertEqual($absolute->getPath(), '/I/am/here/hello/'); + } + + function testMakingARootUrlAbsolute() { + $url = new SimpleUrl('/'); + $this->assertEqual($url->getPath(), '/'); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); + $this->assertEqual($absolute->getPath(), '/'); + } + + function testMakingARootPageUrlAbsolute() { + $url = new SimpleUrl('/here.html'); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); + $this->assertEqual($absolute->getPath(), '/here.html'); + } + + function testCarryAuthenticationFromRootPage() { + $url = new SimpleUrl('here.html'); + $absolute = $url->makeAbsolute('http://test:secret@host.com/'); + $this->assertEqual($absolute->getPath(), '/here.html'); + $this->assertEqual($absolute->getUsername(), 'test'); + $this->assertEqual($absolute->getPassword(), 'secret'); + } + + function testMakingCoordinateUrlAbsolute() { + $url = new SimpleUrl('?1,2'); + $this->assertEqual($url->getPath(), ''); + $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); + $this->assertEqual($absolute->getScheme(), 'http'); + $this->assertEqual($absolute->getHost(), 'host.com'); + $this->assertEqual($absolute->getPath(), '/I/am/here/'); + $this->assertEqual($absolute->getX(), 1); + $this->assertEqual($absolute->getY(), 2); + } + + function testMakingAbsoluteAppendedPath() { + $url = new SimpleUrl('./there/somewhere.php'); + $absolute = $url->makeAbsolute('https://host.com/here/'); + $this->assertEqual($absolute->getPath(), '/here/there/somewhere.php'); + } + + function testMakingAbsoluteBadlyFormedAppendedPath() { + $url = new SimpleUrl('there/somewhere.php'); + $absolute = $url->makeAbsolute('https://host.com/here/'); + $this->assertEqual($absolute->getPath(), '/here/there/somewhere.php'); + } + + function testMakingAbsoluteHasNoEffectWhenAlreadyAbsolute() { + $url = new SimpleUrl('https://test:secret@www.lastcraft.com:321/stuff/?a=1#f'); + $absolute = $url->makeAbsolute('http://host.com/here/'); + $this->assertEqual($absolute->getScheme(), 'https'); + $this->assertEqual($absolute->getUsername(), 'test'); + $this->assertEqual($absolute->getPassword(), 'secret'); + $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); + $this->assertEqual($absolute->getPort(), 321); + $this->assertEqual($absolute->getPath(), '/stuff/'); + $this->assertEqual($absolute->getEncodedRequest(), '?a=1'); + $this->assertEqual($absolute->getFragment(), 'f'); + } + + function testMakingAbsoluteCarriesAuthenticationWhenAlreadyAbsolute() { + $url = new SimpleUrl('https://www.lastcraft.com'); + $absolute = $url->makeAbsolute('http://test:secret@host.com/here/'); + $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); + $this->assertEqual($absolute->getUsername(), 'test'); + $this->assertEqual($absolute->getPassword(), 'secret'); + } + + function testMakingHostOnlyAbsoluteDoesNotCarryAnyOtherInformation() { + $url = new SimpleUrl('http://www.lastcraft.com'); + $absolute = $url->makeAbsolute('https://host.com:81/here/'); + $this->assertEqual($absolute->getScheme(), 'http'); + $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); + $this->assertIdentical($absolute->getPort(), false); + $this->assertEqual($absolute->getPath(), '/'); + } +} + +class TestOfFrameUrl extends UnitTestCase { + + function testTargetAttachment() { + $url = new SimpleUrl('http://www.site.com/home.html'); + $this->assertIdentical($url->getTarget(), false); + $url->setTarget('A frame'); + $this->assertIdentical($url->getTarget(), 'A frame'); + } +} + +/** + * @note Based off of http://www.mozilla.org/quality/networking/testing/filetests.html + */ +class TestOfFileUrl extends UnitTestCase { + + function testMinimalUrl() { + $url = new SimpleUrl('file:///'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/'); + } + + function testUnixUrl() { + $url = new SimpleUrl('file:///fileInRoot'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/fileInRoot'); + } + + function testDOSVolumeUrl() { + $url = new SimpleUrl('file:///C:/config.sys'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/C:/config.sys'); + } + + function testDOSVolumePromotion() { + $url = new SimpleUrl('file://C:/config.sys'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/C:/config.sys'); + } + + function testDOSBackslashes() { + $url = new SimpleUrl('file:///C:\config.sys'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/C:/config.sys'); + } + + function testDOSDirnameAfterFile() { + $url = new SimpleUrl('file://C:\config.sys'); + $this->assertEqual($url->getScheme(), 'file'); + $this->assertIdentical($url->getHost(), false); + $this->assertEqual($url->getPath(), '/C:/config.sys'); + } + +} + +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/user_agent_test.php b/webdata/stdlibs/simpletest/test/user_agent_test.php new file mode 100644 index 0000000..030abeb --- /dev/null +++ b/webdata/stdlibs/simpletest/test/user_agent_test.php @@ -0,0 +1,348 @@ +headers = new MockSimpleHttpHeaders(); + $this->response = new MockSimpleHttpResponse(); + $this->response->setReturnValue('isError', false); + $this->response->returns('getHeaders', new MockSimpleHttpHeaders()); + $this->request = new MockSimpleHttpRequest(); + $this->request->returns('fetch', $this->response); + } + + function testGetRequestWithoutIncidentGivesNoErrors() { + $url = new SimpleUrl('http://test:secret@this.com/page.html'); + $url->addRequestParameters(array('a' => 'A', 'b' => 'B')); + + $agent = new MockRequestUserAgent(); + $agent->returns('createHttpRequest', $this->request); + $agent->__construct(); + + $response = $agent->fetchResponse( + new SimpleUrl('http://test:secret@this.com/page.html'), + new SimpleGetEncoding(array('a' => 'A', 'b' => 'B'))); + $this->assertFalse($response->isError()); + } +} + +class TestOfAdditionalHeaders extends UnitTestCase { + + function testAdditionalHeaderAddedToRequest() { + $response = new MockSimpleHttpResponse(); + $response->setReturnReference('getHeaders', new MockSimpleHttpHeaders()); + + $request = new MockSimpleHttpRequest(); + $request->setReturnReference('fetch', $response); + $request->expectOnce( + 'addHeaderLine', + array('User-Agent: SimpleTest')); + + $agent = new MockRequestUserAgent(); + $agent->setReturnReference('createHttpRequest', $request); + $agent->__construct(); + $agent->addHeader('User-Agent: SimpleTest'); + $response = $agent->fetchResponse(new SimpleUrl('http://this.host/'), new SimpleGetEncoding()); + } +} + +class TestOfBrowserCookies extends UnitTestCase { + + private function createStandardResponse() { + $response = new MockSimpleHttpResponse(); + $response->setReturnValue("isError", false); + $response->setReturnValue("getContent", "stuff"); + $response->setReturnReference("getHeaders", new MockSimpleHttpHeaders()); + return $response; + } + + private function createCookieSite($header_lines) { + $headers = new SimpleHttpHeaders($header_lines); + $response = new MockSimpleHttpResponse(); + $response->setReturnValue("isError", false); + $response->setReturnReference("getHeaders", $headers); + $response->setReturnValue("getContent", "stuff"); + $request = new MockSimpleHttpRequest(); + $request->setReturnReference("fetch", $response); + return $request; + } + + private function createMockedRequestUserAgent(&$request) { + $agent = new MockRequestUserAgent(); + $agent->setReturnReference('createHttpRequest', $request); + $agent->__construct(); + return $agent; + } + + function testCookieJarIsSentToRequest() { + $jar = new SimpleCookieJar(); + $jar->setCookie('a', 'A'); + + $request = new MockSimpleHttpRequest(); + $request->returns('fetch', $this->createStandardResponse()); + $request->expectOnce('readCookiesFromJar', array($jar, '*')); + + $agent = $this->createMockedRequestUserAgent($request); + $agent->setCookie('a', 'A'); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + } + + function testNoCookieJarIsSentToRequestWhenCookiesAreDisabled() { + $request = new MockSimpleHttpRequest(); + $request->returns('fetch', $this->createStandardResponse()); + $request->expectNever('readCookiesFromJar'); + + $agent = $this->createMockedRequestUserAgent($request); + $agent->setCookie('a', 'A'); + $agent->ignoreCookies(); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + } + + function testReadingNewCookie() { + $request = $this->createCookieSite('Set-cookie: a=AAAA'); + $agent = $this->createMockedRequestUserAgent($request); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $this->assertEqual($agent->getCookieValue("this.com", "this/path/", "a"), "AAAA"); + } + + function testIgnoringNewCookieWhenCookiesDisabled() { + $request = $this->createCookieSite('Set-cookie: a=AAAA'); + $agent = $this->createMockedRequestUserAgent($request); + $agent->ignoreCookies(); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $this->assertIdentical($agent->getCookieValue("this.com", "this/path/", "a"), false); + } + + function testOverwriteCookieThatAlreadyExists() { + $request = $this->createCookieSite('Set-cookie: a=AAAA'); + $agent = $this->createMockedRequestUserAgent($request); + $agent->setCookie('a', 'A'); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $this->assertEqual($agent->getCookieValue("this.com", "this/path/", "a"), "AAAA"); + } + + function testClearCookieBySettingExpiry() { + $request = $this->createCookieSite('Set-cookie: a=b'); + $agent = $this->createMockedRequestUserAgent($request); + + $agent->setCookie("a", "A", "this/path/", "Wed, 25-Dec-02 04:24:21 GMT"); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $this->assertIdentical( + $agent->getCookieValue("this.com", "this/path/", "a"), + "b"); + $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); + $this->assertIdentical( + $agent->getCookieValue("this.com", "this/path/", "a"), + false); + } + + function testAgeingAndClearing() { + $request = $this->createCookieSite('Set-cookie: a=A; expires=Wed, 25-Dec-02 04:24:21 GMT; path=/this/path'); + $agent = $this->createMockedRequestUserAgent($request); + + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); + $this->assertIdentical( + $agent->getCookieValue("this.com", "this/path/", "a"), + "A"); + $agent->ageCookies(2); + $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); + $this->assertIdentical( + $agent->getCookieValue("this.com", "this/path/", "a"), + false); + } + + function testReadingIncomingAndSettingNewCookies() { + $request = $this->createCookieSite('Set-cookie: a=AAA'); + $agent = $this->createMockedRequestUserAgent($request); + + $this->assertNull($agent->getBaseCookieValue("a", false)); + $agent->fetchResponse( + new SimpleUrl('http://this.com/this/path/page.html'), + new SimpleGetEncoding()); + $agent->setCookie("b", "BBB", "this.com", "this/path/"); + $this->assertEqual( + $agent->getBaseCookieValue("a", new SimpleUrl('http://this.com/this/path/page.html')), + "AAA"); + $this->assertEqual( + $agent->getBaseCookieValue("b", new SimpleUrl('http://this.com/this/path/page.html')), + "BBB"); + } +} + +class TestOfHttpRedirects extends UnitTestCase { + + function createRedirect($content, $redirect) { + $headers = new MockSimpleHttpHeaders(); + $headers->setReturnValue('isRedirect', (boolean)$redirect); + $headers->setReturnValue('getLocation', $redirect); + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('getContent', $content); + $response->setReturnReference('getHeaders', $headers); + $request = new MockSimpleHttpRequest(); + $request->setReturnReference('fetch', $response); + return $request; + } + + function testDisabledRedirects() { + $agent = new MockRequestUserAgent(); + $agent->returns( + 'createHttpRequest', + $this->createRedirect('stuff', 'there.html')); + $agent->expectOnce('createHttpRequest'); + $agent->__construct(); + $agent->setMaximumRedirects(0); + $response = $agent->fetchResponse(new SimpleUrl('here.html'), new SimpleGetEncoding()); + $this->assertEqual($response->getContent(), 'stuff'); + } + + function testSingleRedirect() { + $agent = new MockRequestUserAgent(); + $agent->returnsAt( + 0, + 'createHttpRequest', + $this->createRedirect('first', 'two.html')); + $agent->returnsAt( + 1, + 'createHttpRequest', + $this->createRedirect('second', 'three.html')); + $agent->expectCallCount('createHttpRequest', 2); + $agent->__construct(); + + $agent->setMaximumRedirects(1); + $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); + $this->assertEqual($response->getContent(), 'second'); + } + + function testDoubleRedirect() { + $agent = new MockRequestUserAgent(); + $agent->returnsAt( + 0, + 'createHttpRequest', + $this->createRedirect('first', 'two.html')); + $agent->returnsAt( + 1, + 'createHttpRequest', + $this->createRedirect('second', 'three.html')); + $agent->returnsAt( + 2, + 'createHttpRequest', + $this->createRedirect('third', 'four.html')); + $agent->expectCallCount('createHttpRequest', 3); + $agent->__construct(); + + $agent->setMaximumRedirects(2); + $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); + $this->assertEqual($response->getContent(), 'third'); + } + + function testSuccessAfterRedirect() { + $agent = new MockRequestUserAgent(); + $agent->returnsAt( + 0, + 'createHttpRequest', + $this->createRedirect('first', 'two.html')); + $agent->returnsAt( + 1, + 'createHttpRequest', + $this->createRedirect('second', false)); + $agent->returnsAt( + 2, + 'createHttpRequest', + $this->createRedirect('third', 'four.html')); + $agent->expectCallCount('createHttpRequest', 2); + $agent->__construct(); + + $agent->setMaximumRedirects(2); + $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); + $this->assertEqual($response->getContent(), 'second'); + } + + function testRedirectChangesPostToGet() { + $agent = new MockRequestUserAgent(); + $agent->returnsAt( + 0, + 'createHttpRequest', + $this->createRedirect('first', 'two.html')); + $agent->expectAt(0, 'createHttpRequest', array('*', new IsAExpectation('SimplePostEncoding'))); + $agent->returnsAt( + 1, + 'createHttpRequest', + $this->createRedirect('second', 'three.html')); + $agent->expectAt(1, 'createHttpRequest', array('*', new IsAExpectation('SimpleGetEncoding'))); + $agent->expectCallCount('createHttpRequest', 2); + $agent->__construct(); + $agent->setMaximumRedirects(1); + $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimplePostEncoding()); + } +} + +class TestOfBadHosts extends UnitTestCase { + + private function createSimulatedBadHost() { + $response = new MockSimpleHttpResponse(); + $response->setReturnValue('isError', true); + $response->setReturnValue('getError', 'Bad socket'); + $response->setReturnValue('getContent', false); + $request = new MockSimpleHttpRequest(); + $request->setReturnReference('fetch', $response); + return $request; + } + + function testUntestedHost() { + $request = $this->createSimulatedBadHost(); + $agent = new MockRequestUserAgent(); + $agent->setReturnReference('createHttpRequest', $request); + $agent->__construct(); + $response = $agent->fetchResponse( + new SimpleUrl('http://this.host/this/path/page.html'), + new SimpleGetEncoding()); + $this->assertTrue($response->isError()); + } +} + +class TestOfAuthorisation extends UnitTestCase { + + function testAuthenticateHeaderAdded() { + $response = new MockSimpleHttpResponse(); + $response->setReturnReference('getHeaders', new MockSimpleHttpHeaders()); + + $request = new MockSimpleHttpRequest(); + $request->returns('fetch', $response); + $request->expectOnce( + 'addHeaderLine', + array('Authorization: Basic ' . base64_encode('test:secret'))); + + $agent = new MockRequestUserAgent(); + $agent->returns('createHttpRequest', $request); + $agent->__construct(); + $response = $agent->fetchResponse( + new SimpleUrl('http://test:secret@this.host'), + new SimpleGetEncoding()); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/visual_test.php b/webdata/stdlibs/simpletest/test/visual_test.php new file mode 100644 index 0000000..6b9d085 --- /dev/null +++ b/webdata/stdlibs/simpletest/test/visual_test.php @@ -0,0 +1,495 @@ +a = $a; + } +} + +class PassingUnitTestCaseOutput extends UnitTestCase { + + function testOfResults() { + $this->pass('Pass'); + } + + function testTrue() { + $this->assertTrue(true); + } + + function testFalse() { + $this->assertFalse(false); + } + + function testExpectation() { + $expectation = &new EqualExpectation(25, 'My expectation message: %s'); + $this->assert($expectation, 25, 'My assert message : %s'); + } + + function testNull() { + $this->assertNull(null, "%s -> Pass"); + $this->assertNotNull(false, "%s -> Pass"); + } + + function testType() { + $this->assertIsA("hello", "string", "%s -> Pass"); + $this->assertIsA($this, "PassingUnitTestCaseOutput", "%s -> Pass"); + $this->assertIsA($this, "UnitTestCase", "%s -> Pass"); + } + + function testTypeEquality() { + $this->assertEqual("0", 0, "%s -> Pass"); + } + + function testNullEquality() { + $this->assertNotEqual(null, 1, "%s -> Pass"); + $this->assertNotEqual(1, null, "%s -> Pass"); + } + + function testIntegerEquality() { + $this->assertNotEqual(1, 2, "%s -> Pass"); + } + + function testStringEquality() { + $this->assertEqual("a", "a", "%s -> Pass"); + $this->assertNotEqual("aa", "ab", "%s -> Pass"); + } + + function testHashEquality() { + $this->assertEqual(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "A"), "%s -> Pass"); + } + + function testWithin() { + $this->assertWithinMargin(5, 5.4, 0.5, "%s -> Pass"); + } + + function testOutside() { + $this->assertOutsideMargin(5, 5.6, 0.5, "%s -> Pass"); + } + + function testStringIdentity() { + $a = "fred"; + $b = $a; + $this->assertIdentical($a, $b, "%s -> Pass"); + } + + function testTypeIdentity() { + $a = "0"; + $b = 0; + $this->assertNotIdentical($a, $b, "%s -> Pass"); + } + + function testNullIdentity() { + $this->assertNotIdentical(null, 1, "%s -> Pass"); + $this->assertNotIdentical(1, null, "%s -> Pass"); + } + + function testHashIdentity() { + } + + function testObjectEquality() { + $this->assertEqual(new TestDisplayClass(4), new TestDisplayClass(4), "%s -> Pass"); + $this->assertNotEqual(new TestDisplayClass(4), new TestDisplayClass(5), "%s -> Pass"); + } + + function testObjectIndentity() { + $this->assertIdentical(new TestDisplayClass(false), new TestDisplayClass(false), "%s -> Pass"); + $this->assertNotIdentical(new TestDisplayClass(false), new TestDisplayClass(0), "%s -> Pass"); + } + + function testReference() { + $a = "fred"; + $b = &$a; + $this->assertReference($a, $b, "%s -> Pass"); + } + + function testCloneOnDifferentObjects() { + $a = "fred"; + $b = $a; + $c = "Hello"; + $this->assertClone($a, $b, "%s -> Pass"); + } + + function testPatterns() { + $this->assertPattern('/hello/i', "Hello there", "%s -> Pass"); + $this->assertNoPattern('/hello/', "Hello there", "%s -> Pass"); + } + + function testLongStrings() { + $text = ""; + for ($i = 0; $i < 10; $i++) { + $text .= "0123456789"; + } + $this->assertEqual($text, $text); + } +} + +class FailingUnitTestCaseOutput extends UnitTestCase { + + function testOfResults() { + $this->fail('Fail'); // Fail. + } + + function testTrue() { + $this->assertTrue(false); // Fail. + } + + function testFalse() { + $this->assertFalse(true); // Fail. + } + + function testExpectation() { + $expectation = &new EqualExpectation(25, 'My expectation message: %s'); + $this->assert($expectation, 24, 'My assert message : %s'); // Fail. + } + + function testNull() { + $this->assertNull(false, "%s -> Fail"); // Fail. + $this->assertNotNull(null, "%s -> Fail"); // Fail. + } + + function testType() { + $this->assertIsA(14, "string", "%s -> Fail"); // Fail. + $this->assertIsA(14, "TestOfUnitTestCaseOutput", "%s -> Fail"); // Fail. + $this->assertIsA($this, "TestReporter", "%s -> Fail"); // Fail. + } + + function testTypeEquality() { + $this->assertNotEqual("0", 0, "%s -> Fail"); // Fail. + } + + function testNullEquality() { + $this->assertEqual(null, 1, "%s -> Fail"); // Fail. + $this->assertEqual(1, null, "%s -> Fail"); // Fail. + } + + function testIntegerEquality() { + $this->assertEqual(1, 2, "%s -> Fail"); // Fail. + } + + function testStringEquality() { + $this->assertNotEqual("a", "a", "%s -> Fail"); // Fail. + $this->assertEqual("aa", "ab", "%s -> Fail"); // Fail. + } + + function testHashEquality() { + $this->assertEqual(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "Z"), "%s -> Fail"); + } + + function testWithin() { + $this->assertWithinMargin(5, 5.6, 0.5, "%s -> Fail"); // Fail. + } + + function testOutside() { + $this->assertOutsideMargin(5, 5.4, 0.5, "%s -> Fail"); // Fail. + } + + function testStringIdentity() { + $a = "fred"; + $b = $a; + $this->assertNotIdentical($a, $b, "%s -> Fail"); // Fail. + } + + function testTypeIdentity() { + $a = "0"; + $b = 0; + $this->assertIdentical($a, $b, "%s -> Fail"); // Fail. + } + + function testNullIdentity() { + $this->assertIdentical(null, 1, "%s -> Fail"); // Fail. + $this->assertIdentical(1, null, "%s -> Fail"); // Fail. + } + + function testHashIdentity() { + $this->assertIdentical(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "A"), "%s -> fail"); // Fail. + } + + function testObjectEquality() { + $this->assertNotEqual(new TestDisplayClass(4), new TestDisplayClass(4), "%s -> Fail"); // Fail. + $this->assertEqual(new TestDisplayClass(4), new TestDisplayClass(5), "%s -> Fail"); // Fail. + } + + function testObjectIndentity() { + $this->assertNotIdentical(new TestDisplayClass(false), new TestDisplayClass(false), "%s -> Fail"); // Fail. + $this->assertIdentical(new TestDisplayClass(false), new TestDisplayClass(0), "%s -> Fail"); // Fail. + } + + function testReference() { + $a = "fred"; + $b = &$a; + $this->assertClone($a, $b, "%s -> Fail"); // Fail. + } + + function testCloneOnDifferentObjects() { + $a = "fred"; + $b = $a; + $c = "Hello"; + $this->assertClone($a, $c, "%s -> Fail"); // Fail. + } + + function testPatterns() { + $this->assertPattern('/hello/', "Hello there", "%s -> Fail"); // Fail. + $this->assertNoPattern('/hello/i', "Hello there", "%s -> Fail"); // Fail. + } + + function testLongStrings() { + $text = ""; + for ($i = 0; $i < 10; $i++) { + $text .= "0123456789"; + } + $this->assertEqual($text . $text, $text . "a" . $text); // Fail. + } +} + +class Dummy { + function Dummy() { + } + + function a() { + } +} +Mock::generate('Dummy'); + +class TestOfMockObjectsOutput extends UnitTestCase { + + function testCallCounts() { + $dummy = &new MockDummy(); + $dummy->expectCallCount('a', 1, 'My message: %s'); + $dummy->a(); + $dummy->a(); + } + + function testMinimumCallCounts() { + $dummy = &new MockDummy(); + $dummy->expectMinimumCallCount('a', 2, 'My message: %s'); + $dummy->a(); + $dummy->a(); + } + + function testEmptyMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array()); + $dummy->a(); + $dummy->a(null); // Fail. + } + + function testEmptyMatchingWithCustomMessage() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(), 'My expectation message: %s'); + $dummy->a(); + $dummy->a(null); // Fail. + } + + function testNullMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(null)); + $dummy->a(null); + $dummy->a(); // Fail. + } + + function testBooleanMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(true, false)); + $dummy->a(true, false); + $dummy->a(true, true); // Fail. + } + + function testIntegerMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(32, 33)); + $dummy->a(32, 33); + $dummy->a(32, 34); // Fail. + } + + function testFloatMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(3.2, 3.3)); + $dummy->a(3.2, 3.3); + $dummy->a(3.2, 3.4); // Fail. + } + + function testStringMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array('32', '33')); + $dummy->a('32', '33'); + $dummy->a('32', '34'); // Fail. + } + + function testEmptyMatchingWithCustomExpectationMessage() { + $dummy = &new MockDummy(); + $dummy->expect( + 'a', + array(new EqualExpectation('A', 'My part expectation message: %s')), + 'My expectation message: %s'); + $dummy->a('A'); + $dummy->a('B'); // Fail. + } + + function testArrayMatching() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(array(32), array(33))); + $dummy->a(array(32), array(33)); + $dummy->a(array(32), array('33')); // Fail. + } + + function testObjectMatching() { + $a = new Dummy(); + $a->a = 'a'; + $b = new Dummy(); + $b->b = 'b'; + $dummy = &new MockDummy(); + $dummy->expect('a', array($a, $b)); + $dummy->a($a, $b); + $dummy->a($a, $a); // Fail. + } + + function testBigList() { + $dummy = &new MockDummy(); + $dummy->expect('a', array(false, 0, 1, 1.0)); + $dummy->a(false, 0, 1, 1.0); + $dummy->a(true, false, 2, 2.0); // Fail. + } +} + +class TestOfPastBugs extends UnitTestCase { + + function testMixedTypes() { + $this->assertEqual(array(), null, "%s -> Pass"); + $this->assertIdentical(array(), null, "%s -> Fail"); // Fail. + } + + function testMockWildcards() { + $dummy = &new MockDummy(); + $dummy->expect('a', array('*', array(33))); + $dummy->a(array(32), array(33)); + $dummy->a(array(32), array('33')); // Fail. + } +} + +class TestOfVisualShell extends ShellTestCase { + + function testDump() { + $this->execute('ls'); + $this->dumpOutput(); + $this->execute('dir'); + $this->dumpOutput(); + } + + function testDumpOfList() { + $this->execute('ls'); + $this->dump($this->getOutputAsList()); + } +} + +class PassesAsWellReporter extends HtmlReporter { + + protected function getCss() { + return parent::getCss() . ' .pass { color: darkgreen; }'; + } + + function paintPass($message) { + parent::paintPass($message); + print "Pass: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + print " -> " . htmlentities($message) . "
                      \n"; + } + + function paintSignal($type, &$payload) { + print "$type: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode(" -> ", $breadcrumb); + print " -> " . htmlentities(serialize($payload)) . "
                      \n"; + } +} + +class TestOfSkippingNoMatterWhat extends UnitTestCase { + function skip() { + $this->skipIf(true, 'Always skipped -> %s'); + } + + function testFail() { + $this->fail('This really shouldn\'t have happened'); + } +} + +class TestOfSkippingOrElse extends UnitTestCase { + function skip() { + $this->skipUnless(false, 'Always skipped -> %s'); + } + + function testFail() { + $this->fail('This really shouldn\'t have happened'); + } +} + +class TestOfSkippingTwiceOver extends UnitTestCase { + function skip() { + $this->skipIf(true, 'First reason -> %s'); + $this->skipIf(true, 'Second reason -> %s'); + } + + function testFail() { + $this->fail('This really shouldn\'t have happened'); + } +} + +class TestThatShouldNotBeSkipped extends UnitTestCase { + function skip() { + $this->skipIf(false); + $this->skipUnless(true); + } + + function testFail() { + $this->fail('We should see this message'); + } + + function testPass() { + $this->pass('We should see this message'); + } +} + +$test = &new TestSuite('Visual test with 46 passes, 47 fails and 0 exceptions'); +$test->add(new PassingUnitTestCaseOutput()); +$test->add(new FailingUnitTestCaseOutput()); +$test->add(new TestOfMockObjectsOutput()); +$test->add(new TestOfPastBugs()); +$test->add(new TestOfVisualShell()); +$test->add(new TestOfSkippingNoMatterWhat()); +$test->add(new TestOfSkippingOrElse()); +$test->add(new TestOfSkippingTwiceOver()); +$test->add(new TestThatShouldNotBeSkipped()); + +if (isset($_GET['xml']) || in_array('xml', (isset($argv) ? $argv : array()))) { + $reporter = new XmlReporter(); +} elseif (TextReporter::inCli()) { + $reporter = new TextReporter(); +} else { + $reporter = new PassesAsWellReporter(); +} +if (isset($_GET['dry']) || in_array('dry', (isset($argv) ? $argv : array()))) { + $reporter->makeDry(); +} +exit ($test->run($reporter) ? 0 : 1); +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/web_tester_test.php b/webdata/stdlibs/simpletest/test/web_tester_test.php new file mode 100644 index 0000000..8c3bf1a --- /dev/null +++ b/webdata/stdlibs/simpletest/test/web_tester_test.php @@ -0,0 +1,155 @@ +assertTrue($expectation->test('a')); + $this->assertTrue($expectation->test(array('a'))); + $this->assertFalse($expectation->test('A')); + } + + function testMatchesInteger() { + $expectation = new FieldExpectation('1'); + $this->assertTrue($expectation->test('1')); + $this->assertTrue($expectation->test(1)); + $this->assertTrue($expectation->test(array('1'))); + $this->assertTrue($expectation->test(array(1))); + } + + function testNonStringFailsExpectation() { + $expectation = new FieldExpectation('a'); + $this->assertFalse($expectation->test(null)); + } + + function testUnsetFieldCanBeTestedFor() { + $expectation = new FieldExpectation(false); + $this->assertTrue($expectation->test(false)); + } + + function testMultipleValuesCanBeInAnyOrder() { + $expectation = new FieldExpectation(array('a', 'b')); + $this->assertTrue($expectation->test(array('a', 'b'))); + $this->assertTrue($expectation->test(array('b', 'a'))); + $this->assertFalse($expectation->test(array('a', 'a'))); + $this->assertFalse($expectation->test('a')); + } + + function testSingleItemCanBeArrayOrString() { + $expectation = new FieldExpectation(array('a')); + $this->assertTrue($expectation->test(array('a'))); + $this->assertTrue($expectation->test('a')); + } +} + +class TestOfHeaderExpectations extends UnitTestCase { + + function testExpectingOnlyTheHeaderName() { + $expectation = new HttpHeaderExpectation('a'); + $this->assertIdentical($expectation->test(false), false); + $this->assertIdentical($expectation->test('a: A'), true); + $this->assertIdentical($expectation->test('A: A'), true); + $this->assertIdentical($expectation->test('a: B'), true); + $this->assertIdentical($expectation->test(' a : A '), true); + } + + function testHeaderValueAsWell() { + $expectation = new HttpHeaderExpectation('a', 'A'); + $this->assertIdentical($expectation->test(false), false); + $this->assertIdentical($expectation->test('a: A'), true); + $this->assertIdentical($expectation->test('A: A'), true); + $this->assertIdentical($expectation->test('A: a'), false); + $this->assertIdentical($expectation->test('a: B'), false); + $this->assertIdentical($expectation->test(' a : A '), true); + $this->assertIdentical($expectation->test(' a : AB '), false); + } + + function testHeaderValueWithColons() { + $expectation = new HttpHeaderExpectation('a', 'A:B:C'); + $this->assertIdentical($expectation->test('a: A'), false); + $this->assertIdentical($expectation->test('a: A:B'), false); + $this->assertIdentical($expectation->test('a: A:B:C'), true); + $this->assertIdentical($expectation->test('a: A:B:C:D'), false); + } + + function testMultilineSearch() { + $expectation = new HttpHeaderExpectation('a', 'A'); + $this->assertIdentical($expectation->test("aa: A\r\nb: B\r\nc: C"), false); + $this->assertIdentical($expectation->test("aa: A\r\na: A\r\nb: B"), true); + } + + function testMultilineSearchWithPadding() { + $expectation = new HttpHeaderExpectation('a', ' A '); + $this->assertIdentical($expectation->test("aa:A\r\nb:B\r\nc:C"), false); + $this->assertIdentical($expectation->test("aa:A\r\na:A\r\nb:B"), true); + } + + function testPatternMatching() { + $expectation = new HttpHeaderExpectation('a', new PatternExpectation('/A/')); + $this->assertIdentical($expectation->test('a: A'), true); + $this->assertIdentical($expectation->test('A: A'), true); + $this->assertIdentical($expectation->test('A: a'), false); + $this->assertIdentical($expectation->test('a: B'), false); + $this->assertIdentical($expectation->test(' a : A '), true); + $this->assertIdentical($expectation->test(' a : AB '), true); + } + + function testCaseInsensitivePatternMatching() { + $expectation = new HttpHeaderExpectation('a', new PatternExpectation('/A/i')); + $this->assertIdentical($expectation->test('a: a'), true); + $this->assertIdentical($expectation->test('a: B'), false); + $this->assertIdentical($expectation->test(' a : A '), true); + $this->assertIdentical($expectation->test(' a : BAB '), true); + $this->assertIdentical($expectation->test(' a : bab '), true); + } + + function testUnwantedHeader() { + $expectation = new NoHttpHeaderExpectation('a'); + $this->assertIdentical($expectation->test(''), true); + $this->assertIdentical($expectation->test('stuff'), true); + $this->assertIdentical($expectation->test('b: B'), true); + $this->assertIdentical($expectation->test('a: A'), false); + $this->assertIdentical($expectation->test('A: A'), false); + } + + function testMultilineUnwantedSearch() { + $expectation = new NoHttpHeaderExpectation('a'); + $this->assertIdentical($expectation->test("aa:A\r\nb:B\r\nc:C"), true); + $this->assertIdentical($expectation->test("aa:A\r\na:A\r\nb:B"), false); + } + + function testLocationHeaderSplitsCorrectly() { + $expectation = new HttpHeaderExpectation('Location', 'http://here/'); + $this->assertIdentical($expectation->test('Location: http://here/'), true); + } +} + +class TestOfTextExpectations extends UnitTestCase { + + function testMatchingSubString() { + $expectation = new TextExpectation('wanted'); + $this->assertIdentical($expectation->test(''), false); + $this->assertIdentical($expectation->test('Wanted'), false); + $this->assertIdentical($expectation->test('wanted'), true); + $this->assertIdentical($expectation->test('the wanted text is here'), true); + } + + function testNotMatchingSubString() { + $expectation = new NoTextExpectation('wanted'); + $this->assertIdentical($expectation->test(''), true); + $this->assertIdentical($expectation->test('Wanted'), true); + $this->assertIdentical($expectation->test('wanted'), false); + $this->assertIdentical($expectation->test('the wanted text is here'), false); + } +} + +class TestOfGenericAssertionsInWebTester extends WebTestCase { + function testEquality() { + $this->assertEqual('a', 'a'); + $this->assertNotEqual('a', 'A'); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test/xml_test.php b/webdata/stdlibs/simpletest/test/xml_test.php new file mode 100644 index 0000000..f99e0dc --- /dev/null +++ b/webdata/stdlibs/simpletest/test/xml_test.php @@ -0,0 +1,187 @@ + 2)); + $this->assertEqual($nesting->getSize(), 2); + } +} + +class TestOfXmlStructureParsing extends UnitTestCase { + function testValidXml() { + $listener = new MockSimpleScorer(); + $listener->expectNever('paintGroupStart'); + $listener->expectNever('paintGroupEnd'); + $listener->expectNever('paintCaseStart'); + $listener->expectNever('paintCaseEnd'); + $parser = new SimpleTestXmlParser($listener); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("\n")); + } + + function testEmptyGroup() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintGroupStart', array('a_group', 7)); + $listener->expectOnce('paintGroupEnd', array('a_group')); + $parser = new SimpleTestXmlParser($listener); + $parser->parse("\n"); + $parser->parse("\n"); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("a_group\n")); + $this->assertTrue($parser->parse("\n")); + $parser->parse("\n"); + } + + function testEmptyCase() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintCaseStart', array('a_case')); + $listener->expectOnce('paintCaseEnd', array('a_case')); + $parser = new SimpleTestXmlParser($listener); + $parser->parse("\n"); + $parser->parse("\n"); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("a_case\n")); + $this->assertTrue($parser->parse("\n")); + $parser->parse("\n"); + } + + function testEmptyMethod() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintCaseStart', array('a_case')); + $listener->expectOnce('paintCaseEnd', array('a_case')); + $listener->expectOnce('paintMethodStart', array('a_method')); + $listener->expectOnce('paintMethodEnd', array('a_method')); + $parser = new SimpleTestXmlParser($listener); + $parser->parse("\n"); + $parser->parse("\n"); + $parser->parse("\n"); + $parser->parse("a_case\n"); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("a_method\n")); + $this->assertTrue($parser->parse("\n")); + $parser->parse("\n"); + $parser->parse("\n"); + } + + function testNestedGroup() { + $listener = new MockSimpleScorer(); + $listener->expectAt(0, 'paintGroupStart', array('a_group', 7)); + $listener->expectAt(1, 'paintGroupStart', array('b_group', 3)); + $listener->expectCallCount('paintGroupStart', 2); + $listener->expectAt(0, 'paintGroupEnd', array('b_group')); + $listener->expectAt(1, 'paintGroupEnd', array('a_group')); + $listener->expectCallCount('paintGroupEnd', 2); + + $parser = new SimpleTestXmlParser($listener); + $parser->parse("\n"); + $parser->parse("\n"); + + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("a_group\n")); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("b_group\n")); + $this->assertTrue($parser->parse("\n")); + $this->assertTrue($parser->parse("\n")); + $parser->parse("\n"); + } +} + +class AnyOldSignal { + public $stuff = true; +} + +class TestOfXmlResultsParsing extends UnitTestCase { + + function sendValidStart(&$parser) { + $parser->parse("\n"); + $parser->parse("\n"); + $parser->parse("\n"); + $parser->parse("a_case\n"); + $parser->parse("\n"); + $parser->parse("a_method\n"); + } + + function sendValidEnd(&$parser) { + $parser->parse("\n"); + $parser->parse("\n"); + $parser->parse("\n"); + } + + function testPass() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintPass', array('a_message')); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("a_message\n")); + $this->sendValidEnd($parser); + } + + function testFail() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintFail', array('a_message')); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("a_message\n")); + $this->sendValidEnd($parser); + } + + function testException() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintError', array('a_message')); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("a_message\n")); + $this->sendValidEnd($parser); + } + + function testSkip() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintSkip', array('a_message')); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("a_message\n")); + $this->sendValidEnd($parser); + } + + function testSignal() { + $signal = new AnyOldSignal(); + $signal->stuff = "Hello"; + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintSignal', array('a_signal', $signal)); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse( + "\n")); + $this->sendValidEnd($parser); + } + + function testMessage() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintMessage', array('a_message')); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("a_message\n")); + $this->sendValidEnd($parser); + } + + function testFormattedMessage() { + $listener = new MockSimpleScorer(); + $listener->expectOnce('paintFormattedMessage', array("\na\tmessage\n")); + $parser = new SimpleTestXmlParser($listener); + $this->sendValidStart($parser); + $this->assertTrue($parser->parse("\n")); + $this->sendValidEnd($parser); + } +} +?> \ No newline at end of file diff --git a/webdata/stdlibs/simpletest/test_case.php b/webdata/stdlibs/simpletest/test_case.php new file mode 100644 index 0000000..ba023c3 --- /dev/null +++ b/webdata/stdlibs/simpletest/test_case.php @@ -0,0 +1,658 @@ +label = $label; + } + } + + /** + * Accessor for the test name for subclasses. + * @return string Name of the test. + * @access public + */ + function getLabel() { + return $this->label ? $this->label : get_class($this); + } + + /** + * This is a placeholder for skipping tests. In this + * method you place skipIf() and skipUnless() calls to + * set the skipping state. + * @access public + */ + function skip() { + } + + /** + * Will issue a message to the reporter and tell the test + * case to skip if the incoming flag is true. + * @param string $should_skip Condition causing the tests to be skipped. + * @param string $message Text of skip condition. + * @access public + */ + function skipIf($should_skip, $message = '%s') { + if ($should_skip && ! $this->should_skip) { + $this->should_skip = true; + $message = sprintf($message, 'Skipping [' . get_class($this) . ']'); + $this->reporter->paintSkip($message . $this->getAssertionLine()); + } + } + + /** + * Accessor for the private variable $_shoud_skip + * @access public + */ + function shouldSkip() { + return $this->should_skip; + } + + /** + * Will issue a message to the reporter and tell the test + * case to skip if the incoming flag is false. + * @param string $shouldnt_skip Condition causing the tests to be run. + * @param string $message Text of skip condition. + * @access public + */ + function skipUnless($shouldnt_skip, $message = false) { + $this->skipIf(! $shouldnt_skip, $message); + } + + /** + * Used to invoke the single tests. + * @return SimpleInvoker Individual test runner. + * @access public + */ + function createInvoker() { + return new SimpleErrorTrappingInvoker( + new SimpleExceptionTrappingInvoker(new SimpleInvoker($this))); + } + + /** + * Uses reflection to run every method within itself + * starting with the string "test" unless a method + * is specified. + * @param SimpleReporter $reporter Current test reporter. + * @return boolean True if all tests passed. + * @access public + */ + function run($reporter) { + $context = SimpleTest::getContext(); + $context->setTest($this); + $context->setReporter($reporter); + $this->reporter = $reporter; + $started = false; + foreach ($this->getTests() as $method) { + if ($reporter->shouldInvoke($this->getLabel(), $method)) { + $this->skip(); + if ($this->should_skip) { + break; + } + if (! $started) { + $reporter->paintCaseStart($this->getLabel()); + $started = true; + } + $invoker = $this->reporter->createInvoker($this->createInvoker()); + $invoker->before($method); + $invoker->invoke($method); + $invoker->after($method); + } + } + if ($started) { + $reporter->paintCaseEnd($this->getLabel()); + } + unset($this->reporter); + $context->setTest(null); + return $reporter->getStatus(); + } + + /** + * Gets a list of test names. Normally that will + * be all internal methods that start with the + * name "test". This method should be overridden + * if you want a different rule. + * @return array List of test names. + * @access public + */ + function getTests() { + $methods = array(); + foreach (get_class_methods(get_class($this)) as $method) { + if ($this->isTest($method)) { + $methods[] = $method; + } + } + return $methods; + } + + /** + * Tests to see if the method is a test that should + * be run. Currently any method that starts with 'test' + * is a candidate unless it is the constructor. + * @param string $method Method name to try. + * @return boolean True if test method. + * @access protected + */ + protected function isTest($method) { + if (strtolower(substr($method, 0, 4)) == 'test') { + return ! SimpleTestCompatibility::isA($this, strtolower($method)); + } + return false; + } + + /** + * Announces the start of the test. + * @param string $method Test method just started. + * @access public + */ + function before($method) { + $this->reporter->paintMethodStart($method); + $this->observers = array(); + } + + /** + * Sets up unit test wide variables at the start + * of each test method. To be overridden in + * actual user test cases. + * @access public + */ + function setUp() { + } + + /** + * Clears the data set in the setUp() method call. + * To be overridden by the user in actual user test cases. + * @access public + */ + function tearDown() { + } + + /** + * Announces the end of the test. Includes private clean up. + * @param string $method Test method just finished. + * @access public + */ + function after($method) { + for ($i = 0; $i < count($this->observers); $i++) { + $this->observers[$i]->atTestEnd($method, $this); + } + $this->reporter->paintMethodEnd($method); + } + + /** + * Sets up an observer for the test end. + * @param object $observer Must have atTestEnd() + * method. + * @access public + */ + function tell($observer) { + $this->observers[] = &$observer; + } + + /** + * @deprecated + */ + function pass($message = "Pass") { + if (! isset($this->reporter)) { + trigger_error('Can only make assertions within test methods'); + } + $this->reporter->paintPass( + $message . $this->getAssertionLine()); + return true; + } + + /** + * Sends a fail event with a message. + * @param string $message Message to send. + * @access public + */ + function fail($message = "Fail") { + if (! isset($this->reporter)) { + trigger_error('Can only make assertions within test methods'); + } + $this->reporter->paintFail( + $message . $this->getAssertionLine()); + return false; + } + + /** + * Formats a PHP error and dispatches it to the + * reporter. + * @param integer $severity PHP error code. + * @param string $message Text of error. + * @param string $file File error occoured in. + * @param integer $line Line number of error. + * @access public + */ + function error($severity, $message, $file, $line) { + if (! isset($this->reporter)) { + trigger_error('Can only make assertions within test methods'); + } + $this->reporter->paintError( + "Unexpected PHP error [$message] severity [$severity] in [$file line $line]"); + } + + /** + * Formats an exception and dispatches it to the + * reporter. + * @param Exception $exception Object thrown. + * @access public + */ + function exception($exception) { + $this->reporter->paintException($exception); + } + + /** + * For user defined expansion of the available messages. + * @param string $type Tag for sorting the signals. + * @param mixed $payload Extra user specific information. + */ + function signal($type, $payload) { + if (! isset($this->reporter)) { + trigger_error('Can only make assertions within test methods'); + } + $this->reporter->paintSignal($type, $payload); + } + + /** + * Runs an expectation directly, for extending the + * tests with new expectation classes. + * @param SimpleExpectation $expectation Expectation subclass. + * @param mixed $compare Value to compare. + * @param string $message Message to display. + * @return boolean True on pass + * @access public + */ + function assert($expectation, $compare, $message = '%s') { + if ($expectation->test($compare)) { + return $this->pass(sprintf( + $message, + $expectation->overlayMessage($compare, $this->reporter->getDumper()))); + } else { + return $this->fail(sprintf( + $message, + $expectation->overlayMessage($compare, $this->reporter->getDumper()))); + } + } + + /** + * Uses a stack trace to find the line of an assertion. + * @return string Line number of first assert* + * method embedded in format string. + * @access public + */ + function getAssertionLine() { + $trace = new SimpleStackTrace(array('assert', 'expect', 'pass', 'fail', 'skip')); + return $trace->traceMethod(); + } + + /** + * Sends a formatted dump of a variable to the + * test suite for those emergency debugging + * situations. + * @param mixed $variable Variable to display. + * @param string $message Message to display. + * @return mixed The original variable. + * @access public + */ + function dump($variable, $message = false) { + $dumper = $this->reporter->getDumper(); + $formatted = $dumper->dump($variable); + if ($message) { + $formatted = $message . "\n" . $formatted; + } + $this->reporter->paintFormattedMessage($formatted); + return $variable; + } + + /** + * Accessor for the number of subtests including myelf. + * @return integer Number of test cases. + * @access public + */ + function getSize() { + return 1; + } +} + +/** + * Helps to extract test cases automatically from a file. + * @package SimpleTest + * @subpackage UnitTester + */ +class SimpleFileLoader { + + /** + * Builds a test suite from a library of test cases. + * The new suite is composed into this one. + * @param string $test_file File name of library with + * test case classes. + * @return TestSuite The new test suite. + * @access public + */ + function load($test_file) { + $existing_classes = get_declared_classes(); + $existing_globals = get_defined_vars(); + include_once($test_file); + $new_globals = get_defined_vars(); + $this->makeFileVariablesGlobal($existing_globals, $new_globals); + $new_classes = array_diff(get_declared_classes(), $existing_classes); + if (empty($new_classes)) { + $new_classes = $this->scrapeClassesFromFile($test_file); + } + $classes = $this->selectRunnableTests($new_classes); + return $this->createSuiteFromClasses($test_file, $classes); + } + + /** + * Imports new variables into the global namespace. + * @param hash $existing Variables before the file was loaded. + * @param hash $new Variables after the file was loaded. + * @access private + */ + protected function makeFileVariablesGlobal($existing, $new) { + $globals = array_diff(array_keys($new), array_keys($existing)); + foreach ($globals as $global) { + $GLOBALS[$global] = $new[$global]; + } + } + + /** + * Lookup classnames from file contents, in case the + * file may have been included before. + * Note: This is probably too clever by half. Figuring this + * out after a failed test case is going to be tricky for us, + * never mind the user. A test case should not be included + * twice anyway. + * @param string $test_file File name with classes. + * @access private + */ + protected function scrapeClassesFromFile($test_file) { + preg_match_all('~^\s*class\s+(\w+)(\s+(extends|implements)\s+\w+)*\s*\{~mi', + file_get_contents($test_file), + $matches ); + return $matches[1]; + } + + /** + * Calculates the incoming test cases. Skips abstract + * and ignored classes. + * @param array $candidates Candidate classes. + * @return array New classes which are test + * cases that shouldn't be ignored. + * @access public + */ + function selectRunnableTests($candidates) { + $classes = array(); + foreach ($candidates as $class) { + if (TestSuite::getBaseTestCase($class)) { + $reflection = new SimpleReflection($class); + if ($reflection->isAbstract()) { + SimpleTest::ignore($class); + } else { + $classes[] = $class; + } + } + } + return $classes; + } + + /** + * Builds a test suite from a class list. + * @param string $title Title of new group. + * @param array $classes Test classes. + * @return TestSuite Group loaded with the new + * test cases. + * @access public + */ + function createSuiteFromClasses($title, $classes) { + if (count($classes) == 0) { + $suite = new BadTestSuite($title, "No runnable test cases in [$title]"); + return $suite; + } + SimpleTest::ignoreParentsIfIgnored($classes); + $suite = new TestSuite($title); + foreach ($classes as $class) { + if (! SimpleTest::isIgnored($class)) { + $suite->add($class); + } + } + return $suite; + } +} + +/** + * This is a composite test class for combining + * test cases and other RunnableTest classes into + * a group test. + * @package SimpleTest + * @subpackage UnitTester + */ +class TestSuite { + private $label; + private $test_cases; + + /** + * Sets the name of the test suite. + * @param string $label Name sent at the start and end + * of the test. + * @access public + */ + function TestSuite($label = false) { + $this->label = $label; + $this->test_cases = array(); + } + + /** + * Accessor for the test name for subclasses. If the suite + * wraps a single test case the label defaults to the name of that test. + * @return string Name of the test. + * @access public + */ + function getLabel() { + if (! $this->label) { + return ($this->getSize() == 1) ? + get_class($this->test_cases[0]) : get_class($this); + } else { + return $this->label; + } + } + + /** + * Adds a test into the suite by instance or class. The class will + * be instantiated if it's a test suite. + * @param SimpleTestCase $test_case Suite or individual test + * case implementing the + * runnable test interface. + * @access public + */ + function add($test_case) { + if (! is_string($test_case)) { + $this->test_cases[] = $test_case; + } elseif (TestSuite::getBaseTestCase($test_case) == 'testsuite') { + $this->test_cases[] = new $test_case(); + } else { + $this->test_cases[] = $test_case; + } + } + + /** + * Builds a test suite from a library of test cases. + * The new suite is composed into this one. + * @param string $test_file File name of library with + * test case classes. + * @access public + */ + function addFile($test_file) { + $extractor = new SimpleFileLoader(); + $this->add($extractor->load($test_file)); + } + + /** + * Delegates to a visiting collector to add test + * files. + * @param string $path Path to scan from. + * @param SimpleCollector $collector Directory scanner. + * @access public + */ + function collect($path, $collector) { + $collector->collect($this, $path); + } + + /** + * Invokes run() on all of the held test cases, instantiating + * them if necessary. + * @param SimpleReporter $reporter Current test reporter. + * @access public + */ + function run($reporter) { + $reporter->paintGroupStart($this->getLabel(), $this->getSize()); + for ($i = 0, $count = count($this->test_cases); $i < $count; $i++) { + if (is_string($this->test_cases[$i])) { + $class = $this->test_cases[$i]; + $test = new $class(); + $test->run($reporter); + unset($test); + } else { + $this->test_cases[$i]->run($reporter); + } + } + $reporter->paintGroupEnd($this->getLabel()); + return $reporter->getStatus(); + } + + /** + * Number of contained test cases. + * @return integer Total count of cases in the group. + * @access public + */ + function getSize() { + $count = 0; + foreach ($this->test_cases as $case) { + if (is_string($case)) { + if (! SimpleTest::isIgnored($case)) { + $count++; + } + } else { + $count += $case->getSize(); + } + } + return $count; + } + + /** + * Test to see if a class is derived from the + * SimpleTestCase class. + * @param string $class Class name. + * @access public + */ + static function getBaseTestCase($class) { + while ($class = get_parent_class($class)) { + $class = strtolower($class); + if ($class == 'simpletestcase' || $class == 'testsuite') { + return $class; + } + } + return false; + } +} + +/** + * This is a failing group test for when a test suite hasn't + * loaded properly. + * @package SimpleTest + * @subpackage UnitTester + */ +class BadTestSuite { + private $label; + private $error; + + /** + * Sets the name of the test suite and error message. + * @param string $label Name sent at the start and end + * of the test. + * @access public + */ + function BadTestSuite($label, $error) { + $this->label = $label; + $this->error = $error; + } + + /** + * Accessor for the test name for subclasses. + * @return string Name of the test. + * @access public + */ + function getLabel() { + return $this->label; + } + + /** + * Sends a single error to the reporter. + * @param SimpleReporter $reporter Current test reporter. + * @access public + */ + function run($reporter) { + $reporter->paintGroupStart($this->getLabel(), $this->getSize()); + $reporter->paintFail('Bad TestSuite [' . $this->getLabel() . + '] with error [' . $this->error . ']'); + $reporter->paintGroupEnd($this->getLabel()); + return $reporter->getStatus(); + } + + /** + * Number of contained test cases. Always zero. + * @return integer Total count of cases in the group. + * @access public + */ + function getSize() { + return 0; + } +} +?> diff --git a/webdata/stdlibs/simpletest/tidy_parser.php b/webdata/stdlibs/simpletest/tidy_parser.php new file mode 100644 index 0000000..3d8b4b2 --- /dev/null +++ b/webdata/stdlibs/simpletest/tidy_parser.php @@ -0,0 +1,382 @@ +free(); + } + + /** + * Frees up any references so as to allow the PHP garbage + * collection from unset() to work. + */ + private function free() { + unset($this->page); + $this->forms = array(); + $this->labels = array(); + } + + /** + * This builder is only available if the 'tidy' extension is loaded. + * @return boolean True if available. + */ + function can() { + return extension_loaded('tidy'); + } + + /** + * Reads the raw content the page using HTML Tidy. + * @param $response SimpleHttpResponse Fetched response. + * @return SimplePage Newly parsed page. + */ + function parse($response) { + $this->page = new SimplePage($response); + $tidied = tidy_parse_string($input = $this->insertGuards($response->getContent()), + array('output-xml' => false, 'wrap' => '0', 'indent' => 'no'), + 'latin1'); + $this->walkTree($tidied->html()); + $this->attachLabels($this->widgets_by_id, $this->labels); + $this->page->setForms($this->forms); + $page = $this->page; + $this->free(); + return $page; + } + + /** + * Stops HTMLTidy stripping content that we wish to preserve. + * @param string The raw html. + * @return string The html with guard tags inserted. + */ + private function insertGuards($html) { + return $this->insertEmptyTagGuards($this->insertTextareaSimpleWhitespaceGuards($html)); + } + + /** + * Removes the extra content added during the parse stage + * in order to preserve content we don't want stripped + * out by HTMLTidy. + * @param string The raw html. + * @return string The html with guard tags removed. + */ + private function stripGuards($html) { + return $this->stripTextareaWhitespaceGuards($this->stripEmptyTagGuards($html)); + } + + /** + * HTML tidy strips out empty tags such as