line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewsExtractor::Constants; |
2
|
3
|
|
|
3
|
|
43
|
use v5.18; |
|
3
|
|
|
|
|
11
|
|
3
|
3
|
|
|
3
|
|
18
|
use utf8; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
19
|
|
4
|
3
|
|
|
3
|
|
87
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
709
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our %RE; |
7
|
|
|
|
|
|
|
our @EXPORT_OK = ( |
8
|
|
|
|
|
|
|
'%RE', |
9
|
|
|
|
|
|
|
'NEWSPAPER_NAMES', |
10
|
|
|
|
|
|
|
'CATEGORY_NAMES' |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use constant { |
14
|
3
|
|
|
|
|
728
|
NEWSPAPER_NAMES => [ |
15
|
|
|
|
|
|
|
'Anue鉅亨', |
16
|
|
|
|
|
|
|
'ETtoday新聞雲', |
17
|
|
|
|
|
|
|
'ETtoday旅遊雲', |
18
|
|
|
|
|
|
|
'NOWnews 今日新聞', |
19
|
|
|
|
|
|
|
'PChome 新聞', |
20
|
|
|
|
|
|
|
'TSNA', |
21
|
|
|
|
|
|
|
'TVBS', |
22
|
|
|
|
|
|
|
'TVBS新聞網', |
23
|
|
|
|
|
|
|
'VOGUE', |
24
|
|
|
|
|
|
|
'beauty美人圈', |
25
|
|
|
|
|
|
|
'一零一傳媒', |
26
|
|
|
|
|
|
|
'三立新聞網 SETN.COM', |
27
|
|
|
|
|
|
|
'三立新聞網', |
28
|
|
|
|
|
|
|
'上報', |
29
|
|
|
|
|
|
|
'中國時報', |
30
|
|
|
|
|
|
|
'中央社 CNA', |
31
|
|
|
|
|
|
|
'中央社', |
32
|
|
|
|
|
|
|
'中央通訊社', |
33
|
|
|
|
|
|
|
'中時電子報', |
34
|
|
|
|
|
|
|
'中華日報新聞網', |
35
|
|
|
|
|
|
|
'健康遠見', |
36
|
|
|
|
|
|
|
'台灣好新聞 TaiwanHot.net', |
37
|
|
|
|
|
|
|
'天下雜誌', |
38
|
|
|
|
|
|
|
'女人迷Womany', |
39
|
|
|
|
|
|
|
'妞新聞 niusnews', |
40
|
|
|
|
|
|
|
'工商時報', |
41
|
|
|
|
|
|
|
'數位台灣地方新聞', |
42
|
|
|
|
|
|
|
'新頭殼 Newtalk', |
43
|
|
|
|
|
|
|
'新頭殼', |
44
|
|
|
|
|
|
|
'旺報', |
45
|
|
|
|
|
|
|
'法新社', |
46
|
|
|
|
|
|
|
'無綫新聞', |
47
|
|
|
|
|
|
|
'聯合新聞網', |
48
|
|
|
|
|
|
|
'自由娛樂', |
49
|
|
|
|
|
|
|
'自由影音', |
50
|
|
|
|
|
|
|
'自由時報電子報', |
51
|
|
|
|
|
|
|
'自由財經', |
52
|
|
|
|
|
|
|
'自由電子報', |
53
|
|
|
|
|
|
|
'自立晚報', |
54
|
|
|
|
|
|
|
'芋傳媒 TaroNews', |
55
|
|
|
|
|
|
|
'華視新聞', |
56
|
|
|
|
|
|
|
'蕃新聞', |
57
|
|
|
|
|
|
|
'蘋果新聞網|蘋果日報', |
58
|
|
|
|
|
|
|
'蘋果日報', |
59
|
|
|
|
|
|
|
'鉅亨網', |
60
|
|
|
|
|
|
|
'鏡週刊', |
61
|
|
|
|
|
|
|
'阿波羅網手機版', |
62
|
|
|
|
|
|
|
'青年日報', |
63
|
|
|
|
|
|
|
'風傳媒', |
64
|
|
|
|
|
|
|
'食力 foodNEXT', |
65
|
|
|
|
|
|
|
'Storm.mg', |
66
|
|
|
|
|
|
|
'國語日報', |
67
|
|
|
|
|
|
|
'經濟日報', |
68
|
|
|
|
|
|
|
'快點TV', |
69
|
|
|
|
|
|
|
'USTV 非凡電視台', |
70
|
|
|
|
|
|
|
'NOW健康', |
71
|
|
|
|
|
|
|
'Taiwan News', |
72
|
|
|
|
|
|
|
'翻報', |
73
|
|
|
|
|
|
|
'翻爆 - 翻報', |
74
|
|
|
|
|
|
|
'澎湖時報', |
75
|
|
|
|
|
|
|
'ETtoday星光雲', |
76
|
|
|
|
|
|
|
'台灣時報 | 電子報', |
77
|
|
|
|
|
|
|
'大紀元', |
78
|
|
|
|
|
|
|
'大纪元', |
79
|
|
|
|
|
|
|
'Taipei Times', |
80
|
|
|
|
|
|
|
'台視新聞', |
81
|
|
|
|
|
|
|
'The News Lens 關鍵評論網', |
82
|
|
|
|
|
|
|
'立場新聞', |
83
|
|
|
|
|
|
|
'農傳媒', |
84
|
|
|
|
|
|
|
'報導者 The Reporter', |
85
|
|
|
|
|
|
|
'眾新聞', |
86
|
|
|
|
|
|
|
'中華日報', |
87
|
|
|
|
|
|
|
'中華新聞雲', |
88
|
|
|
|
|
|
|
'中視新聞', |
89
|
|
|
|
|
|
|
'日經中文網', |
90
|
|
|
|
|
|
|
], |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
CATEGORY_NAMES => [ |
93
|
|
|
|
|
|
|
'自由評論網', |
94
|
|
|
|
|
|
|
'兩岸', |
95
|
|
|
|
|
|
|
'台灣政經', |
96
|
|
|
|
|
|
|
'台股新聞', |
97
|
|
|
|
|
|
|
'台股新聞', |
98
|
|
|
|
|
|
|
'國際', |
99
|
|
|
|
|
|
|
'國際政經', |
100
|
|
|
|
|
|
|
'地方', |
101
|
|
|
|
|
|
|
'娛樂', |
102
|
|
|
|
|
|
|
'政治', |
103
|
|
|
|
|
|
|
'生活', |
104
|
|
|
|
|
|
|
'生活發現', |
105
|
|
|
|
|
|
|
'產經', |
106
|
|
|
|
|
|
|
'社會', |
107
|
|
|
|
|
|
|
'社會新聞', |
108
|
|
|
|
|
|
|
'科技', |
109
|
|
|
|
|
|
|
'美股', |
110
|
|
|
|
|
|
|
'美股', |
111
|
|
|
|
|
|
|
'軍視界', |
112
|
|
|
|
|
|
|
'運動', |
113
|
|
|
|
|
|
|
'重點新聞', |
114
|
|
|
|
|
|
|
'雜誌', |
115
|
|
|
|
|
|
|
'社論', |
116
|
|
|
|
|
|
|
'立場報道', |
117
|
|
|
|
|
|
|
'苗中彰投雲', |
118
|
|
|
|
|
|
|
'旅遊頻道', |
119
|
|
|
|
|
|
|
'文化+', |
120
|
|
|
|
|
|
|
], |
121
|
3
|
|
|
3
|
|
23
|
}; |
|
3
|
|
|
|
|
8
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
$RE{newspaper_names} = '(?:' . join('|', map { qr($_) } @{ NEWSPAPER_NAMES() }) . ')'; |
124
|
|
|
|
|
|
|
$RE{category_names} = '(?:' . join('|', map { qr($_) } @{ CATEGORY_NAMES() }) . ')'; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
1; |