Created city scraper in R

Am I doing this right?