How to put a website with dynamic content (dropdown list)?

Encountered a problem when parsing a page with a dropdown list of variations of colors of product
to write to the file name of the selected color and the image, respectively, dependent on the choice
The need to use curb, nokogiri, xpath,.. (if that is possible using these libraries)

as I understand it, you need to create post request with certain arguments and get the image url in response but do not understand how to implement it in code

link to the product: www.sammccauley.com/Product/loreal-colour-riche-li...

Screen with post-query, url-static:
360caf4e97074cc28f73ccfd373e469f.png

Screens variable option if you select color from the menu:
0bcd0e81f49d4199929a86f0b47f23e6.png4db9f12d6322414a9dcf814e7a446dcb.png
August 19th 19 at 23:37
0 answer

Find more questions by tags AJAXParsingRubyWeb DevelopmentXPath