I'm using nokogiri gem on my rails application to get some html nodes. I'm getting my div by its class. But that class name will change sometimes. For example, right now I'm getting it like this:
doc.css("div.t.m0.x15.h3.ff2.fs1.fc0.sc0.ls0.ws1")
but that "x15" can be "x13", for example. I could do something like this:
doc.css("div.t.m0.x13.h3.ff2.fs1.fc0.sc0.ls0.ws1", "div.t.m0.x15.h3.ff2.fs1.fc0.sc0.ls0.ws1")
This would work, but I think it would be nicer to set a range, like x13-x15, so if it comes a x14, I don't need to keep it so verbose.
Any tips of how to do that? Thanks!
EDIT:
I can't remove the "x*" class, 'cause there's another div with the same another classes, so what differences the two elements is the "x" class. The another one is xa, xb; and this one I'm trying to get is x13, x15.