Created
January 27, 2026 22:25
-
-
Save raelsei/537fed5b2e2ad2ae06d48a01b8fd2e9c to your computer and use it in GitHub Desktop.
cryptologos.cc downloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CRYPTO LOGOS SVG İNDİRİCİ - ULTRA KAPSAMLI (HATA DÜZELTİLMİŞ) | |
| * | |
| * KULLANIM: | |
| * 1. https://cryptologos.cc/ sitesini açın | |
| * 2. F12 ile console açın | |
| * 3. Bu scripti yapıştırın | |
| * | |
| * ÖZELLİKLER: | |
| * - Sitedeki TÜM coinleri bulur (binlerce) | |
| * - Sadece symbol ismiyle kaydeder (BTC.svg, ETH.svg) | |
| * - Progress bar | |
| * - Hata yönetimi | |
| */ | |
| class CryptoDownloader { | |
| constructor() { | |
| this.baseUrl = 'https://cryptologos.cc/logos'; | |
| this.allCoins = new Map(); | |
| this.successCount = 0; | |
| this.failedCount = 0; | |
| this.totalCoins = 0; | |
| this.stopped = false; | |
| this.failedCoins = []; | |
| } | |
| log(message, type = 'info') { | |
| const styles = { | |
| info: 'color: #3498db; font-size: 12px', | |
| success: 'color: #27ae60; font-size: 12px', | |
| error: 'color: #e74c3c; font-size: 12px', | |
| warning: 'color: #f39c12; font-size: 12px', | |
| header: 'color: #9b59b6; font-weight: bold; font-size: 16px', | |
| title: 'color: #2c3e50; font-weight: bold; font-size: 14px' | |
| }; | |
| console.log(`%c${message}`, styles[type] || styles.info); | |
| } | |
| async getAllCoins() { | |
| this.log('═'.repeat(70), 'header'); | |
| this.log('🔍 TÜM COİNLERİ TOPLUYORUM...', 'title'); | |
| this.log('═'.repeat(70), 'header'); | |
| console.log(''); | |
| // 1. window.cc_coins | |
| if (window.cc_coins && typeof window.cc_coins === 'object') { | |
| Object.entries(window.cc_coins).forEach(([id, data]) => { | |
| if (data && data.symbol) { | |
| const symbol = data.symbol.toUpperCase(); | |
| if (!this.allCoins.has(symbol)) { | |
| this.allCoins.set(symbol, { | |
| id: id, | |
| name: data.name || symbol, | |
| symbol: symbol | |
| }); | |
| } | |
| } | |
| }); | |
| this.log(`✅ cc_coins: ${Object.keys(window.cc_coins).length} coin bulundu`, 'success'); | |
| } | |
| // 2. window.cc_coins_home | |
| if (window.cc_coins_home && typeof window.cc_coins_home === 'object') { | |
| let addedCount = 0; | |
| Object.entries(window.cc_coins_home).forEach(([id, data]) => { | |
| if (data && data.symbol) { | |
| const symbol = data.symbol.toUpperCase(); | |
| if (!this.allCoins.has(symbol)) { | |
| this.allCoins.set(symbol, { | |
| id: id, | |
| name: data.name || symbol, | |
| symbol: symbol | |
| }); | |
| addedCount++; | |
| } | |
| } | |
| }); | |
| if (addedCount > 0) { | |
| this.log(`✅ cc_coins_home: ${addedCount} ekstra coin eklendi`, 'success'); | |
| } | |
| } | |
| this.totalCoins = this.allCoins.size; | |
| console.log(''); | |
| this.log('═'.repeat(70), 'header'); | |
| this.log(`🎯 TOPLAM ${this.totalCoins} FARKLI COİN BULUNDU!`, 'title'); | |
| this.log('═'.repeat(70), 'header'); | |
| console.log(''); | |
| if (this.totalCoins === 0) { | |
| this.log('❌ HATA: Coin verileri bulunamadı!', 'error'); | |
| this.log('💡 Ana sayfada olduğunuzdan emin olun: https://cryptologos.cc/', 'warning'); | |
| return []; | |
| } | |
| return Array.from(this.allCoins.values()); | |
| } | |
| async downloadSVG(coin) { | |
| // Farklı URL formatlarını dene | |
| const urlFormats = [ | |
| `${this.baseUrl}/${coin.id}-${coin.symbol.toLowerCase()}-logo.svg`, | |
| ]; | |
| for (const svgUrl of urlFormats) { | |
| try { | |
| const response = await fetch(svgUrl, { | |
| method: 'GET', | |
| headers: { | |
| 'Accept': 'image/svg+xml,image/*,*/*' | |
| } | |
| }); | |
| if (!response.ok) { | |
| continue; | |
| } | |
| const blob = await response.blob(); | |
| // SVG kontrolü | |
| if (blob.size < 100) { | |
| continue; | |
| } | |
| // İndir | |
| const url = window.URL.createObjectURL(blob); | |
| const a = document.createElement('a'); | |
| a.style.display = 'none'; | |
| a.href = url; | |
| a.download = `${coin.symbol}.svg`; | |
| document.body.appendChild(a); | |
| a.click(); | |
| setTimeout(() => { | |
| window.URL.revokeObjectURL(url); | |
| if (document.body.contains(a)) { | |
| document.body.removeChild(a); | |
| } | |
| }, 100); | |
| return { success: true, coin }; | |
| } catch (error) { | |
| continue; | |
| } | |
| } | |
| return { | |
| success: false, | |
| coin, | |
| error: 'SVG bulunamadı' | |
| }; | |
| } | |
| showProgress() { | |
| const processed = this.successCount + this.failedCount; | |
| const percentage = ((processed / this.totalCoins) * 100).toFixed(1); | |
| const barLength = 50; | |
| const filledLength = Math.floor(percentage / 2); | |
| const bar = '█'.repeat(filledLength) + '░'.repeat(barLength - filledLength); | |
| // Her 5 indirmede bir ekranı güncelle | |
| if (processed % 5 === 0 || processed === this.totalCoins) { | |
| console.clear(); | |
| this.log('═'.repeat(70), 'header'); | |
| this.log(' 🚀 CRYPTO LOGOS İNDİRİLİYOR', 'header'); | |
| this.log('═'.repeat(70), 'header'); | |
| console.log(''); | |
| console.log(`📊 İlerleme: [${bar}] ${percentage}%`); | |
| console.log(''); | |
| console.log(`📈 İşlenen: ${processed} / ${this.totalCoins}`); | |
| console.log(`✅ Başarılı: ${this.successCount}`); | |
| console.log(`❌ Başarısız: ${this.failedCount}`); | |
| if (this.lastDownloaded) { | |
| console.log(''); | |
| this.log(`⬇️ Son: ${this.lastDownloaded.symbol} - ${this.lastDownloaded.name}`, 'info'); | |
| } | |
| console.log(''); | |
| this.log('⏸️ Durdurmak için console\'a yazın: downloader.stop()', 'warning'); | |
| console.log(''); | |
| } | |
| } | |
| stop() { | |
| this.stopped = true; | |
| this.log('\n⏹️ İndirme durduruldu!', 'warning'); | |
| } | |
| async start() { | |
| const coins = await this.getAllCoins(); | |
| if (coins.length === 0) { | |
| return; | |
| } | |
| this.log('📥 İndirme başlıyor...', 'info'); | |
| this.log('💾 Dosya formatı: SYMBOL.svg (BTC.svg, ETH.svg...)', 'info'); | |
| this.log('⏱️ Lütfen bekleyin, bu birkaç dakika sürebilir...', 'warning'); | |
| console.log(''); | |
| // Global erişim | |
| window.downloader = this; | |
| await new Promise(resolve => setTimeout(resolve, 2000)); | |
| // İndirmeye başla | |
| for (const coin of coins) { | |
| if (this.stopped) { | |
| this.log('\n⏹️ İndirme kullanıcı tarafından durduruldu', 'warning'); | |
| break; | |
| } | |
| const result = await this.downloadSVG(coin); | |
| if (result.success) { | |
| this.successCount++; | |
| this.lastDownloaded = coin; | |
| } else { | |
| this.failedCount++; | |
| this.failedCoins.push(coin); | |
| } | |
| this.showProgress(); | |
| // Rate limiting | |
| await new Promise(resolve => setTimeout(resolve, 300)); | |
| } | |
| this.showSummary(); | |
| } | |
| showSummary() { | |
| console.clear(); | |
| this.log('\n' + '═'.repeat(70), 'header'); | |
| this.log(' ✨ İNDİRME TAMAMLANDI! ✨', 'header'); | |
| this.log('═'.repeat(70), 'header'); | |
| console.log(''); | |
| console.log('📊 SONUÇLAR:'); | |
| console.log(''); | |
| this.log(` ✅ Başarılı: ${this.successCount} dosya indirildi`, 'success'); | |
| this.log(` ❌ Başarısız: ${this.failedCount} dosya`, this.failedCount > 0 ? 'warning' : 'success'); | |
| this.log(` 📁 Toplam: ${this.totalCoins} coin tarandı`, 'info'); | |
| console.log(''); | |
| this.log('💾 Tüm dosyalar indirme klasörünüze kaydedildi!', 'success'); | |
| this.log('📝 Dosya formatı: SYMBOL.svg (BTC.svg, ETH.svg, ADA.svg...)', 'info'); | |
| console.log(''); | |
| if (this.failedCount > 0) { | |
| this.log(`⚠️ ${this.failedCount} coin için SVG bulunamadı`, 'warning'); | |
| this.log(' (Sitede olmayan coinler normal)', 'info'); | |
| this.log('💡 Listeyi görmek için: downloader.showFailed()', 'info'); | |
| } | |
| this.log('═'.repeat(70), 'header'); | |
| console.log(''); | |
| } | |
| showFailed() { | |
| if (this.failedCoins.length === 0) { | |
| this.log('✅ Tüm coinler başarıyla indirildi!', 'success'); | |
| return; | |
| } | |
| console.log('\n❌ Başarısız İndirmeler (ilk 50):\n'); | |
| this.failedCoins.slice(0, 50).forEach((coin, index) => { | |
| console.log(`${index + 1}. ${coin.symbol} - ${coin.name}`); | |
| }); | |
| if (this.failedCoins.length > 50) { | |
| console.log(`\n... ve ${this.failedCoins.length - 50} tane daha`); | |
| } | |
| } | |
| } | |
| // Başlat | |
| console.log('\n🚀 Crypto Logos İndirici Başlatılıyor...\n'); | |
| const downloader = new CryptoDownloader(); | |
| downloader.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment