knitr::opts_chunk$set(echo = TRUE)

requestsR : Python's Requests module for R

Ref: http://docs.python-requests.org/

Ref: https://asbcllc.com/r_packages/requestsR/docs/index.html

"Requests is an elegant and simple HTTP library for Python {and now R}, built for human beings. You are currently looking at the documentation of the development release.."

Background

R has a number of great packages for interacting with web data but it still lags behind Python in large part because of the power and ease of use of the Requests module.

This package aims to port those powers to R, I like to think of this package as the Bo Jackson of web interaction tools.

requestsR Logo

It is fast, agile, powerful, clean and now it plays 2 languages!

Caveats

. This is not intended to replace httr, curl, rvest, or whatever package you use to interact with web data. In fact, in many cases you will want to use requestsR in concert with those packages, especially curl and rvest. I have found that requestsR comes in most handy for very complex web scraping tasks that require multiple headers, parameters and cookies.

Installation

This package requires Python and the requests module.

To install Requests in R you can run:

system("pip install requests")

Work-horse functions

Other functions

Mungers

Installation

devtools::install_github("abresler/requestsR")
options(width=120)

Usage

Please feel free to take a look at this blog post demonstrating how to use the package.



abresler/requestsR documentation built on July 31, 2023, 5:40 p.m.