feat: PDF via 12ft.io, weitere Browser-Links (archive.ph, removepaywall)

This commit is contained in:
2026-06-12 14:10:20 +02:00
parent bf5e458e28
commit 762783b8ab
2 changed files with 34 additions and 12 deletions

View File

@@ -55,11 +55,12 @@ router.get('/cdx', authenticate, async (req, res) => {
}); });
// ── POST /api/tools/paywallkiller/pdf ───────────────────────────────────── // ── POST /api/tools/paywallkiller/pdf ─────────────────────────────────────
// Immer Wayback-URL verwenden Originalseite hat server-seitige Paywall // Lädt via 12ft.io (Paywall-Bypasser, kein CAPTCHA) → PDF
router.post('/pdf', authenticate, async (req, res) => { router.post('/pdf', authenticate, async (req, res) => {
const { originalUrl, archiveUrl } = req.body; const { originalUrl, archiveUrl } = req.body;
// archiveUrl (Wayback) bevorzugen hat vollen Text ohne server-seitige Paywall if (!originalUrl && !archiveUrl) return res.status(400).json({ error: 'URL fehlt' });
const targetUrl = archiveUrl || originalUrl; // 12ft.io umgeht Paywalls indem es die Googlebot-Version abruft
const targetUrl = `https://12ft.io/proxy?q=${encodeURIComponent(originalUrl || archiveUrl)}`;
if (!targetUrl || typeof targetUrl !== 'string') return res.status(400).json({ error: 'URL fehlt' }); if (!targetUrl || typeof targetUrl !== 'string') return res.status(400).json({ error: 'URL fehlt' });
const tmpFile = path.join('/tmp', `pwk_${crypto.randomBytes(8).toString('hex')}.pdf`); const tmpFile = path.join('/tmp', `pwk_${crypto.randomBytes(8).toString('hex')}.pdf`);

View File

@@ -204,16 +204,37 @@ export default function PaywallKiller() {
</div> </div>
)} )}
{hasResult && archivePhUrl && ( {hasResult && inputUrl.trim() && (
<div style={{ ...S.card, borderColor: 'rgba(255,255,255,0.1)', marginBottom: 12 }}> <div style={{ ...S.card, borderColor: 'rgba(255,255,255,0.1)', marginBottom: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}> <div style={{ ...S.head, marginBottom: 10 }}>WEITERE OPTIONEN</div>
<span>📦</span> {[
<span style={{ color: 'rgba(255,255,255,0.55)', fontFamily: 'monospace', fontSize: 12 }}>archive.ph</span> {
</div> icon: '🔓',
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}> label: '12ft.io',
<a href={archivePhUrl} target="_blank" rel="noreferrer" style={{ ...S.btn(C.muted), textDecoration: 'none', fontSize: 12 }}>🌐 Öffnen</a> desc: 'Paywall-Bypasser (kein CAPTCHA)',
<span style={{ color: C.muted, fontSize: 10, fontFamily: 'monospace' }}>Kein PDF CAPTCHA-geschützt</span> url: `https://12ft.io/proxy?q=${encodeURIComponent(getTargetUrl())}`,
</div> },
{
icon: '📦',
label: 'archive.ph',
desc: 'Nach CAPTCHA vollen Artikel sichtbar',
url: archivePhUrl,
},
{
icon: '🗑',
label: 'removepaywall.com',
desc: 'Alternativer Bypasser',
url: `https://www.removepaywall.com/search?url=${encodeURIComponent(getTargetUrl())}`,
},
].map(({ icon, label, desc, url }) => (
<div key={label} style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 8 }}>
<a href={url} target="_blank" rel="noreferrer"
style={{ ...S.btn(C.muted), textDecoration: 'none', fontSize: 11, whiteSpace: 'nowrap', flexShrink: 0 }}>
{icon} {label}
</a>
<span style={{ color: C.muted, fontSize: 10, fontFamily: 'monospace' }}>{desc}</span>
</div>
))}
</div> </div>
)} )}