Built with anycoder
DEEP LAZY
DOWNLOADER // PROTOCOL v3.0
System Status
OFFLINE
COMMAND INPUT
Target URL (Yandex/Web)
Max Images (Limit)
INITIATE SCAN
Clear
Export List
VISUAL STREAM
IDLE
# System ready...
Decoded Objects
0
Waiting for input stream...
packages = ["beautifulsoup4"]
import js import asyncio import re from bs4 import BeautifulSoup from pyodide.http import pyfetch import urllib.parse # --- UI HELPERS --- def log(message, type="info"): term = js.document.getElementById("console-terminal") color_class = "" if type == "error": color_class = "error" elif type == "success": color_class = "success" elif type == "process": color_class = "text-cyan-300" line = f"
{message}
" term.innerHTML += line term.scrollTop = term.scrollHeight def update_status(status): led = js.document.getElementById("status-ring") txt = js.document.getElementById("status-text") btn = js.document.getElementById("start_btn") if status == "running": led.classList.remove("bg-red-600", "shadow-[0_0_10px_red]") led.classList.add("bg-green-500", "shadow-[0_0_15px_lime]", "animate-pulse") txt.innerText = "SCANNING NETWORK..." txt.classList.remove("text-red-500") txt.classList.add("text-green-500") btn.disabled = True else: led.classList.add("bg-red-600", "shadow-[0_0_10px_red]") led.classList.remove("bg-green-500", "shadow-[0_0_15px_lime]", "animate-pulse") txt.innerText = "IDLE" txt.classList.add("text-red-500") txt.classList.remove("text-green-500") btn.disabled = False # --- DECODER LOGIC --- async def fetch_url(url): """Fetches content via CORS Proxy to bypass browser restrictions""" try: # Using allorigins as proxy proxy_url = f"https://api.allorigins.win/get?url={js.encodeURIComponent(url)}" response = await pyfetch(proxy_url, method="GET") data = await response.json() return data.get("contents", "") except Exception as e: log(f"Connection Error: {str(e)}", "error") return None def clean_url(url): """Cleans and decodes URL strings found in JS/HTML attributes""" try: # Handle URL encoding from JSON/HTML attributes (e.g. \/) clean = url.replace(r'\/', '/') # Decode parameters (Yandex often uses %3A%2F etc) decoded = urllib.parse.unquote(clean) return decoded except: return url async def start_process(*args): # Reset UI js.document.getElementById("console-terminal").innerHTML = "" js.window.found_urls = [] js.document.getElementById("counter").innerText = "0" js.document.getElementById("dl-btn").disabled = True js.document.getElementById("gallery-container").innerHTML = "" update_status("running") log("Initializing Core...", "process") target_url = js.document.getElementById("target_url").value max_images = int(js.document.getElementById("max_images").value) log(f"Target: {target_url[:40]}...") log("Establishing Proxy Tunnel...", "process") html_content = await fetch_url(target_url) if not html_content: log("FATAL: No data received.", "error") update_status("idle") return log("Stream received. Decoding...", "success") soup = BeautifulSoup(html_content, 'html.parser') found_links = [] # 1. Find standard
tags for img in soup.find_all('img'): src = img.get('src') or img.get('data-src') or img.get('data-srcset') if src: if isinstance(src, str) and src.startswith('http'): found_links.append(clean_url(src)) # 2. Deep Regex Scan for hidden URLs in script tags or styles # Looks for http links ending in common image extensions pattern = r'https?://[^\s"\'\\]+?\.(?:jpg|jpeg|png|webp|bmp|gif)\b' regex_matches = re.findall(pattern, html_content) for link in regex_matches: found_links.append(clean_url(link)) # 3. Yandex specific logic (handling the huge JSON payload often found) # Look for "url":"http..." yandex_pattern = r'"url":"(https?://.*?)"' yandex_matches = re.findall(yandex_pattern, html_content) for link in yandex_matches: if any(ext in link for ext in ['.jpg', '.png', '.jpeg', '.webp']): found_links.append(clean_url(link)) # Deduplicate unique_links = list(dict.fromkeys(found_links)) log(f"Analysis Complete. {len(unique_links)} potential objects found.", "process") count = 0 gallery = js.document.getElementById("gallery-container") for url in unique_links: if count >= max_images: break # Basic validation if len(url) < 10 or "placeholder" in url: continue js.window.found_urls.append(url) js.add_image_to_gallery(url, count + 1) count += 1 # Throttle UI updates slightly if count % 4 == 0: js.document.getElementById("counter").innerText = str(count) js.document.getElementById("progress-label").innerText = f"DECODING {count}/{max_images}" await asyncio.sleep(0.05) log(f"Operation Finished. {count} Images Processed.", "success") js.document.getElementById("dl-btn").disabled = False update_status("idle")