回答編集履歴

1

修正

2019/09/25 07:43

投稿

rhiroe
rhiroe

スコア2349

test CHANGED
@@ -64,9 +64,9 @@
64
64
 
65
65
  ```rb
66
66
 
67
- last_page.times do |_, idx|
67
+ (1..last_page).each do |n|
68
68
 
69
- pagination_parsed_page = Nokogiri::HTML(HTTParty.get("https://terateil#{idx}"))
69
+ pagination_parsed_page = Nokogiri::HTML(HTTParty.get("https://terateil#{n}"))
70
70
 
71
71
  pagination_parsed_page.css('div.card-eventSingle').each do |vol|
72
72
 
@@ -104,9 +104,9 @@
104
104
 
105
105
  ```rb
106
106
 
107
- last_page.times do |_, idx|
107
+ (1..last_page).each do |n|
108
108
 
109
- pagination_parsed_page = Nokogiri::HTML(HTTParty.get("https://terateil#{idx}"))
109
+ pagination_parsed_page = Nokogiri::HTML(HTTParty.get("https://terateil#{n}"))
110
110
 
111
111
  pagination_parsed_page.css('div.card-eventSingle').each do |vol|
112
112