0

I can grab a node that contains "foo", like so:

page.search("div.someclass td:contains('foo')")

How can I get a node that contains either "foo" or "bar". My attempts so far have failed.

I know I can do this with XPath, but I wanted to know if there is an easier solution.

Community
  • 1
  • 1
davegson
  • 8,205
  • 4
  • 51
  • 71

1 Answers1

2

Use:

page.search("div.someclass td:contains('foo')", "div.someclass td:contains('bar')")
the Tin Man
  • 158,662
  • 42
  • 215
  • 303