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
  • 7,882
  • 4
  • 49
  • 69

1 Answers1

2

Use:

page.search("div.someclass td:contains('foo')", "div.someclass td:contains('bar')")
the Tin Man
  • 155,156
  • 41
  • 207
  • 295