I clean the site and I canโt get the images because they are loaded using CSS background.
Is there a way to get these attributes using Nokogiri without using Phantom.js or Sentinel? The background image actually uses inline styles, so I should be able to.
I need to get images from an array of URLS:
<div class="zoomLens" style="background-image: url(http://resources1.okadirect.com/assets/en/new/catalogue/1200x1200/EHD005MET-L_01.jpg?version=7); background-position: -14.7368421052632px -977.894736842105px; background-repeat: no-repeat;"> </div>
I use Nokogiri through Mechanize, but I donโt know how to write it correctly:
image = agent.get(doc.parser.at('.zoomLens')["background-image"]).save("okaimages/f_deco-#{counter}.jpg")
source share