R
R
raury2020-03-11 15:52:26
ruby
raury, 2020-03-11 15:52:26

How to parse an AJAX page in Ruby?

I use the curb library for page download and nokogiri for parsing. The content is updated by the “load more” button, so I got the idea to parse the current url, click on the button, parse the new url, and so on until the button disappears. The problem is that the libraries used do not know how to click, so please tell me the tool, or maybe a different approach to the solution than mine. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oh_shi, 2020-03-11
@raury

To click buttons you need a browser, you can try Capybara + PhantomJS. Or see what requests AJAX makes on the button and repeat until an empty response.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question