| 42 | | url = link || elem.to_a( 'watch_url' )[0].text |
| 43 | | thumb = elem.to_a( 'thumbnail_url' )[0].text |
| 44 | | title = label || elem.to_a( 'title' )[0].text |
| 45 | | desc = label ? nil : elem.to_a( 'description' )[0].text |
| 46 | | comment = label ? nil : elem.to_a( 'last_res_body' )[0].text |
| 47 | | length = elem.to_a( 'length' )[0].text |
| 48 | | view = elem.to_a( 'view_counter' )[0].text |
| 49 | | comment_num = elem.to_a( 'comment_num' )[0].text |
| 50 | | mylist = elem.to_a( 'mylist_counter' )[0].text |
| | 42 | i = {} |
| | 43 | i[:url] = link || elem.to_a( 'watch_url' )[0].text |
| | 44 | i[:thumb] = elem.to_a( 'thumbnail_url' )[0].text |
| | 45 | i[:title] = label || elem.to_a( 'title' )[0].text |
| | 46 | i[:desc] = elem.to_a( 'description' )[0].text |
| | 47 | i[:comment] = @conf.mobile_agent? ? '' : elem.to_a( 'last_res_body' )[0].text |
| | 48 | i[:length] = elem.to_a( 'length' )[0].text |
| | 49 | i[:view] = elem.to_a( 'view_counter' )[0].text |
| | 50 | i[:comment_num] = elem.to_a( 'comment_num' )[0].text |
| | 51 | i[:mylist] = elem.to_a( 'mylist_counter' )[0].text |
| 64 | | result = <<-HTML |
| 65 | | <table border="0" cellpadding="4" cellspacing="0" summary="#{title}" style="margin-left:0em;"> |
| 66 | | <tr valign="top"> |
| 67 | | <td style="font-size:70%;border-width:0px;"> |
| 68 | | <div style="margin:4px 0px;"><a href="#{url}" target="_blank"><img alt="#{title}" src="#{thumb}" width="130" height="100" style="border:solid 1px #333;"></a></div> |
| 69 | | <p><strong>#{length.split(/:/).map{|i|'%02d' % i.to_i}.join(':')}</strong><br> |
| 70 | | 再生: <strong>#{view.scan(/\d+?(?=\d{3}*$)/).join(",")}</strong><br> |
| 71 | | コメント: <strong>#{comment_num.scan(/\d+?(?=\d{3}*$)/).join(",")}</strong><br> |
| 72 | | マイリスト: <strong>#{mylist.scan(/\d+?(?=\d{3}*$)/).join(",")}</strong></p> |
| 73 | | </td> |
| 74 | | <td width="100%" style="font-size:80%;border-width:0px;"> |
| 75 | | <p><a href="#{url}" target="_blank" class="video"><strong>#{title}</strong></a><br>#{desc}</p> |
| 76 | | <div style="background:#FFF; border:solid 2px #CCC; padding:6px; margin-top:4px;"> |
| 77 | | <p><strong>#{comment}</strong></p> |
| 78 | | </div> |
| 79 | | </td> |
| 80 | | </tr> |
| 81 | | </table> |
| 82 | | HTML |
| | 61 | result = nicovideo_html( i ) |