Metadata-Version: 2.4
Name: hbrowser
Version: 0.15.3
Summary: A tool for browsing tasks on e-h/exh-websites.
Author: Kuan-Lun Wang
License: GNU Affero General Public License v3
Project-URL: Homepage, https://github.com/Kuan-Lun/hbrowser
Project-URL: Tracker, https://github.com/Kuan-Lun/hbrowser/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: webdriver-manager>=4.0.2
Requires-Dist: fake-useragent>=2.2.0
Requires-Dist: h2h-galleryinfo-parser>=0.2.2
Requires-Dist: selenium>=4.40.0
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: hv-bie>=0.3.7
Requires-Dist: numpy>=2.2.6
Requires-Dist: opencv-python>=4.12.0.88
Requires-Dist: onnxruntime>=1.15.0
Requires-Dist: 2captcha-python>=2.0.2
Requires-Dist: undetected-chromedriver>=3.5.5
Requires-Dist: setuptools>=82.0.0
Provides-Extra: publish
Requires-Dist: build; extra == "publish"
Requires-Dist: twine; extra == "publish"
Provides-Extra: train
Requires-Dist: torch>=2.0; extra == "train"
Requires-Dist: torchvision>=0.15; extra == "train"
Requires-Dist: scikit-learn>=1.3; extra == "train"
Requires-Dist: onnx>=1.20.1; extra == "train"
Requires-Dist: onnxscript>=0.6.2; extra == "train"
Requires-Dist: flask>=3.0; extra == "train"
Dynamic: license-file

# HBrowser (hbrowser)

## Setup

### Environment Variables

HBrowser requires the following environment variables:

- `APIKEY_2CAPTCHA`: Your 2Captcha API key for solving CAPTCHA challenges
- `HBROWSER_LOG_LEVEL` (optional): Control logging verbosity (DEBUG, INFO, WARNING, ERROR). Default: INFO

Set the environment variables before running the script:

**Bash/Zsh:**
```bash
export APIKEY_2CAPTCHA=your_api_key_here
export HBROWSER_LOG_LEVEL=INFO  # Optional: DEBUG, INFO, WARNING, ERROR
```

**Fish:**
```fish
set -x APIKEY_2CAPTCHA your_api_key_here
set -x HBROWSER_LOG_LEVEL INFO  # Optional
```

**Windows Command Prompt:**
```cmd
set APIKEY_2CAPTCHA=your_api_key_here
set HBROWSER_LOG_LEVEL=INFO
```

**Windows PowerShell:**
```powershell
$env:APIKEY_2CAPTCHA="your_api_key_here"
$env:HBROWSER_LOG_LEVEL="INFO"
```

HBrowser uses [2Captcha](https://2captcha.com/) service to automatically solve Cloudflare Turnstile and managed challenges that may appear during login. You need to register for a 2Captcha account and obtain an API key.

## Logging

HBrowser uses Python's built-in `logging` module. You can control the log level using the `HBROWSER_LOG_LEVEL` environment variable:

- **DEBUG**: Detailed information for diagnosing problems (most verbose)
- **INFO**: Confirmation that things are working as expected (default)
- **WARNING**: Something unexpected happened, but the software is still working
- **ERROR**: A serious problem that prevented a function from executing

Example:
```bash
# Set log level to DEBUG for detailed output
export HBROWSER_LOG_LEVEL=DEBUG
python your_script.py

# Set log level to WARNING to see only warnings and errors
export HBROWSER_LOG_LEVEL=WARNING
python your_script.py
```

## Usage

Here's a quick example of how to use HBrowser:

```python
from hbrowser import EHDriver


if __name__ == "__main__":
    with EHDriver() as driver:
        driver.punchin()
```

Here's a quick example of how to use HVBrowser:

```python
from hvbrowser import HVDriver


if __name__ == "__main__":
    with HVDriver() as driver:
        driver.monstercheck()
```
