feat: PDF via 12ft.io, weitere Browser-Links (archive.ph, removepaywall)
This commit is contained in:
@@ -55,11 +55,12 @@ router.get('/cdx', authenticate, async (req, res) => {
|
||||
});
|
||||
|
||||
// ── 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) => {
|
||||
const { originalUrl, archiveUrl } = req.body;
|
||||
// archiveUrl (Wayback) bevorzugen – hat vollen Text ohne server-seitige Paywall
|
||||
const targetUrl = archiveUrl || originalUrl;
|
||||
if (!originalUrl && !archiveUrl) return res.status(400).json({ error: 'URL fehlt' });
|
||||
// 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' });
|
||||
|
||||
const tmpFile = path.join('/tmp', `pwk_${crypto.randomBytes(8).toString('hex')}.pdf`);
|
||||
|
||||
@@ -204,16 +204,37 @@ export default function PaywallKiller() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{hasResult && archivePhUrl && (
|
||||
{hasResult && inputUrl.trim() && (
|
||||
<div style={{ ...S.card, borderColor: 'rgba(255,255,255,0.1)', marginBottom: 12 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
|
||||
<span>📦</span>
|
||||
<span style={{ color: 'rgba(255,255,255,0.55)', fontFamily: 'monospace', fontSize: 12 }}>archive.ph</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
|
||||
<a href={archivePhUrl} target="_blank" rel="noreferrer" style={{ ...S.btn(C.muted), textDecoration: 'none', fontSize: 12 }}>🌐 Öffnen</a>
|
||||
<span style={{ color: C.muted, fontSize: 10, fontFamily: 'monospace' }}>Kein PDF – CAPTCHA-geschützt</span>
|
||||
<div style={{ ...S.head, marginBottom: 10 }}>WEITERE OPTIONEN</div>
|
||||
{[
|
||||
{
|
||||
icon: '🔓',
|
||||
label: '12ft.io',
|
||||
desc: 'Paywall-Bypasser (kein CAPTCHA)',
|
||||
url: `https://12ft.io/proxy?q=${encodeURIComponent(getTargetUrl())}`,
|
||||
},
|
||||
{
|
||||
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>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user