Metadata-Version: 2.4
Name: scrapemyst
Version: 1.1.0
Summary: A lean wrapper for requests with stealth features.
Home-page: https://github.com/E4crypt3d/ScrapeMyst
Author: E4crypt3d
Author-email: gohramgkb@gmail.com
Project-URL: Source, https://github.com/E4crypt3d/ScrapeMyst
Project-URL: Tracker, https://github.com/E4crypt3d/ScrapeMyst/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# ScrapeMyst

a lean, human-like wrapper for Python `requests`. Handles user-agent rotation, proxy setup, and random delays so you don't have to.

## Installation

```bash
pip install scrapemyst
```

## Usage

### Setup

```python
from scrapemyst import ScrapeMyst
```

### Initialize with proxies

```python
proxies = ["127.0.0.1:8000", "example.com:8080"]
scrapemyst = ScrapeMyst(proxies=proxies)
```

### Or use the default instance for quick tasks

```python
from scrapemyst import scrapemyst
```

## GET request

Supports fixed sleep (`sleep=3`) or random ranges (`sleep=(1, 5)`).

```python
res = scrapemyst.send_get(
    "https://example.com",
    params={"id": "123"},
    sleep=(2, 4),
    referer="https://google.com"
)

if res["success"]:
    print(f"status: {res['status_code']}")
    # data is the raw requests response object
    print(res["data"].text)
```

## POST request

Works with standard form data or JSON.

### POST form data

```python
scrapemyst.send_post(
    "https://example.com/login",
    data={"user": "admin"}
)
```

### POST JSON

```python
res = scrapemyst.send_post(
    "https://api.com/v1",
    json={"key": "val"},
    sleep=2
)
```

## Response structure

Every method returns a simple dictionary:

* `success`: bool â€” `True` if the request worked
* `status_code`: int â€” HTTP status code (200, 404, etc.)
* `data`: the raw response object (if successful)
* `error_message`: string (if it failed)

## Customization

### Add new headers

```python
scrapemyst.update_headers({"X-Custom": "Value"})
```

### Overwrite all headers

```python
scrapemyst.update_headers({"User-Agent": "MyBot"}, replace=True)
```

## License

MIT
