Home>

The HTML below is an example, but I would like to scrape using Ruby on an HTML site like the one below.
Also, at that time, I want to scrape only the words from fuga1 to fuga5 in this code.

As a test, as written on many sites,

△△ .xpath ('// div [@ class = "container"]'). css ('◯◯')


I used.
However, fuga1 ~ fuga5 do not have a selector, so I didn't know what to put in the XX part.
Also, if you scrape without using .css, the entire container class will be scraped.

Corresponding source code

<br>
  Click here to apply.
<br>
  hogehoge
<br>
  hogehoge
<br>
  hogehoge
<br>
  fuga1<!-From here->
<br>
  fuga2
<br>
  fuga3
<br>
  fuga4
<br>
  fuga5<!-I want to scrape up to here! ->
<br>

nokogiri installed
nokogiri and open-uri libraries have also been imported
ruby 2.6.5

If i have any knowledge, thank you (;;)