Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › browser automation

Puppeteer se scroll par load hone wali Hindi website ka screenshot kaise lein

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scroll-triggered content capture karne ke liye Puppeteer mein pehle page ko chhote steps mein scroll karein, phir har step par website ke actual content ya end marker ke aane ka intezar karein. Uske baad page.screenshot({ path: 'capture.png', fullPage: true }) se full-page screenshot lein. fullPage: true capture area ko poore page tak badhata hai; yeh apne aap scroll karke content load nahi karta.

Full-page screenshot aur scroll alag kaam kyun hain?

Page.screenshot() page ka screenshot leta hai. fullPage: true poore page ko capture karne ke liye screenshot area badhata hai, lekin scroll-triggered content mangwane ki guarantee nahi deta. Lazy loading ya infinite scroll ke liye page par asal scroll action karna aur content load hone ki jaanch karna zaroori hai. Puppeteer screenshot guide screenshot ka tareeqa batati hai; page.evaluate() ke zariye page context mein window.scrollBy() chalaya ja sakta hai.

As an Amazon Associate I earn from qualifying purchases.

Navigation ke waqt waitUntil: 'networkidle2' ek upyogi shuruaati wait hai, lekin yeh baad ke scroll ke baad maange gaye items load hone ka saboot nahi hai. Uske liye site-specific selector, item count, ya end marker ka intezar karein. Puppeteer ke waitForSelector() aur waitForFunction() aise checks ke liye hain.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scroll karke content load karayein aur screenshot lein

Neeche CommonJS JavaScript ka adaptable pattern hai. Isse apne page ke selector aur completion condition ke mutabik badlein; yeh har website ke liye guaranteed stopping algorithm nahi hai.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  1. puppeteer install karein: npm install puppeteer. Apne project mein neeche ka code capture.js naam se save karein.

  2. https://example.com ko target page se aur .content-item ko us page ke actual content selector se badlein.

  3. Script chalayein: node capture.js. Browser band hone ke baad screenshot capture.png ke roop mein save hoga.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
    • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
    • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
    • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
    • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
    • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com', { waitUntil: 'networkidle2' });

    // Page par kam se kam ek asli content item aane ka intezar karein.
    await page.waitForSelector('.content-item', { timeout: 15000 });

    let previousHeight = 0;
    const maxSteps = 40;

    for (let step = 0; step < maxSteps; step++) {
      const before = await page.evaluate(() => ({
        height: document.documentElement.scrollHeight,
        y: window.scrollY,
      }));

      await page.evaluate(() => {
        window.scrollBy(0, Math.max(300, window.innerHeight * 0.8));
      });

      // Yeh bounded pause hai, content-ready hone ka proof nahi.
      await new Promise(resolve => setTimeout(resolve, 500));

      // Height badalna tabhi meaningful hai jab site naye content par page height badhati ho.
      await page.waitForFunction(
        oldHeight => document.documentElement.scrollHeight > oldHeight,
        { timeout: 3000 },
        before.height
      ).catch(() => {});

      const state = await page.evaluate(() => ({
        height: document.documentElement.scrollHeight,
        atBottom: window.innerHeight + window.scrollY >=
          document.documentElement.scrollHeight - 2,
      }));

      if (state.atBottom && state.height === previousHeight) break;
      previousHeight = state.height;
    }

    // Yahan apne page ka final item ya end marker bhi verify karein.
    await page.screenshot({ path: 'capture.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Is example mein height badhne ka wait jaan-boojhkar limited hai. Agar page naye items ko maujooda container mein dikhata hai aur document height nahi badalti, height predicate kaam ka signal nahi hoga. Aise mein loaded items ki ginti, kisi nayi row ka selector, target text, ya known last-item marker par waitForFunction() lagayein. Scroll loop mein maxSteps jaise cap rakhein, warna infinite-scroll page anishchit samay tak load hota reh sakta hai.

Wait strategy kaise chunein

Strategy Kab kaam aati hai Seema
waitUntil: 'networkidle2' Initial navigation aur network ke shaant hone ka intezar; Puppeteer ke screenshot guide mein iska example hai. Scroll ke baad required content aa gaya, yeh akela establish nahi karta.
waitForSelector() ya waitForFunction() Jab target content selector, item count, text, ya page-state condition maloom ho. Condition ko website ke actual behavior ke hisaab se chunna hoga.
Fixed delay Bahut chhota bounded pause kabhi-kabhi animation ya request ko settle hone ka mauka de sakta hai. Har site aur har load par ek hi delay bharosemand readiness test nahi hai.

Screenshot poora ya sahi na aaye to kya karein

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reliability aur runtime ke liye practical limits

Infinite scroll ko unlimited chalane ke bajay maximum steps aur har wait ka timeout rakhein. Scroll distance ko viewport ke ek hissa tak rakhne se beech ke lazy-load triggers miss hone ka chance kam hota hai, magar sahi distance website ke layout par nirbhar hai. Screenshot tabhi lein jab aapka target content ya end condition verify ho; loop ka ruk jaana apne aap mein page complete hone ka proof nahi hai.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Puppeteer ke official docs evaluation aur wait APIs dete hain, lekin har website ke liye scroll distance, delay, ya infinite-scroll ki universal completion condition prescribe nahi karte. Yeh workflow site-specific implementation pattern hai, universal tested recipe nahi. Official docs par research ke samay Puppeteer version label 25.12.0 tha.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Or skip the browser setup

ScreenshotNeo ek website screenshot API aur MCP server hai. Ek GET request se PNG, JPEG, WebP ya PDF capture manga sakte hain. Udaharan cURL call:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

API key account se lein; ScreenshotNeo API docs mein request options dekhein. ScreenshotNeo consent banners accept karke 60 se zyada known consent platforms, newsletter popups aur chat widgets hata sakta hai; in steps ko band bhi kiya ja sakta hai. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads aur cache hits billed nahi hote, aur response mein X-Page-Verdict aur X-Billed headers aate hain. Iska MCP server Claude, Cursor aur kisi bhi MCP client ko take_screenshot, get_page_info aur capture_pdf tools deta hai. Free plan mein bina card ke 1,000 screenshots har mahine hain; paid plans $5 mein 3,000 se shuru hote hain. Free account banane ke liye ScreenshotNeo par sign up karein.

Frequently Asked Questions

Kya Puppeteer ka fullPage: true lazy-loaded images ko khud load karta hai?

Nahi. Yeh screenshot ka capture area badhata hai; scroll karke load hone wala content mangwana alag step hai.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Kya networkidle2 ka wait scroll ke baad zaroori content ki pushti karta hai?

Nahi. Required content ke liye uska selector, count, ya page-specific condition check karein.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

browser automationJavaScriptPuppeteerscreenshotsweb scraping

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.