title: Scraping federal note yield table from the treasury website
body: <p>I would like to download the 10-year federal note yield from the treasury website: <a href="https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield" rel="nofollow noreferrer">https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield</a></p>
  
  <p>To parse the above webpage and retrieve the most recent 10 yr treasury note yield, I used to follow the instructions provided here:
  <a href="https://stackoverflow.com/questions/37952589/parsing-10-year-federal-note-yield-from-the-website">Parsing 10-year federal note yield from the website</a></p>
  
  <pre><code>library(httr)
  URL = "https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield"
  
  urldata &lt;- GET(URL)
  data &lt;- readHTMLTable(rawToChar(urldata$content),
                        stringsAsFactors = FALSE)
  
  data &lt;- as.data.frame((data[69]))
  names(data) &lt;- gsub("NULL.","", names(data)) # Take out "NULL."
  </code></pre>
  
  <p>But it no longer works.</p>
  
  <p>Any thoughts what may be wrong or alternative suggestions?</p>