Tools to Work with the 'Splash' JavaScript Rendering Service in R
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

splash_user_agent.Rd 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/dsl.R, R/user-agents.R
  3. \docType{data}
  4. \name{splash_user_agent}
  5. \alias{splash_user_agent}
  6. \alias{ua_splashr}
  7. \alias{ua_win10_chrome}
  8. \alias{ua_win10_firefox}
  9. \alias{ua_win10_ie11}
  10. \alias{ua_win7_chrome}
  11. \alias{ua_win7_firefox}
  12. \alias{ua_win7_ie11}
  13. \alias{ua_macos_chrome}
  14. \alias{ua_macos_safari}
  15. \alias{ua_linux_chrome}
  16. \alias{ua_linux_firefox}
  17. \alias{ua_ios_safari}
  18. \alias{ua_android_samsung}
  19. \alias{ua_kindle}
  20. \alias{ua_ps4}
  21. \alias{ua_apple_tv}
  22. \alias{ua_chromecast}
  23. \title{Overwrite the User-Agent header for all further requests.}
  24. \format{An object of class \code{character} of length 1.}
  25. \usage{
  26. splash_user_agent(splash_obj, user_agent = ua_splashr)
  27. ua_splashr
  28. ua_win10_chrome
  29. ua_win10_firefox
  30. ua_win10_ie11
  31. ua_win7_chrome
  32. ua_win7_firefox
  33. ua_win7_ie11
  34. ua_macos_chrome
  35. ua_macos_safari
  36. ua_linux_chrome
  37. ua_linux_firefox
  38. ua_ios_safari
  39. ua_android_samsung
  40. ua_kindle
  41. ua_ps4
  42. ua_apple_tv
  43. ua_chromecast
  44. }
  45. \arguments{
  46. \item{splash_obj}{splashr object}
  47. \item{user_agent}{1 element character vector, defaults to \code{splashr/#.#.#}.}
  48. }
  49. \description{
  50. There are a few built-in user agents, all beginning with \code{ua_}.
  51. }
  52. \examples{
  53. \dontrun{
  54. library(rvest)
  55. URL <- "https://httpbin.org/user-agent"
  56. splash_local \%>\%
  57. splash_response_body(TRUE) \%>\%
  58. splash_user_agent(ua_macos_chrome) \%>\%
  59. splash_go(URL) \%>\%
  60. splash_html() \%>\%
  61. html_text("body") \%>\%
  62. jsonlite::fromJSON()
  63. }
  64. }
  65. \concept{splash_dsl_functions_functions}
  66. \keyword{datasets}