0

I need scrape company names from a web site , there is my code :

URL <- "http://www.mtosb.org.tr/firmalar/?Alfabe=A" 
tab <- URL %>% read_html %>%  
  html_node("#blog-main h2") %>% html_text()

And it's return only one element instead of ten :

[1] "ACAR-MAK-SAN MAKİNA TAR. İNŞ. ÖZEL. EĞİT. SAN. TİC. LTD. ŞTİ."

How can i scrape all company names?

atahan
  • 3
  • 2

1 Answers1

0

Solved

It has to be :

tab <- URL %>% read_html %>%  
  html_nodes("#blog-main h2") %>%
  html_text()

Changed html_node to html_nodes

atahan
  • 3
  • 2