title: How scrape values from HTML select/option tags in R
body: <p>I have a similar problem as is shown in the this question: <a href="https://stackoverflow.com/questions/25965785/scrape-values-from-html-select-option-tags-in-r">link</a>.</p>
  
  <p>I am scraping this <a href="https://catastroalava.tracasa.es/descargas/?lang=es" rel="nofollow noreferrer">web page</a> and I would like to download the text in the option value, I mean, where you can read "Seleccionar municipio", that is, the next node in the html code:</p>
  
  <pre><code>&lt;select name="txtMunicipio" id="txtMunicipio" class="inputText"&gt;&lt;option value=""&gt;-------------------------------------&lt;/option&gt;
    &lt;option value="001"&gt;ALEGRIA-DULANTZI&lt;/option&gt;
    &lt;option value="002"&gt;AMURRIO&lt;/option&gt;
    &lt;option value="049"&gt;AÑANA&lt;/option&gt;
    &lt;option value="003"&gt;ARAMAIO&lt;/option&gt;
    &lt;option value="006"&gt;ARMIÑON&lt;/option&gt;
    &lt;option value="037"&gt;ARRAIA-MAEZTU&lt;/option&gt;
    ...
    &lt;/select&gt;
  </code></pre>
  
  <p>And I would like to obtain something like follows</p>
  
  <pre><code>ID   Name
  001  ALEGRIA-DULANTZI
  002  AMURRIO
  049  AÑANA
  ...
  </code></pre>
  
  <p>So what I have tried is something similar as the question I made reference before, using the next lines in R:</p>
  
  <pre><code>web_page&lt;-read_html("https://catastroalava.tracasa.es/descargas/?lang=es")
  
  web_page %&gt;% html_nodes("select#txtMunicipio.inputText option") %&gt;% html_attr("value")
  web_page %&gt;% html_nodes(".inputText option") %&gt;% html_attr("value")
  web_page %&gt;% html_nodes("#txtMunicipio option") %&gt;% html_attr("value")
  
  web_page %&gt;% html_nodes("select#txtMunicipio.inputText option") %&gt;% html_text()
  web_page %&gt;% html_nodes(".inputText option") %&gt;% html_text()
  web_page %&gt;% html_nodes("#txtMunicipio option") %&gt;% html_text()
  </code></pre>
  
  <p>But what I ever obtain is:</p>
  
  <pre><code>character(0)
  </code></pre>
  
  <p>Please, could you help me what are the parameters that I have to put in <code>html_nodes</code> function to download the information?</p>
  
  <p>Thanks in advance</p>