What's my user agent when I parse website with rvest package in R?

前端 未结 2 791
无人共我
无人共我 2020-12-15 13:10

Since it is easy in R, I am using rvest package to parse HTML to extract informations from website.

I am wondering what\'s my User-Agent (if there is any) during the

2条回答
  •  我在风中等你
    2020-12-15 13:57

    I found this somewhere in a tutorial, it looks like an easier faster way to do it:

    uastring <- "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
    session <- html_session("https://www.linkedin.com/job/", user_agent(uastring))
    

提交回复
热议问题