I am trying to scrape a website and strip two different things and print them together. The title and description of PlayStation Trophies.
require 'selenium-webdriver'
driver = Selenium::WebDriver.for(:chrome, options: options)
driver.get('https://www.playstationtrophies.org/game/far-cry-4/trophies/')
puts driver.title
trophies = driver.find_elements(:class, 'link_ach')
description = driver.find_elements(:class, 'ac3')
trophies.each do |trophy|
description.each do |desc|
puts trophy,desc.text.strip
end
driver.quit
end
I can strip them both individually but when trying to put them together it goes horribly wrong.