title: Portfolio dataset from investing.com
body: <p>I'm new at web scraping an I'm stuck with this.</p>
  <p>My goal is to generate a table with historical data from '2018-01-01' to '2021-12-31' but I have 0 idea of how to do it.</p>
  <p>My code:</p>
  <pre><code>library(tidyquant)    # To download the data. Datos bursátiles.
  library(plotly)       # To create interactive charts
  library(timetk)       # To manipulate the data series
  library(tidyr)        # Tidy format excel format
  library(ggplot2)
  library(forcats)      # Predictions
  library(dplyr)
  library(httr)
  library(rvest)
  
  url&lt;-&quot;https://es.investing.com/equities/home-depot-historical-data&quot;
  
  url%&gt;%  
    GET(from = '2018-01-01',
        to = '2021-12-31')%&gt;%
    http_status()
  
  dolar_table&lt;-url%&gt;%
    read_html()%&gt;%
    html_node('#curr_table', )%&gt;%
    html_table()%&gt;%
    tbl_df()
  
  html_table
  
  Serie&lt;-dolar_table%&gt;%
    rename('Cierre'='Último')%&gt;%
    mutate(Fecha=(gsub('\\.','-',Fecha)),
           Apertura=gsub(&quot;\\.&quot;,&quot;&quot;,Apertura),
           Apertura=gsub(&quot;,&quot;,&quot;.&quot;,Apertura),
           Apertura=as.numeric(Apertura),
           Cierre=gsub(&quot;\\.&quot;,&quot;&quot;,Cierre),
           Cierre=gsub(&quot;,&quot;,&quot;.&quot;,Cierre),
           Cierre=as.numeric(Cierre))%&gt;%
    select(c(Fecha,Apertura,Cierre))
  
  
  Serie$Fecha&lt;-lubridate::dmy(Serie$Fecha)
  Serie
  </code></pre>
  <p>At least it does return a nice table but the dates are not the ones I need!</p>
  <p>Also, I have to do this for more than 1 stock. I have a 5 stock portfolio and I don't know how to concatenate my stocks in the same dataset.</p>
  <p>Hopefully someone knows how to procceed.</p>