Requests wrapper to log onto NBER.org.
Project description
Requests-NBER is a custom Requests class to log onto NBER.org, the website of the National Bureau of Economic Research.
Installation
$ pip install requests_nber
Documentation
Detailed documentation available at www.erinhengel.com/software/requests-nber.
Quickstart
The NBER class logs onto NBER.org and establishes a connection with the host. Contains a session attribute that returns a Request Session object with all the methods of the main Requests API.
>>> import requests_nber
# Establish NBER connection object.
>>> deets = {'username': 'someuser', 'password': 'XXXX'}
>>> conn = requests_nber.NBER(login=deets)
# Download the HTML of the paper with document id t1.
>>> doc_id = 't1'
>>> html = conn.html(id=doc_id)
# Download the document PDF.
>>> pdf = conn.pdf(id=doc_id, file='article.pdf')
# Download the bibliographic information.
>>> biblio = conn.ref(id=doc_id)
>>> biblio['doi']
'10.3386/t0001'
>>> biblio['author']
'Seppo Honkapohja and Takatoshi Ito'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests-nber-0.0.1.tar.gz
(3.8 kB
view details)
File details
Details for the file requests-nber-0.0.1.tar.gz.
File metadata
- Download URL: requests-nber-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cc0b900631684ae5738fda137c6d3bc9a7a1fbdd97bc3977ed6a3da5b4b8b02
|
|
| MD5 |
69a366174af9238527bb31be54afdf7a
|
|
| BLAKE2b-256 |
61d15ab476780d9b68a76a0525a56d2bb568ad22667d7bcc171f85da64cd5a75
|