bigparse 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bigparse-1.0.0/LICENSE +21 -0
- bigparse-1.0.0/PKG-INFO +203 -0
- bigparse-1.0.0/README.md +175 -0
- bigparse-1.0.0/bigparse/__init__.py +19 -0
- bigparse-1.0.0/bigparse/client.py +192 -0
- bigparse-1.0.0/bigparse/models.py +84 -0
- bigparse-1.0.0/bigparse.egg-info/PKG-INFO +203 -0
- bigparse-1.0.0/bigparse.egg-info/SOURCES.txt +10 -0
- bigparse-1.0.0/bigparse.egg-info/dependency_links.txt +1 -0
- bigparse-1.0.0/bigparse.egg-info/top_level.txt +1 -0
- bigparse-1.0.0/pyproject.toml +38 -0
- bigparse-1.0.0/setup.cfg +4 -0
bigparse-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RTURK Teknoloji Ltd. Sti.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
bigparse-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bigparse
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: BigParse Arama Motoru API - Resmi Python SDK
|
|
5
|
+
Author-email: RTURK Teknoloji <info@rturk.com.tr>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://bigparse.com
|
|
8
|
+
Project-URL: Documentation, https://bigparse.com/hesap
|
|
9
|
+
Project-URL: Repository, https://github.com/rturk/bigparse-python
|
|
10
|
+
Project-URL: Issues, https://github.com/rturk/bigparse-python/issues
|
|
11
|
+
Keywords: bigparse,arama,search,api,turkiye,haber
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# BigParse Python SDK
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/bigparse/)
|
|
32
|
+
[](https://www.python.org/downloads/)
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
|
|
35
|
+
**BigParse**, Turkiye'nin bagimsiz arama motoru API'si icin resmi Python istemcisidir. 11.000+ Turk haber kaynagini gercek zamanli indeksler, saniyeler icinde JSON formatinda arama sonuclari dondurur.
|
|
36
|
+
|
|
37
|
+
Sifir bagimlilk. Sadece Python standart kutuphanesi. 3 satirda entegre edin.
|
|
38
|
+
|
|
39
|
+
> **Kapsam Notu:** BigParse su anda **Turkiye kaynakli guncel haber ve icerik** uzerine odaklanmaktadir. Indeksimiz 11.000+ Turk haber sitesi, yerel gazeteler, bolgesel medya kuruluslari ve Turkce icerik ureten platformlari kapsar. Genel amacli bir web arama motoru degildir — uluslararasi kaynaklar, Ingilizce icerikler veya haber disi web sayfalari (e-ticaret, forum, wiki vb.) henuz indekste yer almamaktadir. En iyi sonuclari **Turkiye gundemi, yerel haberler, bolgesel icerikler ve Turkce haber aramalari** icin alirsiniz. Kapsam surekli genislemektedir.
|
|
40
|
+
|
|
41
|
+
## Kurulum
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install bigparse
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Hizli Baslangic
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from bigparse import BigParse
|
|
51
|
+
|
|
52
|
+
bp = BigParse("YOUR_API_KEY")
|
|
53
|
+
|
|
54
|
+
results = bp.search("yapay zeka")
|
|
55
|
+
print(f"{results.total} sonuc, {results.duration_ms}ms")
|
|
56
|
+
|
|
57
|
+
for r in results:
|
|
58
|
+
print(f"{r.title} — {r.domain}")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## API Key Almak
|
|
64
|
+
|
|
65
|
+
BigParse API'yi kullanmak icin bir API anahtarina ihtiyaciniz var. Ucretsiz plan ile hemen baslayabilirsiniz.
|
|
66
|
+
|
|
67
|
+
### 1. Hesap Olusturun
|
|
68
|
+
[bigparse.com/kayit](https://bigparse.com/kayit) adresinden ucretsiz hesabinizi olusturun. E-posta ve sifreniz yeterli.
|
|
69
|
+
|
|
70
|
+
### 2. API Key Talep Edin
|
|
71
|
+
[bigparse.com/hesap](https://bigparse.com/hesap) panelinden **"Yeni API Key Talep Et"** butonuna tiklayarak key talebinizi olusturun. Projenizin adini ve kullanim amacinizi belirtin.
|
|
72
|
+
|
|
73
|
+
### 3. Onay Sonrasi Kullanima Baslayin
|
|
74
|
+
Talebiniz ekibimiz tarafindan incelenir ve onaylanir. Onay sonrasi API keyiniz aninda aktif olur ve hesap panelinizden kopyalayabilirsiniz.
|
|
75
|
+
|
|
76
|
+
### Planlar
|
|
77
|
+
|
|
78
|
+
| Plan | Gunluk Sorgu | Rate Limit | API Key | Aylik Ucret |
|
|
79
|
+
|------|-------------|------------|---------|-------------|
|
|
80
|
+
| **Ucretsiz** | 100 | 10/dk | 1 | Ucretsiz |
|
|
81
|
+
| **Baslangic** | 1.000 | 30/dk | 3 | 149 TL |
|
|
82
|
+
| **Profesyonel** | 10.000 | 60/dk | 10 | 499 TL |
|
|
83
|
+
| **Kurumsal** | 100.000 | 120/dk | 50 | 1.999 TL |
|
|
84
|
+
|
|
85
|
+
Kurumsal planlarda ozel limitler ve oncelikli destek icin [info@rturk.com.tr](mailto:info@rturk.com.tr) adresinden bize ulasin.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Arama
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
# Temel arama
|
|
93
|
+
results = bp.search("deprem")
|
|
94
|
+
|
|
95
|
+
# Zaman filtresi: son 24 saatin haberleri
|
|
96
|
+
results = bp.search("son dakika", tbs="24h") # 1h, 24h, 7d, 30d, 1y
|
|
97
|
+
|
|
98
|
+
# Bolge filtresi: sadece Istanbul kaynaklari
|
|
99
|
+
results = bp.search("trafik", region="istanbul")
|
|
100
|
+
|
|
101
|
+
# Kategori filtresi
|
|
102
|
+
results = bp.search("faiz", category="ekonomi")
|
|
103
|
+
|
|
104
|
+
# Sayfalama
|
|
105
|
+
results = bp.search("teknoloji", limit=20, page=2)
|
|
106
|
+
|
|
107
|
+
# Hepsini birden
|
|
108
|
+
results = bp.search("secim", tbs="7d", region="ankara", limit=50)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Tum Sayfalari Dolasma
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Otomatik sayfalama — tum sonuclari tek dongude alin
|
|
115
|
+
for r in bp.search_all("yapay zeka", max_pages=5):
|
|
116
|
+
print(r.title, r.url)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Otomatik Tamamlama
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
suggestions = bp.suggest("anka")
|
|
123
|
+
for s in suggestions.suggestions:
|
|
124
|
+
print(s) # ankara, ankaragucu, ankarada bugun...
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Hata Yonetimi
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from bigparse import BigParse, AuthError, RateLimitError, BigParseError
|
|
131
|
+
|
|
132
|
+
bp = BigParse("YOUR_API_KEY")
|
|
133
|
+
|
|
134
|
+
try:
|
|
135
|
+
results = bp.search("test")
|
|
136
|
+
except AuthError:
|
|
137
|
+
print("API key gecersiz veya aktif degil.")
|
|
138
|
+
except RateLimitError as e:
|
|
139
|
+
print(f"Cok fazla istek. {e.retry_after} saniye sonra tekrar deneyin.")
|
|
140
|
+
except BigParseError as e:
|
|
141
|
+
print(f"API hatasi [{e.status_code}]: {e}")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Yanit Modeli
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
results = bp.search("istanbul haber")
|
|
148
|
+
|
|
149
|
+
# SearchResponse
|
|
150
|
+
results.total # Toplam sonuc sayisi
|
|
151
|
+
results.duration_ms # Sorgu suresi (milisaniye)
|
|
152
|
+
results.detected_city # Otomatik tespit edilen sehir
|
|
153
|
+
results.detected_region # Tespit edilen bolge
|
|
154
|
+
results.query_type # Sorgu tipi (general, news, local)
|
|
155
|
+
len(results) # Bu sayfadaki sonuc sayisi
|
|
156
|
+
|
|
157
|
+
# SearchResult
|
|
158
|
+
r = results[0]
|
|
159
|
+
r.title # Baslik
|
|
160
|
+
r.url # Kaynak URL
|
|
161
|
+
r.domain # Domain adi
|
|
162
|
+
r.snippet # Icerik ozeti
|
|
163
|
+
r.image # Gorsel URL (varsa)
|
|
164
|
+
r.author # Yazar (varsa)
|
|
165
|
+
r.published_at # Yayin tarihi (ISO 8601)
|
|
166
|
+
r.quality_score # Kalite puani (0-1)
|
|
167
|
+
r.quality_tier # Kalite seviyesi (A/B/C/D)
|
|
168
|
+
r.keywords # Anahtar kelimeler
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Kullanim Senaryolari
|
|
172
|
+
|
|
173
|
+
**Haber Uygulamasi** — Turkiye genelindeki haber kaynaklarini tek API ile arayin, zaman ve bolge filtresiyle daraltarak son dakika iceriklerini sunun.
|
|
174
|
+
|
|
175
|
+
**Icerik Analizi** — 11.000+ kaynaktan veri cekin. Belirli konulardaki haber yogunlugunu, kaynak cesitliligini ve trend degisimlerini analiz edin.
|
|
176
|
+
|
|
177
|
+
**Medya Izleme** — Marka, kisi veya konu bazli arama yaparak Turk medyasindaki gorunurlugu takip edin. Otomatik sayfalama ile tum sonuclari toplayin.
|
|
178
|
+
|
|
179
|
+
**Chatbot Entegrasyonu** — Yapay zeka asistanlariniza gercek zamanli Turkiye gundemini kazandirin. Kullanici sorularina BigParse verileriyle desteklenmis yanitlar verin.
|
|
180
|
+
|
|
181
|
+
**Akademik Arastirma** — Turk medyasindaki belirli konularin zaman icindeki yansimalarini arastirin. Tarih filtresi ve bolge filtresiyle kapsamli veri toplayin.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Teknik Detaylar
|
|
186
|
+
|
|
187
|
+
- **Sifir bagimlilk**: Sadece Python standart kutuphanesi (`urllib`). Ek paket gerektirmez.
|
|
188
|
+
- **Python 3.8+** uyumlu
|
|
189
|
+
- **Thread-safe**: Her BigParse instance'i bagimsiz calismaktadir.
|
|
190
|
+
- **Timeout**: Varsayilan 30 saniye, ozellestirebilirsiniz: `BigParse("key", timeout=10)`
|
|
191
|
+
- **Base URL**: Ozel ortamlar icin degistirilebilir: `BigParse("key", base_url="https://...")`
|
|
192
|
+
|
|
193
|
+
## Destek ve Iletisim
|
|
194
|
+
|
|
195
|
+
- Dokumantasyon: [bigparse.com/hesap](https://bigparse.com/hesap)
|
|
196
|
+
- E-posta: [info@rturk.com.tr](mailto:info@rturk.com.tr)
|
|
197
|
+
- Web: [bigparse.com](https://bigparse.com)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
**BigParse** — Turkiye'nin bagimsiz arama motoru. [RTURK Teknoloji](https://rturk.com.tr) tarafindan gelistirilmektedir.
|
|
202
|
+
|
|
203
|
+
MIT License
|
bigparse-1.0.0/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# BigParse Python SDK
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/bigparse/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
**BigParse**, Turkiye'nin bagimsiz arama motoru API'si icin resmi Python istemcisidir. 11.000+ Turk haber kaynagini gercek zamanli indeksler, saniyeler icinde JSON formatinda arama sonuclari dondurur.
|
|
8
|
+
|
|
9
|
+
Sifir bagimlilk. Sadece Python standart kutuphanesi. 3 satirda entegre edin.
|
|
10
|
+
|
|
11
|
+
> **Kapsam Notu:** BigParse su anda **Turkiye kaynakli guncel haber ve icerik** uzerine odaklanmaktadir. Indeksimiz 11.000+ Turk haber sitesi, yerel gazeteler, bolgesel medya kuruluslari ve Turkce icerik ureten platformlari kapsar. Genel amacli bir web arama motoru degildir — uluslararasi kaynaklar, Ingilizce icerikler veya haber disi web sayfalari (e-ticaret, forum, wiki vb.) henuz indekste yer almamaktadir. En iyi sonuclari **Turkiye gundemi, yerel haberler, bolgesel icerikler ve Turkce haber aramalari** icin alirsiniz. Kapsam surekli genislemektedir.
|
|
12
|
+
|
|
13
|
+
## Kurulum
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install bigparse
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Hizli Baslangic
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from bigparse import BigParse
|
|
23
|
+
|
|
24
|
+
bp = BigParse("YOUR_API_KEY")
|
|
25
|
+
|
|
26
|
+
results = bp.search("yapay zeka")
|
|
27
|
+
print(f"{results.total} sonuc, {results.duration_ms}ms")
|
|
28
|
+
|
|
29
|
+
for r in results:
|
|
30
|
+
print(f"{r.title} — {r.domain}")
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## API Key Almak
|
|
36
|
+
|
|
37
|
+
BigParse API'yi kullanmak icin bir API anahtarina ihtiyaciniz var. Ucretsiz plan ile hemen baslayabilirsiniz.
|
|
38
|
+
|
|
39
|
+
### 1. Hesap Olusturun
|
|
40
|
+
[bigparse.com/kayit](https://bigparse.com/kayit) adresinden ucretsiz hesabinizi olusturun. E-posta ve sifreniz yeterli.
|
|
41
|
+
|
|
42
|
+
### 2. API Key Talep Edin
|
|
43
|
+
[bigparse.com/hesap](https://bigparse.com/hesap) panelinden **"Yeni API Key Talep Et"** butonuna tiklayarak key talebinizi olusturun. Projenizin adini ve kullanim amacinizi belirtin.
|
|
44
|
+
|
|
45
|
+
### 3. Onay Sonrasi Kullanima Baslayin
|
|
46
|
+
Talebiniz ekibimiz tarafindan incelenir ve onaylanir. Onay sonrasi API keyiniz aninda aktif olur ve hesap panelinizden kopyalayabilirsiniz.
|
|
47
|
+
|
|
48
|
+
### Planlar
|
|
49
|
+
|
|
50
|
+
| Plan | Gunluk Sorgu | Rate Limit | API Key | Aylik Ucret |
|
|
51
|
+
|------|-------------|------------|---------|-------------|
|
|
52
|
+
| **Ucretsiz** | 100 | 10/dk | 1 | Ucretsiz |
|
|
53
|
+
| **Baslangic** | 1.000 | 30/dk | 3 | 149 TL |
|
|
54
|
+
| **Profesyonel** | 10.000 | 60/dk | 10 | 499 TL |
|
|
55
|
+
| **Kurumsal** | 100.000 | 120/dk | 50 | 1.999 TL |
|
|
56
|
+
|
|
57
|
+
Kurumsal planlarda ozel limitler ve oncelikli destek icin [info@rturk.com.tr](mailto:info@rturk.com.tr) adresinden bize ulasin.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Arama
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
# Temel arama
|
|
65
|
+
results = bp.search("deprem")
|
|
66
|
+
|
|
67
|
+
# Zaman filtresi: son 24 saatin haberleri
|
|
68
|
+
results = bp.search("son dakika", tbs="24h") # 1h, 24h, 7d, 30d, 1y
|
|
69
|
+
|
|
70
|
+
# Bolge filtresi: sadece Istanbul kaynaklari
|
|
71
|
+
results = bp.search("trafik", region="istanbul")
|
|
72
|
+
|
|
73
|
+
# Kategori filtresi
|
|
74
|
+
results = bp.search("faiz", category="ekonomi")
|
|
75
|
+
|
|
76
|
+
# Sayfalama
|
|
77
|
+
results = bp.search("teknoloji", limit=20, page=2)
|
|
78
|
+
|
|
79
|
+
# Hepsini birden
|
|
80
|
+
results = bp.search("secim", tbs="7d", region="ankara", limit=50)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Tum Sayfalari Dolasma
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
# Otomatik sayfalama — tum sonuclari tek dongude alin
|
|
87
|
+
for r in bp.search_all("yapay zeka", max_pages=5):
|
|
88
|
+
print(r.title, r.url)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Otomatik Tamamlama
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
suggestions = bp.suggest("anka")
|
|
95
|
+
for s in suggestions.suggestions:
|
|
96
|
+
print(s) # ankara, ankaragucu, ankarada bugun...
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Hata Yonetimi
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from bigparse import BigParse, AuthError, RateLimitError, BigParseError
|
|
103
|
+
|
|
104
|
+
bp = BigParse("YOUR_API_KEY")
|
|
105
|
+
|
|
106
|
+
try:
|
|
107
|
+
results = bp.search("test")
|
|
108
|
+
except AuthError:
|
|
109
|
+
print("API key gecersiz veya aktif degil.")
|
|
110
|
+
except RateLimitError as e:
|
|
111
|
+
print(f"Cok fazla istek. {e.retry_after} saniye sonra tekrar deneyin.")
|
|
112
|
+
except BigParseError as e:
|
|
113
|
+
print(f"API hatasi [{e.status_code}]: {e}")
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Yanit Modeli
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
results = bp.search("istanbul haber")
|
|
120
|
+
|
|
121
|
+
# SearchResponse
|
|
122
|
+
results.total # Toplam sonuc sayisi
|
|
123
|
+
results.duration_ms # Sorgu suresi (milisaniye)
|
|
124
|
+
results.detected_city # Otomatik tespit edilen sehir
|
|
125
|
+
results.detected_region # Tespit edilen bolge
|
|
126
|
+
results.query_type # Sorgu tipi (general, news, local)
|
|
127
|
+
len(results) # Bu sayfadaki sonuc sayisi
|
|
128
|
+
|
|
129
|
+
# SearchResult
|
|
130
|
+
r = results[0]
|
|
131
|
+
r.title # Baslik
|
|
132
|
+
r.url # Kaynak URL
|
|
133
|
+
r.domain # Domain adi
|
|
134
|
+
r.snippet # Icerik ozeti
|
|
135
|
+
r.image # Gorsel URL (varsa)
|
|
136
|
+
r.author # Yazar (varsa)
|
|
137
|
+
r.published_at # Yayin tarihi (ISO 8601)
|
|
138
|
+
r.quality_score # Kalite puani (0-1)
|
|
139
|
+
r.quality_tier # Kalite seviyesi (A/B/C/D)
|
|
140
|
+
r.keywords # Anahtar kelimeler
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Kullanim Senaryolari
|
|
144
|
+
|
|
145
|
+
**Haber Uygulamasi** — Turkiye genelindeki haber kaynaklarini tek API ile arayin, zaman ve bolge filtresiyle daraltarak son dakika iceriklerini sunun.
|
|
146
|
+
|
|
147
|
+
**Icerik Analizi** — 11.000+ kaynaktan veri cekin. Belirli konulardaki haber yogunlugunu, kaynak cesitliligini ve trend degisimlerini analiz edin.
|
|
148
|
+
|
|
149
|
+
**Medya Izleme** — Marka, kisi veya konu bazli arama yaparak Turk medyasindaki gorunurlugu takip edin. Otomatik sayfalama ile tum sonuclari toplayin.
|
|
150
|
+
|
|
151
|
+
**Chatbot Entegrasyonu** — Yapay zeka asistanlariniza gercek zamanli Turkiye gundemini kazandirin. Kullanici sorularina BigParse verileriyle desteklenmis yanitlar verin.
|
|
152
|
+
|
|
153
|
+
**Akademik Arastirma** — Turk medyasindaki belirli konularin zaman icindeki yansimalarini arastirin. Tarih filtresi ve bolge filtresiyle kapsamli veri toplayin.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Teknik Detaylar
|
|
158
|
+
|
|
159
|
+
- **Sifir bagimlilk**: Sadece Python standart kutuphanesi (`urllib`). Ek paket gerektirmez.
|
|
160
|
+
- **Python 3.8+** uyumlu
|
|
161
|
+
- **Thread-safe**: Her BigParse instance'i bagimsiz calismaktadir.
|
|
162
|
+
- **Timeout**: Varsayilan 30 saniye, ozellestirebilirsiniz: `BigParse("key", timeout=10)`
|
|
163
|
+
- **Base URL**: Ozel ortamlar icin degistirilebilir: `BigParse("key", base_url="https://...")`
|
|
164
|
+
|
|
165
|
+
## Destek ve Iletisim
|
|
166
|
+
|
|
167
|
+
- Dokumantasyon: [bigparse.com/hesap](https://bigparse.com/hesap)
|
|
168
|
+
- E-posta: [info@rturk.com.tr](mailto:info@rturk.com.tr)
|
|
169
|
+
- Web: [bigparse.com](https://bigparse.com)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
**BigParse** — Turkiye'nin bagimsiz arama motoru. [RTURK Teknoloji](https://rturk.com.tr) tarafindan gelistirilmektedir.
|
|
174
|
+
|
|
175
|
+
MIT License
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BigParse Python SDK
|
|
3
|
+
Turkiye'nin bagimsiz arama motoru API'si icin resmi Python istemcisi.
|
|
4
|
+
|
|
5
|
+
Kullanim:
|
|
6
|
+
from bigparse import BigParse
|
|
7
|
+
|
|
8
|
+
bp = BigParse("YOUR_API_KEY")
|
|
9
|
+
results = bp.search("yapay zeka")
|
|
10
|
+
for r in results:
|
|
11
|
+
print(r.title, r.url)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from .client import BigParse, BigParseError, RateLimitError, AuthError
|
|
15
|
+
from .models import SearchResult, SearchResponse, SuggestResponse
|
|
16
|
+
|
|
17
|
+
__version__ = "1.0.0"
|
|
18
|
+
__author__ = "RTURK Teknoloji"
|
|
19
|
+
__all__ = ["BigParse", "BigParseError", "RateLimitError", "AuthError", "SearchResult", "SearchResponse", "SuggestResponse"]
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"""BigParse API istemcisi."""
|
|
2
|
+
|
|
3
|
+
import urllib.request
|
|
4
|
+
import urllib.parse
|
|
5
|
+
import urllib.error
|
|
6
|
+
import json
|
|
7
|
+
from typing import Optional, Dict, Any
|
|
8
|
+
|
|
9
|
+
from .models import SearchResponse, SuggestResponse
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BigParseError(Exception):
|
|
13
|
+
"""BigParse API hatasi."""
|
|
14
|
+
def __init__(self, message: str, status_code: int = 0, response: Optional[dict] = None):
|
|
15
|
+
super().__init__(message)
|
|
16
|
+
self.status_code = status_code
|
|
17
|
+
self.response = response
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AuthError(BigParseError):
|
|
21
|
+
"""Gecersiz API key veya yetkisiz erisim."""
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class RateLimitError(BigParseError):
|
|
26
|
+
"""Rate limit asildi."""
|
|
27
|
+
def __init__(self, message: str = "Rate limit asildi", retry_after: Optional[int] = None, **kwargs):
|
|
28
|
+
super().__init__(message, **kwargs)
|
|
29
|
+
self.retry_after = retry_after
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class BigParse:
|
|
33
|
+
"""
|
|
34
|
+
BigParse API istemcisi.
|
|
35
|
+
|
|
36
|
+
Kullanim:
|
|
37
|
+
bp = BigParse("YOUR_API_KEY")
|
|
38
|
+
results = bp.search("yapay zeka")
|
|
39
|
+
for r in results:
|
|
40
|
+
print(r.title, r.url)
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
api_key: BigParse API anahtari.
|
|
44
|
+
base_url: API base URL (varsayilan: https://bigparse.com).
|
|
45
|
+
timeout: Istek timeout suresi saniye (varsayilan: 30).
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
DEFAULT_BASE_URL = "https://bigparse.com"
|
|
49
|
+
|
|
50
|
+
def __init__(self, api_key: str, base_url: Optional[str] = None, timeout: int = 30):
|
|
51
|
+
if not api_key:
|
|
52
|
+
raise AuthError("API key zorunlu")
|
|
53
|
+
self.api_key = api_key
|
|
54
|
+
self.base_url = (base_url or self.DEFAULT_BASE_URL).rstrip("/")
|
|
55
|
+
self.timeout = timeout
|
|
56
|
+
|
|
57
|
+
def _request(self, endpoint: str, params: Optional[Dict[str, Any]] = None) -> dict:
|
|
58
|
+
"""API istegi gonder."""
|
|
59
|
+
url = f"{self.base_url}{endpoint}"
|
|
60
|
+
if params:
|
|
61
|
+
filtered = {k: v for k, v in params.items() if v is not None}
|
|
62
|
+
if filtered:
|
|
63
|
+
url += "?" + urllib.parse.urlencode(filtered)
|
|
64
|
+
|
|
65
|
+
req = urllib.request.Request(url, headers={
|
|
66
|
+
"X-API-Key": self.api_key,
|
|
67
|
+
"Accept": "application/json",
|
|
68
|
+
"User-Agent": f"bigparse-python/1.0.0",
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
with urllib.request.urlopen(req, timeout=self.timeout) as resp:
|
|
73
|
+
data = json.loads(resp.read().decode("utf-8"))
|
|
74
|
+
return data
|
|
75
|
+
except urllib.error.HTTPError as e:
|
|
76
|
+
body = {}
|
|
77
|
+
try:
|
|
78
|
+
body = json.loads(e.read().decode("utf-8"))
|
|
79
|
+
except Exception:
|
|
80
|
+
pass
|
|
81
|
+
msg = body.get("error", str(e))
|
|
82
|
+
|
|
83
|
+
if e.code == 401:
|
|
84
|
+
raise AuthError(msg, status_code=401, response=body)
|
|
85
|
+
elif e.code == 429:
|
|
86
|
+
retry = e.headers.get("Retry-After")
|
|
87
|
+
raise RateLimitError(msg, status_code=429, response=body, retry_after=int(retry) if retry else None)
|
|
88
|
+
else:
|
|
89
|
+
raise BigParseError(msg, status_code=e.code, response=body)
|
|
90
|
+
except urllib.error.URLError as e:
|
|
91
|
+
raise BigParseError(f"Baglanti hatasi: {e.reason}")
|
|
92
|
+
|
|
93
|
+
def search(
|
|
94
|
+
self,
|
|
95
|
+
query: str,
|
|
96
|
+
limit: int = 10,
|
|
97
|
+
page: int = 1,
|
|
98
|
+
tbs: Optional[str] = None,
|
|
99
|
+
category: Optional[str] = None,
|
|
100
|
+
region: Optional[str] = None,
|
|
101
|
+
language: Optional[str] = None,
|
|
102
|
+
) -> SearchResponse:
|
|
103
|
+
"""
|
|
104
|
+
Arama yap.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
query: Arama sorgusu.
|
|
108
|
+
limit: Sonuc sayisi (1-50, varsayilan: 10).
|
|
109
|
+
page: Sayfa numarasi (varsayilan: 1).
|
|
110
|
+
tbs: Zaman filtresi (1h, 24h, 7d, 30d, 1y).
|
|
111
|
+
category: Kategori filtresi.
|
|
112
|
+
region: Bolge filtresi (ornek: istanbul, ankara).
|
|
113
|
+
language: Dil filtresi (ornek: tr).
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
SearchResponse: Arama sonuclari. Iterable — dogrudan for dongusu ile kullanilabilir.
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
AuthError: Gecersiz API key.
|
|
120
|
+
RateLimitError: Rate limit asildi.
|
|
121
|
+
BigParseError: Diger API hatalari.
|
|
122
|
+
|
|
123
|
+
Ornek:
|
|
124
|
+
>>> results = bp.search("deprem", tbs="24h", limit=5)
|
|
125
|
+
>>> print(f"Toplam: {results.total}")
|
|
126
|
+
>>> for r in results:
|
|
127
|
+
... print(r.title)
|
|
128
|
+
"""
|
|
129
|
+
data = self._request("/api/v1/search", {
|
|
130
|
+
"q": query,
|
|
131
|
+
"limit": limit,
|
|
132
|
+
"page": page,
|
|
133
|
+
"tbs": tbs,
|
|
134
|
+
"category": category,
|
|
135
|
+
"region": region,
|
|
136
|
+
"language": language,
|
|
137
|
+
})
|
|
138
|
+
return SearchResponse.from_dict(data)
|
|
139
|
+
|
|
140
|
+
def suggest(self, query: str) -> SuggestResponse:
|
|
141
|
+
"""
|
|
142
|
+
Otomatik tamamlama onerileri al.
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
query: Arama metni (min 2 karakter).
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
SuggestResponse: Oneri listesi.
|
|
149
|
+
|
|
150
|
+
Ornek:
|
|
151
|
+
>>> suggestions = bp.suggest("anka")
|
|
152
|
+
>>> for s in suggestions.suggestions:
|
|
153
|
+
... print(s)
|
|
154
|
+
"""
|
|
155
|
+
data = self._request("/api/v1/suggest", {"q": query})
|
|
156
|
+
return SuggestResponse.from_dict(data)
|
|
157
|
+
|
|
158
|
+
def search_all(
|
|
159
|
+
self,
|
|
160
|
+
query: str,
|
|
161
|
+
max_pages: int = 10,
|
|
162
|
+
limit: int = 10,
|
|
163
|
+
**kwargs,
|
|
164
|
+
):
|
|
165
|
+
"""
|
|
166
|
+
Tum sayfalari otomatik dolasarak sonuclari topla.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
query: Arama sorgusu.
|
|
170
|
+
max_pages: Maksimum sayfa sayisi (varsayilan: 10).
|
|
171
|
+
limit: Sayfa basina sonuc (varsayilan: 10).
|
|
172
|
+
**kwargs: search() icin ek parametreler.
|
|
173
|
+
|
|
174
|
+
Yields:
|
|
175
|
+
SearchResult: Her bir arama sonucu.
|
|
176
|
+
|
|
177
|
+
Ornek:
|
|
178
|
+
>>> for r in bp.search_all("yapay zeka", max_pages=3):
|
|
179
|
+
... print(r.title, r.url)
|
|
180
|
+
"""
|
|
181
|
+
for page_num in range(1, max_pages + 1):
|
|
182
|
+
resp = self.search(query, limit=limit, page=page_num, **kwargs)
|
|
183
|
+
if not resp.results:
|
|
184
|
+
break
|
|
185
|
+
for r in resp.results:
|
|
186
|
+
yield r
|
|
187
|
+
if page_num * limit >= resp.total:
|
|
188
|
+
break
|
|
189
|
+
|
|
190
|
+
def __repr__(self):
|
|
191
|
+
masked = self.api_key[:8] + "..." if len(self.api_key) > 8 else "***"
|
|
192
|
+
return f"BigParse(api_key='{masked}', base_url='{self.base_url}')"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""BigParse veri modelleri."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Optional, List
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@dataclass
|
|
8
|
+
class SearchResult:
|
|
9
|
+
"""Tek bir arama sonucu."""
|
|
10
|
+
id: int = 0
|
|
11
|
+
title: str = ""
|
|
12
|
+
url: str = ""
|
|
13
|
+
domain: str = ""
|
|
14
|
+
snippet: str = ""
|
|
15
|
+
image: Optional[str] = None
|
|
16
|
+
author: Optional[str] = None
|
|
17
|
+
published_at: Optional[str] = None
|
|
18
|
+
language: Optional[str] = None
|
|
19
|
+
content_type: Optional[str] = None
|
|
20
|
+
quality_score: Optional[float] = None
|
|
21
|
+
quality_tier: Optional[str] = None
|
|
22
|
+
keywords: Optional[List[str]] = None
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def from_dict(cls, data: dict) -> "SearchResult":
|
|
26
|
+
return cls(**{k: v for k, v in data.items() if k in cls.__dataclass_fields__})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class SearchResponse:
|
|
31
|
+
"""Arama yaniti."""
|
|
32
|
+
results: List[SearchResult] = field(default_factory=list)
|
|
33
|
+
total: int = 0
|
|
34
|
+
page: int = 1
|
|
35
|
+
limit: int = 10
|
|
36
|
+
query: str = ""
|
|
37
|
+
query_type: Optional[str] = None
|
|
38
|
+
corrected_query: Optional[str] = None
|
|
39
|
+
detected_city: Optional[str] = None
|
|
40
|
+
detected_region: Optional[str] = None
|
|
41
|
+
detected_date: Optional[str] = None
|
|
42
|
+
duration_ms: int = 0
|
|
43
|
+
cached: bool = False
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls, data: dict) -> "SearchResponse":
|
|
47
|
+
results = [SearchResult.from_dict(r) for r in data.get("results", [])]
|
|
48
|
+
return cls(
|
|
49
|
+
results=results,
|
|
50
|
+
total=data.get("total", 0),
|
|
51
|
+
page=data.get("page", 1),
|
|
52
|
+
limit=data.get("limit", 10),
|
|
53
|
+
query=data.get("query", ""),
|
|
54
|
+
query_type=data.get("queryType"),
|
|
55
|
+
corrected_query=data.get("correctedQuery"),
|
|
56
|
+
detected_city=data.get("detectedCity"),
|
|
57
|
+
detected_region=data.get("detectedRegion"),
|
|
58
|
+
detected_date=data.get("detectedDate"),
|
|
59
|
+
duration_ms=data.get("duration_ms", 0),
|
|
60
|
+
cached=data.get("cached", False),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def __iter__(self):
|
|
64
|
+
return iter(self.results)
|
|
65
|
+
|
|
66
|
+
def __len__(self):
|
|
67
|
+
return len(self.results)
|
|
68
|
+
|
|
69
|
+
def __getitem__(self, index):
|
|
70
|
+
return self.results[index]
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@dataclass
|
|
74
|
+
class SuggestResponse:
|
|
75
|
+
"""Otomatik tamamlama yaniti."""
|
|
76
|
+
suggestions: List[str] = field(default_factory=list)
|
|
77
|
+
query: str = ""
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, data: dict) -> "SuggestResponse":
|
|
81
|
+
return cls(
|
|
82
|
+
suggestions=data.get("suggestions", []),
|
|
83
|
+
query=data.get("query", ""),
|
|
84
|
+
)
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bigparse
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: BigParse Arama Motoru API - Resmi Python SDK
|
|
5
|
+
Author-email: RTURK Teknoloji <info@rturk.com.tr>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://bigparse.com
|
|
8
|
+
Project-URL: Documentation, https://bigparse.com/hesap
|
|
9
|
+
Project-URL: Repository, https://github.com/rturk/bigparse-python
|
|
10
|
+
Project-URL: Issues, https://github.com/rturk/bigparse-python/issues
|
|
11
|
+
Keywords: bigparse,arama,search,api,turkiye,haber
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# BigParse Python SDK
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/bigparse/)
|
|
32
|
+
[](https://www.python.org/downloads/)
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
|
|
35
|
+
**BigParse**, Turkiye'nin bagimsiz arama motoru API'si icin resmi Python istemcisidir. 11.000+ Turk haber kaynagini gercek zamanli indeksler, saniyeler icinde JSON formatinda arama sonuclari dondurur.
|
|
36
|
+
|
|
37
|
+
Sifir bagimlilk. Sadece Python standart kutuphanesi. 3 satirda entegre edin.
|
|
38
|
+
|
|
39
|
+
> **Kapsam Notu:** BigParse su anda **Turkiye kaynakli guncel haber ve icerik** uzerine odaklanmaktadir. Indeksimiz 11.000+ Turk haber sitesi, yerel gazeteler, bolgesel medya kuruluslari ve Turkce icerik ureten platformlari kapsar. Genel amacli bir web arama motoru degildir — uluslararasi kaynaklar, Ingilizce icerikler veya haber disi web sayfalari (e-ticaret, forum, wiki vb.) henuz indekste yer almamaktadir. En iyi sonuclari **Turkiye gundemi, yerel haberler, bolgesel icerikler ve Turkce haber aramalari** icin alirsiniz. Kapsam surekli genislemektedir.
|
|
40
|
+
|
|
41
|
+
## Kurulum
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install bigparse
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Hizli Baslangic
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from bigparse import BigParse
|
|
51
|
+
|
|
52
|
+
bp = BigParse("YOUR_API_KEY")
|
|
53
|
+
|
|
54
|
+
results = bp.search("yapay zeka")
|
|
55
|
+
print(f"{results.total} sonuc, {results.duration_ms}ms")
|
|
56
|
+
|
|
57
|
+
for r in results:
|
|
58
|
+
print(f"{r.title} — {r.domain}")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## API Key Almak
|
|
64
|
+
|
|
65
|
+
BigParse API'yi kullanmak icin bir API anahtarina ihtiyaciniz var. Ucretsiz plan ile hemen baslayabilirsiniz.
|
|
66
|
+
|
|
67
|
+
### 1. Hesap Olusturun
|
|
68
|
+
[bigparse.com/kayit](https://bigparse.com/kayit) adresinden ucretsiz hesabinizi olusturun. E-posta ve sifreniz yeterli.
|
|
69
|
+
|
|
70
|
+
### 2. API Key Talep Edin
|
|
71
|
+
[bigparse.com/hesap](https://bigparse.com/hesap) panelinden **"Yeni API Key Talep Et"** butonuna tiklayarak key talebinizi olusturun. Projenizin adini ve kullanim amacinizi belirtin.
|
|
72
|
+
|
|
73
|
+
### 3. Onay Sonrasi Kullanima Baslayin
|
|
74
|
+
Talebiniz ekibimiz tarafindan incelenir ve onaylanir. Onay sonrasi API keyiniz aninda aktif olur ve hesap panelinizden kopyalayabilirsiniz.
|
|
75
|
+
|
|
76
|
+
### Planlar
|
|
77
|
+
|
|
78
|
+
| Plan | Gunluk Sorgu | Rate Limit | API Key | Aylik Ucret |
|
|
79
|
+
|------|-------------|------------|---------|-------------|
|
|
80
|
+
| **Ucretsiz** | 100 | 10/dk | 1 | Ucretsiz |
|
|
81
|
+
| **Baslangic** | 1.000 | 30/dk | 3 | 149 TL |
|
|
82
|
+
| **Profesyonel** | 10.000 | 60/dk | 10 | 499 TL |
|
|
83
|
+
| **Kurumsal** | 100.000 | 120/dk | 50 | 1.999 TL |
|
|
84
|
+
|
|
85
|
+
Kurumsal planlarda ozel limitler ve oncelikli destek icin [info@rturk.com.tr](mailto:info@rturk.com.tr) adresinden bize ulasin.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Arama
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
# Temel arama
|
|
93
|
+
results = bp.search("deprem")
|
|
94
|
+
|
|
95
|
+
# Zaman filtresi: son 24 saatin haberleri
|
|
96
|
+
results = bp.search("son dakika", tbs="24h") # 1h, 24h, 7d, 30d, 1y
|
|
97
|
+
|
|
98
|
+
# Bolge filtresi: sadece Istanbul kaynaklari
|
|
99
|
+
results = bp.search("trafik", region="istanbul")
|
|
100
|
+
|
|
101
|
+
# Kategori filtresi
|
|
102
|
+
results = bp.search("faiz", category="ekonomi")
|
|
103
|
+
|
|
104
|
+
# Sayfalama
|
|
105
|
+
results = bp.search("teknoloji", limit=20, page=2)
|
|
106
|
+
|
|
107
|
+
# Hepsini birden
|
|
108
|
+
results = bp.search("secim", tbs="7d", region="ankara", limit=50)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Tum Sayfalari Dolasma
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Otomatik sayfalama — tum sonuclari tek dongude alin
|
|
115
|
+
for r in bp.search_all("yapay zeka", max_pages=5):
|
|
116
|
+
print(r.title, r.url)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Otomatik Tamamlama
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
suggestions = bp.suggest("anka")
|
|
123
|
+
for s in suggestions.suggestions:
|
|
124
|
+
print(s) # ankara, ankaragucu, ankarada bugun...
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Hata Yonetimi
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from bigparse import BigParse, AuthError, RateLimitError, BigParseError
|
|
131
|
+
|
|
132
|
+
bp = BigParse("YOUR_API_KEY")
|
|
133
|
+
|
|
134
|
+
try:
|
|
135
|
+
results = bp.search("test")
|
|
136
|
+
except AuthError:
|
|
137
|
+
print("API key gecersiz veya aktif degil.")
|
|
138
|
+
except RateLimitError as e:
|
|
139
|
+
print(f"Cok fazla istek. {e.retry_after} saniye sonra tekrar deneyin.")
|
|
140
|
+
except BigParseError as e:
|
|
141
|
+
print(f"API hatasi [{e.status_code}]: {e}")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Yanit Modeli
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
results = bp.search("istanbul haber")
|
|
148
|
+
|
|
149
|
+
# SearchResponse
|
|
150
|
+
results.total # Toplam sonuc sayisi
|
|
151
|
+
results.duration_ms # Sorgu suresi (milisaniye)
|
|
152
|
+
results.detected_city # Otomatik tespit edilen sehir
|
|
153
|
+
results.detected_region # Tespit edilen bolge
|
|
154
|
+
results.query_type # Sorgu tipi (general, news, local)
|
|
155
|
+
len(results) # Bu sayfadaki sonuc sayisi
|
|
156
|
+
|
|
157
|
+
# SearchResult
|
|
158
|
+
r = results[0]
|
|
159
|
+
r.title # Baslik
|
|
160
|
+
r.url # Kaynak URL
|
|
161
|
+
r.domain # Domain adi
|
|
162
|
+
r.snippet # Icerik ozeti
|
|
163
|
+
r.image # Gorsel URL (varsa)
|
|
164
|
+
r.author # Yazar (varsa)
|
|
165
|
+
r.published_at # Yayin tarihi (ISO 8601)
|
|
166
|
+
r.quality_score # Kalite puani (0-1)
|
|
167
|
+
r.quality_tier # Kalite seviyesi (A/B/C/D)
|
|
168
|
+
r.keywords # Anahtar kelimeler
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Kullanim Senaryolari
|
|
172
|
+
|
|
173
|
+
**Haber Uygulamasi** — Turkiye genelindeki haber kaynaklarini tek API ile arayin, zaman ve bolge filtresiyle daraltarak son dakika iceriklerini sunun.
|
|
174
|
+
|
|
175
|
+
**Icerik Analizi** — 11.000+ kaynaktan veri cekin. Belirli konulardaki haber yogunlugunu, kaynak cesitliligini ve trend degisimlerini analiz edin.
|
|
176
|
+
|
|
177
|
+
**Medya Izleme** — Marka, kisi veya konu bazli arama yaparak Turk medyasindaki gorunurlugu takip edin. Otomatik sayfalama ile tum sonuclari toplayin.
|
|
178
|
+
|
|
179
|
+
**Chatbot Entegrasyonu** — Yapay zeka asistanlariniza gercek zamanli Turkiye gundemini kazandirin. Kullanici sorularina BigParse verileriyle desteklenmis yanitlar verin.
|
|
180
|
+
|
|
181
|
+
**Akademik Arastirma** — Turk medyasindaki belirli konularin zaman icindeki yansimalarini arastirin. Tarih filtresi ve bolge filtresiyle kapsamli veri toplayin.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Teknik Detaylar
|
|
186
|
+
|
|
187
|
+
- **Sifir bagimlilk**: Sadece Python standart kutuphanesi (`urllib`). Ek paket gerektirmez.
|
|
188
|
+
- **Python 3.8+** uyumlu
|
|
189
|
+
- **Thread-safe**: Her BigParse instance'i bagimsiz calismaktadir.
|
|
190
|
+
- **Timeout**: Varsayilan 30 saniye, ozellestirebilirsiniz: `BigParse("key", timeout=10)`
|
|
191
|
+
- **Base URL**: Ozel ortamlar icin degistirilebilir: `BigParse("key", base_url="https://...")`
|
|
192
|
+
|
|
193
|
+
## Destek ve Iletisim
|
|
194
|
+
|
|
195
|
+
- Dokumantasyon: [bigparse.com/hesap](https://bigparse.com/hesap)
|
|
196
|
+
- E-posta: [info@rturk.com.tr](mailto:info@rturk.com.tr)
|
|
197
|
+
- Web: [bigparse.com](https://bigparse.com)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
**BigParse** — Turkiye'nin bagimsiz arama motoru. [RTURK Teknoloji](https://rturk.com.tr) tarafindan gelistirilmektedir.
|
|
202
|
+
|
|
203
|
+
MIT License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bigparse
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "bigparse"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "BigParse Arama Motoru API - Resmi Python SDK"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "RTURK Teknoloji", email = "info@rturk.com.tr"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["bigparse", "arama", "search", "api", "turkiye", "haber"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://bigparse.com"
|
|
33
|
+
Documentation = "https://bigparse.com/hesap"
|
|
34
|
+
Repository = "https://github.com/rturk/bigparse-python"
|
|
35
|
+
Issues = "https://github.com/rturk/bigparse-python/issues"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
include = ["bigparse*"]
|
bigparse-1.0.0/setup.cfg
ADDED