Changing user agent in rvest?

Hey everybody, do you any of you know how to change one's user agent in rvest? I hear that's something you can do in python (maybe in beautiful soup?), but I haven't been able to figure out how to do it in rvest, if it's possible.

From Hadley's comment here:

It [rvest] just uses the httr default. If you want to override any of that, construct the request with httr, then pass the result to rvest::html() .

So, you'd pass a string to httr::user_agent().

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