? ????? ?????? ???? ???? ?? ??? ?????. Google? Node.js? ???? ???? ?????? Puppeteer? ???? ??? ?? ??? ????? ??? ??, ?? ??, ?? ?? ????? ???? ? ????. ? ???? Puppeteer? ??? ? ????? ?? ??? ???? ???? ?? ??? ???? ?????.
????? ??????
Puppeteer? Google Chrome(?? Chromium)? ???? ??? ??? ? ?? Node.js ????????. ???? ????? ??? ??? ?????(GUI) ?? ????? ????? ?? ??? ??? ? ??? ?????. ??? Puppeteer? ????? ?? ?? ???? ??? ???? ?? ?? ?? ???? ???? ??? ?? ????.
? ????? ?? Puppeteer? ???? ??? ??????
???: Puppeteer? ?? ????? ?? ??? ??????(SPA)? ?? ?????.
JavaScript ??: ?? ? ?? ?????? ? ???? ????? JavaScript? ?????.
??? ??: ?? ??, ?? ??, ???? ?? ?? ??? ??? ? ????.
Puppeteer? ?? ??? ??
????? ???? ? IP ??? ??? ????? ??? ???? ?????? ???? ??????. ???? ?????? ?? ???? ??? ??? ??? ?? ?? IP ??? ??????. Puppeteer? ?? ???? ?? ??? ???? ?? ??? ? ????.
??????
?? ??
const ???? = puppeteer.launch({
? ?????.
??: ['--proxy-server=your-proxy-server:port']
});
???? ???? ??? ???? ? ?? ?????. ?? ???? ? ??? ?? IP?? ??? ???? ?? ???? ????. ????? ??? ??? ???? ? ??? ???? ? ??? ??, ??? ?? ???? ? ??? ?????. ??? ???? ?? ??? ?? ??? ???? ?? ??? ????? ???? ?????.
??? ??
????? ???? ?? Puppeteer? ???? ???. ??? ????? ???????.
1??: Node.js ? Puppeteer ??
Node.js ??: ?? ?????? Node.js? ?????? ?????.
Puppeteer ??: ???? ?? ?? ??? ??????.
??
?? ??
npm ?? ???
??? ?? ???? ??????? Puppeteer? Chromium? ?????.
2??: ? ??? ???? ??
??? JavaScript ??? scraper.js? ????. ???? ???? ??? ?????. ????? ?? ??? ???? ??? ????? ??? ?????.
??????
?? ??
const puppeteer = require('puppeteer');
(??? () => {
const ???? = puppeteer.launch()? ?????;
const ??? = browser.newPage()? ?????;
// ????? ??
page.goto('https://example.com')? ?????.
//?? ??
const title = ???? ?????.??();
console.log(??? ??: ${title});
browser.close()? ?????.
})();
??? ???? ????? ?????.
??
?? ??
?? scraper.js
? ?? Puppeteer ?????? ???????!
????? ?? ?? ??? ??
?? ?? ??? ????? ????? ??? ? ?? ?? Puppeteer ??? ???????.
??? ??
page.goto(url) ???? ???? ?? URL? ? ? ????. ??? ?? ?? ?? ??? ?? ??? ?????.
??????
?? ??
wait page.goto('https://example.com', { timeout: 60000 });?? ??
CSS ???? ???? ???? ??? ?????. Puppeteer? ??? ?? ??? ?????.
? ?? ??? ?? page.$(selector)
?? ?? ??? ?? page.$$(selector)
?:
??????
?? ??
const ?? = ???? ?????.$('h1');
const text = ???? ?????.evaluate(el => el.textContent, element);
console.log(??: ${text});???? ????
??, ?? ?? ??? ?? ??? ????????.
??????
?? ??
???? ?????.click('#submit-button');
wait page.type('#search-box', 'Puppeteer scraping');??? ???? ?
????? ??? ??? ?????. Puppeteer? ???? ???? ?? ??? ??? ? ????.
??????
?? ??
???? ?????.waitForSelector('#dynamic-content');???? ??
???? ????? ???? ???? ???? ?? ????.
??????
?? ??
wait page.screenshot({ ??: 'screenshot.png', fullPage: true });
?? ??? ??
??? ?? ??????? JavaScript? ???? ???? ???? ?????. Puppeteer? JavaScript? ???? ??? ??? ???? ?? ? ?? ???? ???? ? ??? ??? ?? ????.
?: ?? ??? ??
??????
?? ??
page.goto('https://news.ycombinator.com')? ?????;
???? ?????.waitForSelector('.storylink');
const headlines = ???? ?????.$$eval('.storylink',links =>links.map(link=>link.textContent));
console.log('Headlines:', headlines);
CAPTCHA ? ? ?? ??
?? ?????? ?? ???? ??? ???? ????. Puppeteer? ??? ??? ???? ? ??? ? ? ????.
??? ?? ??: puppeteer-extra ???? ??:
??
?? ??
npm install puppeteer-extra puppeteer-extra-plugin-stealth
????? ?????:
??????
?? ??
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
?? ?? ??: ??? ???, ??? ?? ?? ??? ???? ???? ?? ????? ???? ???.
??? ???? ??: ??? ?? ??? ????? ??? ????? ?????.
??????
?? ??
wait page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64)');
???? ??? ??
???? ??? ??? ???? ?? ????. ??? ? ?? ???? ?????.
JSON:
??????
?? ??
const fs = require('fs');
const data = { ??: 'Puppeteer', ??: 'library' };
fs.writeFileSync('data.json', JSON.stringify(data, null, 2));
CSV: csv-writer? ?? ????? ??:
??
?? ??
npm csv-writer ??
??????
?? ??
const createCsvWriter = require('csv-writer').createObjectCsvWriter;
const csvWriter = createCsvWriter({
??: 'data.csv',
??: [
{ id: '??', title: '??' },
{ id: '??', ??: '??' }
]
});
const records = [{ ??: 'Puppeteer', ??: 'library' }];
csvWriter.writeRecords(records).then(() => console.log('CSV ??? ???????.'));
???? ? ???? ??
????? ????? ?? ?? ??? ??? ??? ????.
??? ??? ?????. ?????? ????? ????? ?? ?????.
?? ?? ??: ?? ??? ?? ?? ??? ??? ????. setTimeout ?? Puppeteer? page.waitForTimeout()? ???? ?? ??? ?????.
??????
?? ??
???? ?????.waitForTimeout(2000); // 2?? ??
??? ??? ??: ?? ??? ??? ??? ?? ????? ???.
???? ?? ??
???? ??? ???? ????. ?? ??? ? ?? ????? ?? ???? ??? ???? ???.
??????
?? ??
const ???? = puppeteer.launch({ headless: false });
???? ???? ??: ???? ??? ??(Ctrl Shift C)? ???? ????? ???? ???? ?????.
CAPTCHA? ?? ???: ??? ????? ???? ??? ??? ?????.
?? ?? ??(FAQ)
- Puppeteer? ?????? ?, Puppeteer? ?? ???? ??? ??? ? ????.
- Puppeteer? JavaScript? ?? ????? ???? ? ???? ????! Puppeteer? JavaScript? ????? ?? ???? ????? ? ?????.
- ? ????? ?????? ??? ?? ????. ????? ?? ?? ????? ??? ??? ?????.
- Puppeteer? CAPTCHA? ??? ? ???? Puppeteer? ???? ?? ?? ??? ??? ? ??? ?? ?? ???? ?? ??? ??? ? ????.
? ??? Puppeteer? ? ????? ??: ????? ??? ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Java ? JavaScript? ?? ?? ????? ??? ?? ?? ?? ???? ????? ?????. Java? ??? ? ??? ?????? ??? ???? JavaScript? ?? ? ??? ??? ?????.

JavaScriptCommentsareEnsentialformaining, ?? ? ???? 1) Single-LinecommentsERUSEDFORQUICKEXPLANATIONS.2) Multi-linecommentSexplaincleClexLogicOrprovidedEdeDDocumentation.3) inlineecommentsClarifySpecificPartSofcode.bestPractic

JavaScript?? ??? ??? ?? ? ? ?? ??? ???????. 1. ?? ??? ??? ???? ?? ??? ????. ISO ?? ???? ???? ???? ???? ?? ????. 2. ?? ??? ?? ???? ??? ?? ???? ??? ? ??? ? ?? 0?? ????? ?? ??????. 3. ?? ?? ???? ???? ???? ?? ?????? ??? ? ????. 4. Luxon? ?? ???? ???? ?????? ???? ?? ????. ??? ?? ???? ????? ???? ??? ????? ?? ? ????.

JavaScriptIspreferredforwebDevelopment, whithjavaisbetterforlarge-scalebackendsystemsandandandoidapps.1) javascriptexcelsincreatinginteractivewebexperiences withitsdynatureanddommanipulation.2) javaoffersstrongtypingandobject-Orientededededededededededededededededdec

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

javascriptassevenfundamentalDatatatypes : ??, ???, ??, unull, ??, ? symbol.1) ?? seAdouble-precisionformat, ??? forwidevaluerangesbutbecautiouswithfatingfointarithmetic.2) stringsareimmutable, useefficientconcatenationmethendsf

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

Java? JavaScript? ?? ????? ?????. 1. Java? ???? ???? ??? ? ??? ?????? ?????? ? ?? ???? ?????. 2. JavaScript? ?? ? ?? ?? ? ??? ?? ??? ???? ??? ? ?? ? ?? ?????.
