1

I'm trying to scrape the web page to extract the bank rates, but facing some problems. The code is:

public class Main {

    public static void main(String[] args) throws IOException {
        Document doc = Jsoup.connect("http://www.banki.ru/products/currency/cash/usd/tyumen~/#bank-rates").get();

        //this is what I'm trying to extract, but the block below "tr[]data-currencies-row" is generated by JavaScript
        Elements elements1 = doc.select("tr[data-currencies-row]");
        System.out.println(elements1.size());   //prints 0

        //this block below works fine
        Elements elements2 = doc.select("a[class^=font-bold]");
        System.out.println(elements2.size());   //prints 3
    }
}

How can navigate to "tr[data-currencies-row]" tags?

halfer
  • 19,824
  • 17
  • 99
  • 186
Aleksandr
  • 11
  • 4
  • So if I'm not mistaken, Jsoup can not execute JS. In this situation the question is: can you please advise some instruments for web scrapping? – Aleksandr Aug 19 '18 at 08:20

0 Answers0