BLOKSAR — Web Scraper Factory
JSON tarif ile web sitesi kazı. Kod yazmana gerek yok.
Kurulum
git clone https://github.com/lokkiDEV/BLOKSAR.git
cd BLOKSAR
python --version # Python 3.8+ gerekli
Ek bağımlılık yok. Standart Python kütüphanesi yeterli.
Not: Bu paket şu an
scraperadlı bir modülü de kurar. Ortamınızda aynı adda başka bir paket varsa çakışma yaşayabilirsiniz; bu durumda lütfen bildirin.0.2.0sürümünde her şey tekbloksarpaketi altına taşınacaktır.
Hızlı Başlangıç
# Kur (tek seferlik) — bloksar komutunu sisteme ekler
pip install -e .
# Hazır tarif ile çalıştır
bloksar run books_real.json
Alternatif (kurulumsuz, modül olarak):
# Hazır tarif ile çalıştır
cd tools
python -m scraper.engine books_real.json
# Sihirbaz ile yeni tarif oluştur (kod bilmeden)
python -m scraper.wizard https://example.com
# Standalone script üret (müşteriye teslim)
python -m scraper.factory books_real.json MusteriAdi
Özellikler
| Özellik | Açıklama |
|---|---|
| JSON tarif | Site yapısını JSON ile tanımla, çalıştır |
| Diff tespiti | İki run arasındaki değişiklikleri bul |
| Quality trend | Alan doluluk düşüşünü otomatik uyar |
| Standalone script | Müşteriye bağımsız .py dosyası teslim et |
| Wizard | Kod bilmeden tarif oluştur |
| Dedup | Aynı URL'yi iki kez çekme |
| Multi-record | Tek sayfadan N kayıt üret |
Tarif Formatı
{
"name": "urun_listesi",
"description": "Ürün listesi tarifi",
"start_urls": ["https://example.com/urunler"],
"pagination": {
"type": "url_template",
"template": "https://example.com/urunler?page={page}",
"start": 1,
"end": 5
},
"detail_urls": {
"type": "regex",
"pattern": "<a href=\"(/urun/[^\"]+)\"",
"base": "https://example.com"
},
"detail_selectors": {
"baslik": {
"type": "regex",
"pattern": "<h1[^>]*>(.*?)</h1>",
"single": true
},
"fiyat": {
"type": "regex",
"pattern": "<span class=\"price\">(.*?)</span>",
"single": true
}
},
"rate_limit": 1.0,
"max_items": 100,
"output": "urun_listesi.json"
}
Çıktı
Her run sonrası 3 dosya üretilir:
output/scrapes/urun_listesi.json ← veri
output/scrapes/urun_listesi.csv ← Excel için
output/diffs/urun_listesi_diff.json ← değişiklik raporu (2. run'dan itibaren)
Diff Örneği
========================================
DIFF SONUCU
========================================
added: 3
removed: 1
changed: 5
unchanged: 91
========================================
fiyat: '199 TL' → '249 TL'
Gerçek örnek: Hürriyet gündem — 30 kayıt, %100 alan doluluk.
Modüller
| Modül | Görev |
|---|---|
| cli.py | bloksar run / wizard / package komut arayüzü |
| engine.py | Tarif çalıştırıcı |
| diff.py | Değişiklik tespiti |
| net.py | HTTP (retry, rate limit) |
| parse.py | HTML ayrıştırma |
| store.py | JSON + CSV + SQLite |
| quality.py | Alan doluluk + trend uyarısı |
| dedup.py | Aynı URL/kaydı tekrar çekmeyi önle |
| wizard.py | Sihirbaz (no-code tarif) |
| factory.py | Standalone script üretici |
| validator.py | Üretilen scripti test et |
| packager.py | ZIP paketleme |
| analyzer.py | Site yapısı analizi |
Test
python test_diff.py
python test_engine_diff.py
python test_quality_trend.py
# Toplam: 120+ PASS
Hire Me
Kod yazdırma / özel web scraping hizmeti mi lazım? İş teklifleri için GitHub üzerinden iletişime geçebilirsiniz: https://github.com/lokkiDEV/BLOKSAR
- JSON tarif ile hızlı scraper kurulumu
- Müşteriye teslim edilebilir standalone script
- Diff + quality takibi ile sürekli izleme
Yasal Uyarı / Disclaimer
Türkçe: BLOKSAR yalnızca teknik erişim sağlayan bir araçtır. Hangi verinin, hangi siteden çekileceği tamamen kullanıcının sorumluluğundadır. Telif hakkı, veritabanı hakkı ve veri koruma mevzuatına (GDPR / KVKK) uyum kullanıcıya aittir. Aracın içerdiği robots.txt kontrolü teknik ve etik bir uyum katmanıdır; yasal bir kalkan değildir. Araç "olduğu gibi" (as-is), hiçbir garanti verilmeden sunulur. Soru ve bildirimler için GitHub Issues.
English: BLOKSAR is a tool that provides technical access only. What data is scraped, and from which site, is entirely the user's responsibility. Compliance with copyright, database rights, and data-protection law (GDPR / KVKK) rests with the user. The built-in robots.txt check is a technical and ethical compliance layer; it is not a legal shield. The tool is provided "as-is", without any warranty. For questions and reports, use GitHub Issues.
Lisans
MIT
Metadata
Release files for bloksar 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bloksar-0.1.2.tar.gz | 37.9 kB | With provenance | Details for bloksar-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bloksar-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for bloksar-0.1.2-py3-none-any.whl |
Total release size: 84.0 kB
Release files / bloksar-0.1.2.tar.gz
| Download URL | bloksar-0.1.2.tar.gz |
|---|---|
| Size | 37.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
892ec5250728a72f49d053cf67d2bab14ba4cea6fac42be606e7a421da5659fd
|
|
BLAKE2b-256 checksum How to use checksums |
a158b39dd834aa6d896e2bfcec43a323e2f4383d272812ccff143a3a3a58256a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / bloksar-0.1.2-py3-none-any.whl
| Download URL | bloksar-0.1.2-py3-none-any.whl |
|---|---|
| Size | 46.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
deb8e6a146a324acba2747ef7829850f6403deff2280ec02a16aadb4e8078f2d
|
|
BLAKE2b-256 checksum How to use checksums |
1cae4965f6c85b3a5aafb6294279a42b3ad92f407543341369ee4de12dc255b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logSecurity for bloksar 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bloksar-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.