trsolverscraper 1.2.78
A Python module to bypass Cloudflare's anti-bot page (fork of cloudscraper)
Requires Python: >=3.6

# Proje Açıklaması
trscraper
PyPI version License: MIT image Build Status Donate

A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM), implemented with Requests. Cloudflare changes their techniques periodically, so I will update this repo frequently.

# Kurulum
Simply run `pip install trscraper`. The PyPI package is at https://pypi.python.org/pypi/trscraper/

Alternatively, clone this repository and run `python setup.py install`.

# Gereksinimler
- Python 3.x
- Requests >= 2.9.2
- requests_toolbelt >= 0.9.1

`python setup.py install` will install the Python dependencies automatically. The javascript interpreters and/or engines you decide to use are the only things you need to install yourself, excluding js2py which is part of the requirements as the default.

# JavaScript Yorumlayıcıları ve Motorları
We support the following Javascript interpreters/engines:
- ChakraCore
- js2py: >=0.67
- native: Self made native python solver (Default)
- Node.js
- V8

# Kullanım
```python
import trscraper

scraper = trscraper.create_scraper()  # returns a TRscraper instance
# Or: scraper = trscraper.CloudScraper()  # TRscraper inherits from requests.Session
print(scraper.get("http://somesite.com").text)  # => "<!DOCTYPE html><html><head>..."
```

# Seçenekler

## Cloudflare V1'i Devre Dışı Bırakma
```python
scraper = trscraper.create_scraper(disableCloudflareV1=True)
```

## Brotli Sıkıştırma
```python
scraper = trscraper.create_scraper(allow_brotli=False)
```

## Tarayıcı / Kullanıcı Ajanı Filtreleme
```python
scraper = trscraper.create_scraper(browser='chrome')

# Sadece Android'de mobil Chrome Kullanıcı Ajanları
scraper = trscraper.create_scraper(
    browser={
        'browser': 'chrome',
        'platform': 'android',
        'desktop': False
    }
)
```

## Hata Ayıklama
```python
scraper = trscraper.create_scraper(debug=True)
```

## Gecikmeler
```python
scraper = trscraper.create_scraper(delay=10)
```

## Mevcut Oturum Kullanımı
```python
session = requests.session()
scraper = trscraper.create_scraper(sess=session)
```

# Captcha Çözücüler
TRSolver Captcha çözücü desteği:

```python
scraper = trscraper.create_scraper(
  captcha={
    'provider': 'trsolver',
    'api_key': 'your_trsolver_api_key'
  }
)
```

# Kriptografi
```python
# Daha karmaşık ecdh eğrisi kullanımı
scraper = trscraper.create_scraper(ecdhCurve='secp384r1')

# Sunucu ana bilgisayar adı manipülasyonu
scraper = trscraper.create_scraper(server_hostname='www.somesite.com')
scraper.get(
    'https://backend.hosting.com/',
    headers={'Host': 'www.somesite.com'}
)
```

# TRSolver Scraper

TRSolver API entegrasyonu ile captcha çözme kütüphanesi.

## Kurulum

```bash
pip install trsolverscraper
```

## Kullanım

```python
from trsolverscraper import create_scraper

# Scraper oluştur
scraper = create_scraper()

# Captcha token al
try:
    token = scraper.solve_captcha(
        site="betgaranti",  # Site adı
        trsolver_api_key="test"  # TRSolver API anahtarı
    )
    print("Çözülen token:", token)
except Exception as e:
    print("Hata:", e)
```

## Parametreler

- `site`: Captcha'nın bulunduğu site adı (örn: "betgaranti")
- `trsolver_api_key`: TRSolver API anahtarı
- `type`: Captcha tipi (varsayılan: "trsolver")

## Örnek

```python
from trsolverscraper import create_scraper

# Scraper oluştur
scraper = create_scraper()

# Farklı siteler için token al
sites = ["betgaranti", "nesine", "birebin"]
api_key = "test"

for site in sites:
    try:
        token = scraper.solve_captcha(
            site=site,
            trsolver_api_key=api_key
        )
        print(f"{site} için token:", token)
    except Exception as e:
        print(f"{site} için hata:", e)
```

## Lisans

MIT License