Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
fix: for review
Browse files Browse the repository at this point in the history
  • Loading branch information
korosuke613 committed Aug 2, 2020
1 parent 6f9fbd7 commit c3574be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scrapingSource/scraping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# スクレイピング
driver.navigate.to(ENV['URL'])
if (driver.find_elements(:class => "info_list").size == 0)
print "no list_table\n"
puts "no info_list"
exit
end
list_table = driver.find_element(:class => "info_list")
scrapedNews = list_table.find_elements(:tag_name => "a")
info_list = driver.find_element(:class => "info_list")
scrapedNews = info_list.find_elements(:tag_name => "a")
count = scrapedNews.length - 1
newsItems = []
for i in 0..count do
Expand Down

0 comments on commit c3574be

Please sign in to comment.