Showing
1 changed file
with
87 additions
and
38 deletions
... | @@ -49,6 +49,9 @@ app.post('/message', function(req,res){ | ... | @@ -49,6 +49,9 @@ app.post('/message', function(req,res){ |
49 | callback(null,yonezu) | 49 | callback(null,yonezu) |
50 | }); | 50 | }); |
51 | break; | 51 | break; |
52 | + case 'ヨルシカ-Discography' : | ||
53 | + singer = 'yorusika'; | ||
54 | + break | ||
52 | default: | 55 | default: |
53 | if(singer == 'Reol'){ | 56 | if(singer == 'Reol'){ |
54 | crawlReol.crawl_Reol('https://namu.wiki/w/%EB%A0%88%EC%98%A4%EB%A3%A8/%EC%9D%8C%EB%B0%98#toc',function(Reol){ | 57 | crawlReol.crawl_Reol('https://namu.wiki/w/%EB%A0%88%EC%98%A4%EB%A3%A8/%EC%9D%8C%EB%B0%98#toc',function(Reol){ |
... | @@ -60,6 +63,9 @@ app.post('/message', function(req,res){ | ... | @@ -60,6 +63,9 @@ app.post('/message', function(req,res){ |
60 | callback(null,yonezu) | 63 | callback(null,yonezu) |
61 | }); | 64 | }); |
62 | } | 65 | } |
66 | + else if(singer=='yorusika'){ | ||
67 | + | ||
68 | + } | ||
63 | else | 69 | else |
64 | callback(null,null); | 70 | callback(null,null); |
65 | break; | 71 | break; |
... | @@ -126,65 +132,108 @@ app.post('/message', function(req,res){ | ... | @@ -126,65 +132,108 @@ app.post('/message', function(req,res){ |
126 | } | 132 | } |
127 | } | 133 | } |
128 | break; | 134 | break; |
129 | - case discography[0].json_album[index]: | 135 | + /// 米津玄師 /// |
130 | - var album = '앨범 : ' + discography[0].json_album[index].substr(3); | 136 | + case '米津玄師': |
131 | - if(singer == 'Reol'){ | ||
132 | send = { | 137 | send = { |
133 | - 'message' : { | 138 | + 'message': { |
134 | - 'text' : album + '\n발매년도 : ' + discography[0].json_year[index] + '\n수록곡 : \n' + discography[0].json_track[index] | 139 | + 'text': '이름 : 米津玄師(Yonezu Kenshi) \n성별 : 남성 \n생년월일 : 1991년 3월 10일 \n혈액형 : O형', |
140 | + 'photo': { | ||
141 | + 'url': 'http://reissuerecords.net/rr/wp-content/uploads/flamingo_photo2.jpg', | ||
142 | + 'width': 1000, | ||
143 | + 'height': 667 | ||
135 | }, | 144 | }, |
136 | - keyboard : { | 145 | + 'message_button': { |
137 | - 'type' : 'buttons', | 146 | + 'label': '공식 홈페이지', |
138 | - 'buttons' : ['Reol-Discography', '초기화면'] | 147 | + 'url': "http://reissuerecords.net/" |
139 | - } | ||
140 | } | 148 | } |
149 | + }, | ||
150 | + keyboard: { | ||
151 | + 'type': 'buttons', | ||
152 | + 'buttons': ['米津玄師-Discography'] | ||
141 | } | 153 | } |
142 | - else if(singer == 'Yonezu'){ | 154 | + }; |
155 | + break; | ||
156 | + case '米津玄師-Discography': | ||
143 | send = { | 157 | send = { |
144 | - 'message' : { | 158 | + 'message': { |
145 | - 'text' : album + '\n발매년도 : ' + discography[0].json_year[index] + '\n수록곡 : \n' + discography[0].json_track[index] | 159 | + 'text': 'Album List' |
146 | }, | 160 | }, |
147 | - keyboard : { | 161 | + keyboard: { |
148 | - 'type' : 'buttons', | 162 | + 'type': 'buttons', |
149 | - 'buttons' : ['米津玄師-Discography', '초기화면'] | 163 | + 'buttons': discography[0].json_album |
150 | - } | ||
151 | - } | ||
152 | } | 164 | } |
153 | - break; | ||
154 | 165 | ||
155 | - /// 米津玄師 /// | 166 | + }; |
156 | - case '米津玄師' : | 167 | + break; |
168 | + case 'ヨルシカ': | ||
157 | send = { | 169 | send = { |
158 | - 'message' : { | 170 | + 'message': { |
159 | - 'text' : '이름 : 米津玄師(Yonezu Kenshi) \n 성별 : 남성 \n생년월일 : 1991년 3월 10일 \n혈액형 : O형', | 171 | + 'text': '개요 : 2인조 밴드\n멤버 : n-buna, suis \n역할 : 작사, 작곡, 편곡 - n-buna\n 보컬 - suis\n서포트 멤버 : \n 下鶴光康(Guitar)\n キタニタツヤ(Bass)\n Masack(Drums)', |
160 | - 'photo' : { | 172 | + 'photo': { |
161 | - 'url' : 'http://reissuerecords.net/rr/wp-content/uploads/flamingo_photo2.jpg', | 173 | + 'url': 'http://yorushika.com/wp-content/uploads/2018/05/biography_image2.jpg', |
162 | - 'width' : 1000, | 174 | + 'width': 1000, |
163 | - 'height' : 667 | 175 | + 'height': 667 |
164 | }, | 176 | }, |
165 | - 'message_button' : { | 177 | + 'message_button': { |
166 | - 'label' : '공식 홈페이지', | 178 | + 'label': '공식 홈페이지', |
167 | - 'url' : "http://reissuerecords.net/" | 179 | + 'url': "http://yorushika.com/" |
168 | } | 180 | } |
169 | }, | 181 | }, |
170 | - keyboard : { | 182 | + keyboard: { |
171 | - 'type' : 'buttons', | 183 | + 'type': 'buttons', |
172 | - 'buttons' : ['米津玄師-Discography'] | 184 | + 'buttons': ['ヨルシカ-Discography'] |
173 | } | 185 | } |
174 | }; | 186 | }; |
175 | break; | 187 | break; |
176 | - case '米津玄師-Discography' : | 188 | + case 'ヨルシカ-Discography': |
177 | send = { | 189 | send = { |
178 | - 'message' : { | 190 | + 'message': { |
179 | - 'text' : 'Album List' | 191 | + 'text': 'Album List' |
180 | }, | 192 | }, |
181 | - keyboard : { | 193 | + keyboard: { |
182 | - 'type' : 'buttons', | 194 | + 'type': 'buttons', |
183 | - 'buttons' : discography[0].json_album | 195 | + 'buttons': ['ㅁ'] |
184 | } | 196 | } |
185 | 197 | ||
186 | }; | 198 | }; |
187 | break; | 199 | break; |
200 | + // 앨범 정보 읽기 // | ||
201 | + case discography[0].json_album[index]: | ||
202 | + var album = '앨범 : ' + discography[0].json_album[index].substr(3); | ||
203 | + if (singer == 'Reol') { | ||
204 | + send = { | ||
205 | + 'message': { | ||
206 | + 'text': album + '\n발매년도 : ' + discography[0].json_year[index] + '\n수록곡 : \n' + discography[0].json_track[index] | ||
207 | + }, | ||
208 | + keyboard: { | ||
209 | + 'type': 'buttons', | ||
210 | + 'buttons': ['Reol-Discography', '초기화면'] | ||
211 | + } | ||
212 | + } | ||
213 | + } | ||
214 | + else if (singer == 'Yonezu') { | ||
215 | + send = { | ||
216 | + 'message': { | ||
217 | + 'text': album + '\n발매년도 : ' + discography[0].json_year[index] + '\n수록곡 : \n' + discography[0].json_track[index] | ||
218 | + }, | ||
219 | + keyboard: { | ||
220 | + 'type': 'buttons', | ||
221 | + 'buttons': ['米津玄師-Discography', '초기화면'] | ||
222 | + } | ||
223 | + } | ||
224 | + } | ||
225 | + else if (singer == 'yorusika'){ | ||
226 | + send = { | ||
227 | + 'message': { | ||
228 | + 'text': album + '\n발매년도 : ' + discography[0].json_year[index] + '\n수록곡 : \n' + discography[0].json_track[index] | ||
229 | + }, | ||
230 | + keyboard: { | ||
231 | + 'type': 'buttons', | ||
232 | + 'buttons': ['ヨルシカ-Discography', '초기화면'] | ||
233 | + } | ||
234 | + } | ||
235 | + } | ||
236 | + break; | ||
188 | case '초기화면' : | 237 | case '초기화면' : |
189 | send = { | 238 | send = { |
190 | 'message' : { | 239 | 'message' : { | ... | ... |
-
Please register or login to post a comment