← Về thư mục
📄 / / root / .hermes / skills / research / pdf-source-recovery / SKILL.md

name: pdf-source-recovery description: Extract direct PDF links from flipbooks and web viewers. version: 0.1.0 author: Hermes platforms: [linux, macos, windows] metadata: hermes: tags: [Scraping, PDF, Flipbook, DearFlip]


PDF Source Recovery

Extract direct PDF source URLs from embedded flipbook viewers (DearFlip, FlipHTML5, FlowPaper) and restricted web viewers. This skill uses browser inspection and terminal-based downloading to bypass hotlink protection.

When to Use

Prerequisites

How to Run

  1. Navigate to the page with browser_navigate.
  2. Inspect the JavaScript context with browser_console.
  3. Download the recovered URL with terminal.

Procedure

  1. Locate the Container: Identify the flipbook plugin by looking for classes or IDs like df-container, flipbook, or dearflip.

  2. Inspect JavaScript Configuration: Many viewers (like DearFlip) store the PDF source in a global options object. Run this in browser_console: javascript // Check for DearFlip config objects Object.keys(window).filter(k => k.startsWith('option_df_')).map(k => window[k].source);

  3. Check Data Attributes: Look for data-pdf, data-src, or data-file on the viewer element.

  4. Verify Direct URL: Confirm the URL ends in .pdf or returns an application/pdf Content-Type.

  5. Download with Headers: To bypass hotlink protection, use the Referer and a realistic User-Agent in terminal: bash curl -L -o output.pdf -A "Mozilla/5.0..." -H "Referer: https://source-site.com/" "https://url.com/file.pdf"

Pitfalls

Verification

Run file output.pdf in terminal to confirm it is a valid PDF document.