How to retrieve the element's link in the html table?

How to retrieve the element's link in the html table with R?

For example: we would like to retrieve companies' detailed stock link addresses in "Most Actives table" on "Hot Stocks - Stock Market Movers - CNNMoney" page , a link like "BAC - Bank of America Corp Stock quote - CNNMoney.com",

How could we do?

library(tidyverse)
library(rvest)

"https://money.cnn.com/data/hotstocks/index.html"   |> 
read_html()

what 's next could we do.

You just put an img tag inside the table cell (< td > tag) . The src attribute's value can be any valid URL of an image on the Web , local or remote.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.