Single-file Windows polyglot scholarly PDF harvester with 7-API Recursive Omni-Resolver, 25-source Quality Judge, DoH fallback, and interactive Command Deck WebUI.
  • Batchfile 100%
Find a file
2026-12-02 16:42:43 -05:00
.gitignore chore: initial sanitized import of DeadMoon-Scholarly-Harvester 2026-12-02 16:42:43 -05:00
DeadMoon-Scholarly-Harvester.cmd chore: initial sanitized import of DeadMoon-Scholarly-Harvester 2026-12-02 16:42:43 -05:00
LICENSE chore: initial sanitized import of DeadMoon-Scholarly-Harvester 2026-12-02 16:42:43 -05:00
README.md chore: initial sanitized import of DeadMoon-Scholarly-Harvester 2026-12-02 16:42:43 -05:00

🌕 DeadMoon-Scholarly-Harvester 🌙

Zero-Friction All-in-One Windows Polyglot Scholarly PDF Harvester, Recursive Omni-Resolver, 25-Source Quality Judge & Interactive Command Deck WebUI with Kinetic Moonlight ASCII UI & Smart System/Portable Python Provisioning

DeadMoon Suite Platform Python Shell Tests License

Part of the DeadMoon Tool Suite by @Deadplayerdmr


🖥️ Terminal Preview

      *   d~~b  .        .================.        .   d~~b   *
   .    d  b      .==='  .------------.  '===.      d  b     .
      *          /   .-'    .      o    '-.   \              *
               /  .'   o       .      .   '.  \        .
    *         [===]  .    /        \    .  [===]   .       *
        (( .--[===]     \____/    \____/   [===]--. ))   d~b
        ((    [===]   o      .----.      O [===]    ))   d b
    .    '--- [===]    .    /      \   .   [===] ---'
       *       \  '.     .            o  .'  /       *
    .           '.  '-.    o   .   .  .-'  .'     .
         *        '===='--------------'===='          .

  ════════════════════════════════════════════════════════════════════════════
      🌕   D E A D M O O N   //   S C H O L A R L Y   H A R V E S T E R   🌙
      Recursive Omni-Resolver & 25-Source PDF Quality Judge  •  Part of the DeadMoon Tool Suite by @Deadplayerdmr
  ════════════════════════════════════════════════════════════════════════════

🌙 Overview

DeadMoon-Scholarly-Harvester is a self-contained, single-file Windows polyglot (Batch + PowerShell + Python) scholarly literature acquisition engine — powered by the DeadMoon [Moonlight Engine] kinetic ASCII interface.

Drop any DOI, PubMed ID (PMID), PubMed Central ID (PMCID), arXiv ID, publisher URL, raw paper title, comma-separated list, or .txt batch file into the terminal or onto the .cmd icon. DeadMoon automatically cross-walks the metadata across 7 academic graphs, sweeps 25 Open Access, Institutional, Shadow Library, and P2P DHT Torrent sources in staged parallel waves, scores and unwraps every candidate stream via the DeadMoon Quality & Reliability Judge (0–100), and streams verified %PDF- binaries straight into your local shelf vault.


✨ Key Features

  • 🌕 Kinetic ASCII Boot Splash ([Moonlight Engine]): Renders a smooth 12-frame animated DeadMoon splash screen with pulsing headphone soundwaves, floating musical notes, and a live progress bar using native Win32 Virtual Terminal sequences.
  • 🐍 Smart System Python Auto-Discovery + Zero-Pip Portable Fallback:
    • Automatically detects your installed System Python 3.x (py.exe Python Launcher, PATH, %LOCALAPPDATA%\Programs\Python\Python3*, %LOCALAPPDATA%\Python\pythoncore-*, %ProgramFiles%, and Windows Registry PythonCore keys for Python 3.15 / 3.14 / 3.13+) while ignoring broken WindowsApps Store stubs.
    • If System Python is active, any redundant .local_python directory is automatically cleaned up.
    • If run on a fresh machine without Python installed, automatically downloads and unpacks Portable Python 3.11.9 (amd64) into .local_python in 100% Zero-Pip standard-library mode.
  • 🧬 Multi-Pass Recursive Convergence Omni-Resolver:
    • Accepts any identifier or query: DOI, PMID, PMCID, arXiv, publisher landing URLs, or plain-English article titles.
    • Runs a 3-pass convergence loop across OpenAlex, Semantic Scholar, NCBI PMC ID Converter, NCBI Entrez E-Utilities (esearch / esummary), Europe PMC REST, Crossref (with strict DOI/title similarity verification), and live HTML citation meta-tags (citation_doi, citation_pmid, citation_pmcid, citation_pdf_url, dc.identifier) until the complete DOI + PMID + PMCID + Title + Authors + Journal tuple is locked.
  • ⚖️ DeadMoon Quality & Reliability Judge (0–100 Scoring & Staged Parallel Engine):
    • PDF.js & Wrapper Unwrapping: Automatically unwraps embedded viewer URLs (such as /pdfjs/web/viewer.html?file=https%3A//wbsg8v.xyz/...) into raw, high-speed binary CDN streams before probing while preserving direct query flags like ?pdf=render.
    • Extraction-First Shadow Parsing & Anti-Recursion Guards: Extracts direct PDF bitstreams from Anna's Archive (/scidb/), Sci-Hub, and LibGen Scimag before running strict <title> CAPTCHA checks — eliminating false-positive skips on 200 OK pages that load DDoS-Guard or Cloudflare scripts in their footers, while rejecting navigation roots (/downloads, /tree, /search).
    • Modern NCBI PMC Cloud OA + Europe PMC Retrieval: Queries the public PMC Article Datasets on AWS S3 first (99/100), followed by Europe PMC Direct Render (?pdf=render) (96/100), bounded legacy oa.fcgi .tar.gz/FTP streams (98/100), and ptpmcrender.fcgi (82/100). Includes identified NCBI tool/email parameters with automatic 429 retry backoff.
    • Strict PDF Integrity & Shelf Auto-Repair: Validates every downloaded or cached PDF for size bounds (4 KB – 100 MB), %PDF- header magic (stripping leading HTTP junk bytes if needed), and trailing %%EOF markers before atomic file finalization. Corrupt or truncated shelf files are automatically repaired on re-run.
    • Brotli-Safe Native curl.exe Engine & Surgical TLS Fallback: Uses Windows native curl.exe with cookie persistence, 6-hop redirect limits, and finally temp-file cleanup. Full TLS verification remains active on public APIs and publishers; legacy TLS exceptions are scoped to shadow mirrors and shadow CDNs (wbsg8v.xyz, library.lol, libgen.lc, cloudflare-ipfs.com), while any other host receives a single relaxed-TLS retry only on certificate verification failure (curl exit code 60 or SSLCertVerificationError).
    • Thread-Safe DNS-over-HTTPS (DoH) Cache & --resolve Bridge: Uses OS DNS first, then falls back to a thread-safe DoH cache (1.1.1.1 / 8.8.8.8) for ISP-blocked domains, rejecting poisoned 0.0.0.0/loopback answers and passing --resolve host:port:ip directly to curl.exe.
    • Staged Parallel Discovery with Cooperative Timeouts: Runs Direct sources first, Open Access graphs second, and Shadow/DHT providers lazily only when needed. Each worker uses an isolated HttpClient and target snapshot under a 6.5s per-mirror timeout, a 12s shadow-wave budget, and a 24s unresolved discovery ceiling (without capping active PDF transfers).
  • 🌐 Anna's Archive /md5/ Cross-Pivot Discovery:
    • Normalizes all DOIs to lowercase across Python and the WebUI. When /scidb/{doi} has no stream (common for post-2021 humanities articles), DeadMoon searches /search?q=..., corroborates discovered /md5/<hash> records against the requested DOI/title, extracts direct/torrent links, and cross-pivots the MD5 hash into LibGen ads.php?md5= and library.lol.
  • 📡 Live SLUM Mirror Health Radar (15-Minute Session Cache):
    • Concurrently probes latency and status across Sci-Hub (.ru, .box, .red, .st, .se), LibGen Scimag (.la, .li, .gl, .bz, .vg), and Anna's Archive (.li, .gd, .pk, .gl, welib.org) with schema validation and a 15-minute local cache (.slum_mirror_cache.json).
  • 🧲 Automatic Terminal Torrent & DHT Magnet Harvester:
    • Sweeps LibGen Scimag Torrent Shards, Anna's Archive Scimag Torrents, Academic Torrents, and Btdigg DHT when direct HTTP streams are embargoed, saving .magnet.txt manifests directly to your vault.
  • 🖥️ Interactive DeadMoon Command Deck WebUI (DeadMoon-Fallback-Portal.html) & Sticky Prompt:
    • Generates a dark-mode Matrix/RaveBSD-styled HTML Command Deck in your downloads vault featuring live SLUM mirror telemetry badges, one-click relay cards across 25 sources, local PDF shelf links, and an in-browser live Omni-Resolver search bar powered by localStorage.
    • When a target is gated, the terminal prompts to open the WebUI ([Y/N] (default Y):) and persists your Y or N preference in downloads\.engine\webui_prompt_pref.txt across runs.
  • 📦 Batch Queue Engine & dead articles.txt Reporting:
    • Pass comma/semicolon-separated targets or any .txt batch file (e.g., links.txt). Batches of 2+ targets unlock [a] Yes to All confirmation; batches > 5 automatically enable anti-timeout pacing and generate an organized dead articles.txt report with direct fallback relay links for any unresolved papers.

🛰️ The 25-Source Discovery & Quality Judge Matrix

Priority Tier Judge Score Source / Endpoint Stream Type
Tier 1: Unwrapped Binary CDNs 99 / 100 Anna's Archive SciDB Unwrapped CDN (wbsg8v.xyz) Direct PDF CDN
Tier 1: Official Cloud OA 99 / 100 NCBI PMC Article Datasets on AWS S3 (version metadata + PDF) Redistributable OA PDF
Tier 2: Preprint & Archival OA 98 / 100 arXiv Direct PDF (arxiv.org/pdf/) & NCBI PMC Legacy OA (.tar.gz / PDF) Direct PDF / Tarball
Tier 3: Shadow Direct MD5 97 / 100 LibGen Scimag Direct (get.php?md5=..., ads.php & library.lol MD5 Pivot) Direct MD5 Bitstream
Tier 4: Europe PMC & Sci-Hub 96 / 100 Europe PMC Render (?pdf=render), Sci-Hub Direct & Anna's /md5/ Mirror Direct PDF Stream
Tier 5: Institutional Repos 95 / 100 DigitalCommons (viewcontent.cgi), DSpace (/bitstreams/) & Meta Pins Repository Bitstream
Tier 6: Open Access Graphs 93 / 100 OpenAlex, Unpaywall & Semantic Scholar Best OA Locations Verified OA PDF
Tier 7: Archival Mirrors 90–91 / 100 Internet Archive Scholar API & Wayback Machine PDF Snapshots Preserved PDF
Tier 8: Aggregators 85–89 / 100 CORE.ac.uk v3, OpenAIRE Graph, HAL Open Archive & DOAJ Institutional OA
Tier 9: Renderers & TDM 68–84 / 100 PMC Browser PDF Fallback, Europe PMC ptpmcrender.fcgi & Crossref TDM Publisher / Renderer
Tier 10: P2P & DHT Fallback Manifest Academic Torrents, Btdigg DHT & LibGen/Anna's .torrent Shards .magnet.txt + WebUI

📂 Default Directory Layout

All harvested files and runtime state are organized cleanly inside the script directory:

Component Default Host Path Purpose
Polyglot Launcher .\DeadMoon-Scholarly-Harvester.cmd Single-file Batch + PowerShell + Python harvester & CLI entrypoint
Shelf Vault .\downloads\ Destination folder for all verified Author_DOI.pdf & .magnet.txt files
Command Deck WebUI .\downloads\DeadMoon-Fallback-Portal.html Interactive dark-mode HTML portal with live browser Omni-Resolver & 25-source relays
Batch Report .\downloads\dead articles.txt Automatically generated report for unresolved targets in batches > 5
SLUM Mirror Cache .\downloads\.slum_mirror_cache.json 15-minute session cache of online Sci-Hub, LibGen & Anna's Archive mirrors
Engine Stage .\downloads\.engine\pdf_hunter.py Auto-extracted Python engine executed by System or Portable Python
WebUI Prompt State .\downloads\.engine\webui_prompt_pref.txt Persistent Y/N preference shared by [R], [A], and CLI fallback prompts
Regression Suite .\tests\test_harvester.py 41-test standard-library unit test suite covering parser, network, and PDF guards
Portable Fallback .\.local_python\ (only if needed) Created only if no System Python 3.x is installed on the host machine

🚀 Quick Start

1. Download

Clone this repository or download DeadMoon-Scholarly-Harvester.cmd directly:

git clone https://github.com/Deadplayerdmr/DeadMoon-Scholarly-Harvester.git

2. Launch the Harvester

Double-click DeadMoon-Scholarly-Harvester.cmd, drag-and-drop a .txt batch file onto it, or run it from any terminal:

# Interactive Menu Mode
.\DeadMoon-Scholarly-Harvester.cmd

# Direct CLI / Drag-and-Drop Mode (exits directly after completion with status code)
.\DeadMoon-Scholarly-Harvester.cmd "https://pmc.ncbi.nlm.nih.gov/articles/PMC3917340/"
.\DeadMoon-Scholarly-Harvester.cmd "10.1098/rsbl.2013.0970, PMID:24429683"
.\DeadMoon-Scholarly-Harvester.cmd links.txt

3. Interactive Command Deck Controls

From the main menu, choose any operation:

  • [R] — Run OA Demo Target (PMC3917340): Resolves and harvests "Singing in the moonlight: dawn song performance of a diurnal bird varies with lunar phase" (10.1098/rsbl.2013.0970) end-to-end (~6 seconds via Europe PMC ?pdf=render).
  • [A] — Harvest URLs / DOIs / PMIDs / PMCIDs / Titles or Batch File: Paste a single target, a comma/semicolon-separated list, or a path to a .txt file (links.txt).
  • [M] — Force Live SLUM Mirror Refresh: Re-probes all 15 Sci-Hub, LibGen Scimag, and Anna's Archive mirrors and updates .slum_mirror_cache.json.
  • [W] — Open DeadMoon Command Deck WebUI: Launches DeadMoon-Fallback-Portal.html in your default browser for interactive multi-source relay buttons and browser-side Omni-Resolution.
  • [O] — Open Downloads Vault Folder: Opens .\downloads\ directly in Windows Explorer.
  • [U] — Re-Detect System Python / Clean .local_python: Re-scans your machine for System Python 3.x and purges any unused .local_python portable runtime.
  • [Q] — Quit: Cleanly exits the harvester.

4. Run Regression Tests

The 41-test suite loads and exercises both the PowerShell host wrapper and the embedded Python payload using only the Python standard library:

python -m unittest discover -s tests -v

🔧 Troubleshooting

Symptom Cause Solution
Downloaded .local_python even though Python is installed Older launcher version or non-standard install path Run the latest DeadMoon-Scholarly-Harvester.cmd and press [U]. It automatically detects py.exe, PATH, AppData\Local\Programs\Python, AppData\Local\Python\pythoncore-*, and Registry keys (Python 3.13 / 3.14 / 3.15+) and deletes .local_python.
[!] CAPTCHA / GATE DETECTED on a shadow mirror Mirror presented an interactive Cloudflare Turnstile or DDoS-Guard challenge Press Y or Enter when prompted (defaults to Yes initially, then remembers your last Y/N choice in webui_prompt_pref.txt) to open the DeadMoon Command Deck WebUI, where one-click relay buttons open the pre-resolved endpoint in your browser.
ISP blocks Sci-Hub / LibGen / Anna's Archive domains DNS-level filtering by local ISP DeadMoon checks OS DNS first, then routes failed lookups through a thread-safe DNS-over-HTTPS (DoH) cache (1.1.1.1 / 8.8.8.8), rejecting poisoned loopback/unspecified answers and passing --resolve IPs to curl.exe.
A DOI resolves metadata, but exits with [!] GATED (exit code 3) Resolving metadata does not guarantee an unauthenticated open-access PDF exists (e.g., closed post-2021 humanities articles like 10.1353/jjs.2022.0004 behind Project MUSE verification) DeadMoon bounds unresolved discovery to ~24 seconds so it never hangs, exits cleanly with code 3 instead of saving an HTML gate as a fake PDF, and populates DeadMoon-Fallback-Portal.html with institutional, shadow, and torrent relays.
Batch run of 10+ papers has a few paywalled items Embargoed articles with zero unauthenticated bitstreams Check downloads\dead articles.txt or open DeadMoon-Fallback-Portal.html — every unresolved paper is logged with full citation metadata and direct one-click links.

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


🌌 The DeadMoon Tool Suite

Repository Role in the Ecosystem
🌕 DeadMoon-Download-Bot Whitelisted 8-platform Telegram audio acquisition bot with direct lossless engines, lock-free scheduler & 477 offline tests
📻 DeadMoon-Radio-Telegram-Synchronizer Dockerized Telegram radio bot & dynamic 1280×720 RTMPS audio-visual livestream engine with 3-tier metadata auto-probe
🤝 DeadMoon-Trade-Bot Dockerized Telegram music & dubplate escrow bot with native-SR SoX spectrograms, FTS5 catalog indexer & group trade board
📡 DeadMoon-Telegram-Scraper Single-file Windows polyglot Telegram channel/group exporter with 4-layer URL intelligence, granular media harvesting & QR login
🤖 DeadMoon-OpenHands-Launcher Zero-friction Windows launcher & installer for OpenHands with kinetic ASCII UI & automatic winnat port recovery
📚 DeadMoon-RaveBSD-Launcher Zero-friction Windows installer & launcher for RaveBSD 2.0 with kinetic ASCII UI, auto-Docker setup & Downloads mapping
🎓 DeadMoon-Scholarly-Harvester Single-file Windows polyglot scholarly PDF harvester with 7-API Recursive Omni-Resolver, 25-source Quality Judge & Command Deck WebUI
🌾 DeadMoon-Credential-Harvester Local Tampermonkey userscript (2.3v) for harvesting streaming ARLs, OAuth tokens, Netscape cookies & Widevine .wvd bundles
🔐 DeadMoon-Unified-Spotify-Provisioner Automated Windows polyglot provisioner for Spotify Premium sp_dc cookies & Android Widevine L3 device.wvd CDMs
🎶 DeadMoon-Playlist-Transfer-Tool Single-file Windows polyglot tool for migrating Deezer Favorites (Artists, Albums & Playlists) via CSV
🔍 DeadMoon-Universal-API-Verify-Script Self-contained Windows LLM statistical fingerprint verifier (lmfpd) with Smart Auto-Heal & catalog scanner

🌕 DeadMoon-Scholarly-Harvester 🌙 — Crafted by @Deadplayerdmr