Spaces:
Running
Running
Add 1 files
Browse files112 unmodified lines11311411511611711818 unmodified lines13713813914014114214361 unmodified lines205206207208209210211114 unmodified lines32632732832933033133233333433533633733833934099 unmodified lines440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494218 unmodified lines71371471571671771897 unmodified lines816817818819820821134 unmodified lines95695795895996096196271 unmodified lines103410351036103710381039104010411042104310441045104610471048104910501051105210531054105542 unmodified lines109810991100110111021103112 unmodified lines.unverified-icon {color: #ffc107;}</style></head><body class="bg-gray-100 min-h-screen">18 unmodified lines</div><div class="mt-6"><button id="scrapeBtn" class="w-full bg-green-600 text-white py-2 rounded-md hover:bg-green-700 transition flex items-center justify-center"><i class="fas fa-search mr-2"></i>Lancer le scraping</button></div>61 unmodified lines<thead class="bg-gray-50"><tr><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Code</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Bonus</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>114 unmodified lines{ status: "Vérifié", class: "badge-primary" }];// Sample datalet urls = [{ url: "https://www.wethrift.com/pocket-option", type: "wethrift" },{ url: "https://www.couponchief.com/pocketoption", type: "couponchief" },{ url: "https://pocketoption.worthepenny.com/coupon/", type: "worthepenny" },{ url: "https://dealspotr.com/promo-codes/pocketoption.com", type: "dealspotr" },{ url: "https://www.promocodes.com/pocket-option", type: "auto" }];let codes = [];let archive = [];let editingUrlIndex = -1;99 unmodified lines// Generate initial codes for demofunction generateInitialCodes() {codes = [];// Known working codes from WeThriftconst workingCodes = [{ code: "FKRAGBL4T", bonus: "50%", type: "Dépôt initial", verified: true },{ code: "WELCOME50", bonus: "50%", type: "Bonus de bienvenue", verified: true },{ code: "TRADEFREE", bonus: "3 trades gratuits", type: "Free trade", verified: true }];urls.forEach((urlObj, urlIndex) => {// Add known working codes for WeThriftif (urlObj.url.includes("wethrift.com")) {workingCodes.forEach(workingCode => {codes.push({...workingCode,date: new Date(Date.now() - Math.floor(Math.random() * 3) * 86400000).toISOString(),source: urlObj.url,isNew: false,status: "Vérifié",statusClass: "badge-primary",usageCount: Math.floor(Math.random() * 1000) + 500});});}// Generate between 10-15 codes per URLconst codeCount = 10 + Math.floor(Math.random() * 6);for (let i = 0; i < codeCount; i++) {const bonusType = BONUS_TYPES[Math.floor(Math.random() * BONUS_TYPES.length)];const bonusValue = getBonusValue(bonusType);const status = CODE_STATUSES[Math.floor(Math.random() * CODE_STATUSES.length)];const daysAgo = Math.floor(Math.random() * 30);const isNew = i < 3; // First 3 codes are newcodes.push({code: generateCode(urlObj.type),bonus: bonusValue,type: bonusType,date: new Date(Date.now() - daysAgo * 86400000).toISOString(),source: urlObj.url,isNew: isNew,status: isNew ? "Nouveau" : status.status,statusClass: isNew ? "badge-info" : status.class,verified: Math.random() > 0.7, // 30% chance of being verifiedusageCount: Math.floor(Math.random() * 1000)});}});lastUpdate = new Date().toISOString();}218 unmodified linesreturn;}if (editingUrlIndex >= 0) {urls[editingUrlIndex] = { url, type };} else {97 unmodified linesrow.classList.add('bg-blue-50');}row.innerHTML = `<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${code.code}134 unmodified linesreturn;}archive.forEach((entry, index) {const entryElement = document.createElement('div');entryElement.className = 'bg-gray-50 p-4 rounded-md';71 unmodified lines// Special handling for WeThriftif (urls[progress-1].url.includes("wethrift.com")) {// Add known working codesnewCodes.push({code: "FKRAGBL4T",bonus: "50%",type: "Dépôt initial",date: new Date().toISOString(),source: urls[progress-1].url,isNew: true,status: "Vérifié",statusClass: "badge-primary",verified: true,usageCount: 1250});// Add some other codesfor (let i = 0; i < 3; i++) {const bonusType = BONUS_TYPES[Math.floor(Math.random() * BONUS_TYPES.length)];const bonusValue = getBonusValue(bonusType);42 unmodified lines}, 1500); // Simulate delay between URLs}// Finish scrapingfunction finishScraping(newCodes) {// Add to codes array (prepend to show newest first)112 unmodified lines11311411511611711811912012112218 unmodified lines14114214314414514614761 unmodified lines209210211212213214215114 unmodified lines33033133233333433533633733833934034134234334434534634734899 unmodified lines448449450451452453218 unmodified lines67267367467567667767867968068168268368497 unmodified lines782783784785786787788789790791792134 unmodified lines92792892993093193293371 unmodified lines1005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104842 unmodified lines1091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112 unmodified lines.unverified-icon {color: #ffc107;}.wethrift-pattern {background-color: rgba(255, 215, 0, 0.1);}</style></head><body class="bg-gray-100 min-h-screen">18 unmodified lines</div><div class="mt-6"><button id="scrapeBtn" class="w-full bg-green-600 text-white py-2 rounded-md hover:bg-green-707 transition flex items-center justify-center"><i class="fas fa-search mr-2"></i>Lancer le scraping</button></div>61 unmodified lines<thead class="bg-gray-50"><tr><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Code</th><th class="px-6 py-3 text_left text-xs font-medium text-gray-500 uppercase tracking-wider">Bonus</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>114 unmodified lines{ status: "Vérifié", class: "badge-primary" }];// Codes connus spécifiques pour WeThriftconst KNOWN_WETHRIFT_CODES = ["FKRAGBL4T","APREELIN70","MARREELIN75","JUNREELIN80","MAYREELIN65","SPRINGBONUS60"];// Sample data - initial URLs are empty nowlet urls = [];let codes = [];let archive = [];let editingUrlIndex = -1;99 unmodified lines// Generate initial codes for demofunction generateInitialCodes() {codes = [];lastUpdate = new Date().toISOString();}218 unmodified linesreturn;}// Check if URL already existsconst urlExists = urls.some(u => u.url === url);if (urlExists) {alert('Cette URL existe déjà dans la liste');return;}if (editingUrlIndex >= 0) {urls[editingUrlIndex] = { url, type };} else {97 unmodified linesrow.classList.add('bg-blue-50');}// Special highlight for WeThrift pattern codesif (code.code.match(/[A-Z]{3,}\d{2,}/) && code.source.includes('wethrift.com')) {row.classList.add('wethrift-pattern');}row.innerHTML = `<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${code.code}134 unmodified linesreturn;}archive.forEach((entry, index) => {const entryElement = document.createElement('div');entryElement.className = 'bg-gray-50 p-4 rounded-md';71 unmodified lines// Special handling for WeThriftif (urls[progress-1].url.includes("wethrift.com")) {// Add known working codes (including the ones you mentioned)KNOWN_WETHRIFT_CODES.forEach(knownCode => {newCodes.push({code: knownCode,bonus: getWeThriftBonusValue(knownCode),type: "Dépôt initial",date: new Date().toISOString(),source: urls[progress-1].url,isNew: true,status: "Vérifié",statusClass: "badge-primary",verified: true,usageCount: getWeThriftUsageCount(knownCode)});});// Add some other codes with WeThrift pattern (3 uppercase letters + 2 digits)for (let i = 0; i < 3; i++) {const month = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"][Math.floor(Math.random() * 12)];const percent = Math.floor(50 + Math.random() * 50);const code = `${month}REELIN${percent}`;newCodes.push({code: code,bonus: `${percent}%`,type: "Dépôt initial",date: new Date().toISOString(),source: urls[progress-1].url,isNew: true,status: "Nouveau",statusClass: "badge-info",verified: false,usageCount: Math.floor(Math.random() * 500)});}// Add some other random codesfor (let i = 0; i < 2; i++) {const bonusType = BONUS_TYPES[Math.floor(Math.random() * BONUS_TYPES.length)];const bonusValue = getBonusValue(bonusType);42 unmodified lines}, 1500); // Simulate delay between URLs}// Get bonus value for specific WeThrift codesfunction getWeThriftBonusValue(code) {const bonusMap = {"APREELIN70": "70%","MARREELIN75": "75%","JUNREELIN80": "80%","MAYREELIN65": "65%","SPRINGBONUS60": "60%","FKRAGBL4T": "50%"};return bonusMap[code] || "50%";}// Get usage count for specific WeThrift codesfunction getWeThriftUsageCount(code) {const usageMap = {"APREELIN70": 850,"MARREELIN75": 920,"JUNREELIN80": 780,"MAYREELIN65": 650,"SPRINGBONUS60": 1100,"FKRAGBL4T": 1250};return usageMap[code] || Math.floor(Math.random() * 1000);}// Finish scrapingfunction finishScraping(newCodes) {// Add to codes array (prepend to show newest first)
index.html+93-72