There is a site, the site has a block with id regions, cities, etc., but this block is hidden until you click on it with the mouse. I need to extract these id.

From the beginning, I extracted their html page using the HttpURLConnection class, but since this block is hidden until you click on it, I don’t receive the source of this block in the html page so I can parse it.

Have a solution to this problem?

By the way, when I open the developer console, the contents of this block can be found and viewed, even if it is hidden.

  • one
    Not sure, but maybe this block is loaded by one of the js script located on the page. - Artem Konovalov

1 answer 1

Do not come in sorts - it means they are loaded by a script.
The block in the console may simply be empty.

Either load it as an HTML page ( WebView ?) And WebView JS load the block there, or immediately find out the address with the loaded data and pull it from there.
The first option for perverts, of course :)

  • Thank you very much! Revised again, really the block is empty. - Andrey Sibirkin
  • @AndreySibirkin, always welcome! - user207618