Metadata-Version: 2.4
Name: save-page-now-api
Version: 0.1.2
Summary: A Python wrapper for the Internet Archive's Save Page Now API.
Author-email: bac0id <ji2b13y6i@mozmail.com>
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/bac0id/save-page-now-api
Project-URL: Bug Tracker, https://github.com/bac0id/save-page-now-api/issues
Keywords: internet,archive,save page now api,web archiving
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.0
Dynamic: license-file

# save-page-now-api
 A Python wrapper for Internet Archive Wayback Machine's Save Page Now API.

## Feature

* **Easy to Use:** Provides a simple interface to interact with the Save Page Now API.
* **Customizable SPN Host and Proxy:** Allows specifying a custom SPN host and proxy settings, enabling use with services like Tor.

## Usage

Send a save request to SPN:

```python
from save_page_now_api import SavePageNowApi
api = SavePageNowApi(token="XXX:YYY")
result = api.save("https://example.com")
"""
result:
{
    'url': 'https://example.com',
    'job_id': 'spn2-XXXXXXXXXXXXXX'
}
"""
```

API with Tor:

```python
proxies = {
    "http": "schema://host:port",
    "https": "schema://host:port",
}
tor_api = SavePageNowApi(token="XXX:YYY", host="https://ZZZ.onion", proxies=proxies)
```

## Installation

```bash
pip install save-page-now-api
```

## Test
```bash
python -m unittest
```
