回答編集履歴

1

修正

2017/03/12 15:01

投稿

退会済みユーザー
test CHANGED
@@ -24,6 +24,32 @@
24
24
 
25
25
  ```
26
26
 
27
+ 配列
28
+
29
+ ```Ruby
30
+
31
+ #encoding : utf-8
32
+
33
+ require"open-uri"
34
+
35
+ require"certified"
36
+
37
+ urls =["https://www.scientificamerican.com/article/epa-chief-pruitt-refuses-to-link-co2-and-global-warming/",
38
+
39
+ "https://blogs.scientificamerican.com/anecdotes-from-the-archive/medallions-and-the-dark-arts-of-propaganda-1917/"]
40
+
41
+
42
+
43
+ urls.map!{|e| open(e, &:read).scan(%r|<title>(.+?)</title>|).flatten}
44
+
45
+
46
+
47
+ puts urls
48
+
49
+ ```
50
+
27
51
  Anemoneの使い方は分かりません。
28
52
 
29
53
  タイトルを取り出すだけならこれでいけると思います。
54
+
55
+ 上でも下でも見た目は変わりません。