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

前端 未结 2 789
无人共我
无人共我 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 14:14

    I used https://httpbin.org/user-agent to find out:

    library(rvest)
    se <- html_session( "https://httpbin.org/user-agent" )
    se$response$request$options$useragent
    

    Answer:

    [1] "libcurl/7.37.1 r-curl/0.9.1 httr/1.0.0"
    

    See this bug report for a way to override it.

提交回复
热议问题