sparklemotion / mechanize

Mechanize is a ruby library that makes automated web interaction easy.
https://www.rubydoc.info/gems/mechanize/
MIT License
4.39k stars 473 forks source link

Trouble when having so much li tags? #605

Closed feliperli closed 1 year ago

feliperli commented 1 year ago

Hey everyone I'm doing an experiment using https://api.rubyonrails.org/.

For that, I'm trying to get all the li inside this ul image

But if I do something like

page = agent.get('https://api.rubyonrails.org/')
puts page.search(".tree")

I only get a empty ul

image

Is there a size limitation or something? I don't get why It does not return all the li.

feliperli commented 1 year ago

Just figure it out that this ul is populated with JS after, closing the issue