A lean wrapper for requests with stealth features.
Project description
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
pip install scrapemyst
Usage
Setup
from scrapemyst import ScrapeMyst
Initialize with proxies
proxies = ["127.0.0.1:8000", "example.com:8080"]
scrapemyst = ScrapeMyst(proxies=proxies)
Or use the default instance for quick tasks
from scrapemyst import scrapemyst
GET request
Supports fixed sleep (sleep=3) or random ranges (sleep=(1, 5)).
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
scrapemyst.send_post(
"https://example.com/login",
data={"user": "admin"}
)
POST JSON
res = scrapemyst.send_post(
"https://api.com/v1",
json={"key": "val"},
sleep=2
)
Response structure
Every method returns a simple dictionary:
success: bool —Trueif the request workedstatus_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
scrapemyst.update_headers({"X-Custom": "Value"})
Overwrite all headers
scrapemyst.update_headers({"User-Agent": "MyBot"}, replace=True)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapemyst-1.1.0.tar.gz.
File metadata
- Download URL: scrapemyst-1.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc63b80ca20fc8dacf18e028be56a73e4318565009db5f725591203d050ef691
|
|
| MD5 |
c9f52dee57b2eb8ad69955a03da94c64
|
|
| BLAKE2b-256 |
efe26b4083f01ea73f0f30e31a8f7756dd695b90611e70d5648c4d20c33dd13d
|
File details
Details for the file scrapemyst-1.1.0-py3-none-any.whl.
File metadata
- Download URL: scrapemyst-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd97bfb96a084cc9020b421cfe195d71dea0e0b616f212d7c18222d4f82261b9
|
|
| MD5 |
dfc06bbbd5834f1cad65744f0dede4d7
|
|
| BLAKE2b-256 |
65348785e4879f76744b259bc2767f06b8a480a5f438f37ca3c1f121e63c4589
|