Initial commit - cleaned for CV

This commit is contained in:
Renato97
2026-03-31 01:28:25 -03:00
commit 2e7bb89d77
6413 changed files with 1069318 additions and 0 deletions

53
backend/test-puppeteer.js Normal file
View File

@@ -0,0 +1,53 @@
import puppeteer from 'puppeteer';
async function testPuppeteer() {
const browser = await puppeteer.launch({
headless: 'new',
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage'
]
});
const page = await browser.newPage();
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36');
const url = 'https://manhwaweb.com/manga/one-piece_1695365223767';
console.log('Navigating to:', url);
await page.goto(url, {
waitUntil: 'networkidle0',
timeout: 30000
});
console.log('Waiting 3 seconds for content to load...');
await page.waitForTimeout(3000);
// Get page title
const title = await page.title();
console.log('Page title:', title);
// Look for links with /leer/
const links = await page.evaluate(() => {
const allLinks = Array.from(document.querySelectorAll('a'));
const leerLinks = allLinks
.filter(a => a.href && a.href.includes('/leer/'))
.slice(0, 10)
.map(a => ({
href: a.href,
text: a.textContent?.trim()
}));
return leerLinks;
});
console.log(`\nFound ${links.length} links with /leer/:`);
links.forEach(link => {
console.log(` - ${link.href}: "${link.text}"`);
});
await browser.close();
}
testPuppeteer().catch(console.error);