Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › browser automation

How to Schedule Screenshots of Public Indian Railway Pages Safely

By Freedom251 Team · · 7 min read

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

You can capture a public Indian railway webpage on a schedule by writing a browser-automation script that saves a screenshot, then configuring your computer or an approved job runner to launch that script at the times you choose. Keep the capture to public pages: do not automate booking, login, CAPTCHA, or passenger-data steps. Technical feasibility does not establish that recurring capture is permitted under IRCTC’s terms.

Before you automate an IRCTC page

Use a page that is publicly accessible without signing in, entering passenger details, looking up a PNR, or making a payment. Do not put IRCTC credentials in the script or save an authenticated browser session for this task. IRCTC’s privacy policy describes logged session activity as well as personal registration and traveller information, so a public, unauthenticated page avoids unnecessary exposure.

As an Amazon Associate I earn from qualifying purchases.

Permission is a separate question from whether a script can take a screenshot. IRCTC’s official terms describe the website as for “personal and non-commercial use” and restrict copying, displaying, reproducing, or creating derivative works from site information without permission. Its privacy policy likewise says website or app material may be accessed or downloaded only for personal and non-commercial use. The reviewed clauses do not expressly resolve whether a private, periodic screenshot of a public page is allowed; they are not a definitive ruling either way. For recurring, high-volume, commercial, or redistributed captures, ask IRCTC for permission or seek qualified advice first. Check the current terms and privacy policy before relying on them.

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

The Press Information Bureau, Government of India, has described dynamic CAPTCHA at registration, login, and booking pages as a measure to check fraudulent booking through automation software. Another PIB release discusses CAPTCHA and minimum-time checks in the booking flow. These descriptions are not a complete or current technical specification, but they make the boundary clear: do not automate ticket booking, solve or evade CAPTCHA, or defeat site controls. If a page presents a challenge, blocks access, or requires login or booking interaction, stop the capture.

#1 Best Overall
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Choose what part of the page to capture

Capture type What it records Best for Trade-off
Viewport The visible browser area A focused, repeatable view of the page as it first appears Smaller image, but content below the fold is absent
Full page The full scrollable page Archiving a long public information page in one image Can produce a very tall image; content that loads only after scrolling may need special handling
Selected element A single element matched by a CSS selector Tracking one public page component Depends on a stable selector and the element being present when capture runs

Playwright supports all three shapes and can save screenshots directly to a file. A viewport capture is a good starting point; choose full-page or element capture only when the additional area serves a specific purpose.

Build a local Playwright capture script

This Python example takes one screenshot of a public URL supplied through an environment variable. It names each file with the capture time in UTC, so a later run will not overwrite an earlier one. It waits for the page’s load event, then allows a short settling period for visible rendering; it does not attempt to interact with booking controls or bypass a challenge.

  1. Install Playwright for Python: python -m pip install playwright
  2. Install its Chromium browser: python -m playwright install chromium
  3. Save this as capture_public_page.py:
    import os
    from datetime import datetime, timezone
    from pathlib import Path
    from playwright.sync_api import sync_playwright
    
    url = os.environ.get("PAGE_URL")
    if not url:
        raise SystemExit("Set PAGE_URL to a public page URL before running.")
    
    output_dir = Path(os.environ.get("SCREENSHOT_DIR", "screenshots"))
    output_dir.mkdir(parents=True, exist_ok=True)
    timestamp = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
    output_path = output_dir / f"railway-page-{timestamp}.png"
    
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page(viewport={"width": 1365, "height": 900}, device_scale_factor=1)
        response = page.goto(url, wait_until="load", timeout=60000)
        if response is None:
            browser.close()
            raise SystemExit("Navigation returned no response; no screenshot saved.")
        if response.status >= 400:
            browser.close()
            raise SystemExit(f"Page returned HTTP {response.status}; no screenshot saved.")
    
        # Allow client-side rendering to settle; this is not a CAPTCHA or control bypass.
        page.wait_for_timeout(1500)
        page.screenshot(path=str(output_path), full_page=False)
        browser.close()
    
    print(f"Saved {output_path}")
  4. Run it once manually:
    PAGE_URL="https://example.com/public-page" python capture_public_page.py

    Replace the example with the exact public URL you are permitted to capture. On Windows PowerShell, set the variable for the current session with $env:PAGE_URL="https://example.com/public-page", then run python .capture_public_page.py.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to | Prepaid Smartphone- 6.6" 120Hz Display, 5G , 50MP Quad Pixel Camera, Long-Lasting Battery
    • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
    • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
    • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
    • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
    • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.

The example intentionally uses a fixed viewport and browser setup. To save the entire scrollable page, change full_page=False to full_page=True. For one component, locate a known element and call its screenshot method, for example page.locator("CSS_SELECTOR").screenshot(path=str(output_path)); replace the selector with one verified on the page. A missing or changing element should be treated as a failed capture, not as a reason to click through booking or consent controls.

Schedule the script

The script performs the capture; the scheduler is a separate component that starts it. Use your operating system’s scheduler or an approved runner, configure the interval and timezone explicitly, and make sure the machine or runner is powered on and available at the scheduled time. Scheduler setup differs by operating system and runner, so confirm its current instructions for setting the working directory, environment variables, Python executable, and output permissions.

  • Set PAGE_URL and, if desired, SCREENSHOT_DIR in the scheduled task’s environment. Do not store account credentials or browser session state for this use.
  • Use the full path to the Python interpreter and script if the scheduler does not inherit your interactive shell’s environment.
  • Choose a modest interval appropriate to your documentation need. Stop rather than increasing frequency if access is challenged, blocked, or requires login.
  • Check the output folder and scheduler logs after the first scheduled run. Keep enough storage for successive timestamped images.

A local computer gives you direct control over the files, but it must be available at run time and maintained. A hosted runner may run while your computer is off, but you must ensure it is approved for this use, can reach the page, and stores images somewhere you can access with appropriate privacy controls. No particular hosted scheduler is required for the capture method.

Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Keep screenshots comparable and private

For visual comparisons, keep the browser, browser version, operating system, viewport, device scale, and headless or headed mode consistent. Playwright cautions that rendering can vary with the host OS, browser version and settings, hardware, power source, and headless mode. Changes in page content or timing can also make successive screenshots differ even when the script is unchanged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Save captures to a restricted folder and retain only what you need.
  • Inspect an image before sharing it. Do not distribute captures containing names, account details, PNRs, journey plans, or payment information.
  • If the page changes, a selector disappears, navigation times out, or a challenge appears, record that outcome and stop. Do not try to defeat the site’s controls.

Troubleshooting

The script says PAGE_URL is missing

The scheduled process did not receive the environment variable. Define it in the scheduler’s task configuration, or set it in the same shell before running manually. Scheduled tasks often do not inherit the variables from your logged-in terminal.

Playwright cannot find Chromium

Install the browser for the Python environment used by the task with python -m playwright install chromium. If the scheduler invokes a different Python interpreter from your terminal, install Playwright and its browser for that interpreter.

Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black | Privacy Display, Galaxy AI, AI Camera, Super Fast Charging 3.0, Durable Battery, 2026, US 1 Year Warranty
  • PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
  • TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
  • NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
  • HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone

Navigation times out or returns an error

Check that the URL is publicly reachable and correct, and that the machine or runner has network access. A slow load may need a higher navigation timeout, but a challenge, block, or login requirement is a reason to stop—not to add evasion logic.

The screenshot is blank, incomplete, or visually different

Confirm that the page reaches the intended state before capture, and keep browser and viewport settings fixed. If content appears after the initial load, a deliberate short settling wait may help; do not add automated interactions with booking controls. If the page is genuinely blank or failed to load, do not treat the image as a valid record.

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

Scheduled runs do not produce files

Verify the task’s working directory, Python executable, environment variables, and write permissions for the output directory. Run the same command manually under the scheduler’s user account and review its logs.

Best Value
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included | Prepaid Smartphone with Full YR Plan Included bundled with 1500 Min/Text/Data for365 days of service - Locked to Tracfone
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
  • ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
  • CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
  • PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
  • 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can return a screenshot from one API request, which you can invoke from a scheduler. Its clean-shot steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers say which outcome occurred. It also offers an MCP server for AI agents using Claude, Cursor, or another MCP client. Free includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

For API parameters, see the ScreenshotNeo documentation. This example requests a screenshot of a public page; replace the example URL with the public page you are permitted to capture:

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

The API request does not remove the need to respect the site’s terms or stop at access controls. Sign up for ScreenshotNeo: 1,000 free screenshots a month, no card required.

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.

Frequently Asked Questions

Can I use this for ticket booking or CAPTCHA handling?

No. The workflow is for capturing public pages, not automating bookings, logins, CAPTCHA, or other site controls.

Will a scheduled capture run if my computer is asleep?

A local scheduled task needs its machine available at the configured time. A hosted runner has different availability and storage considerations.

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 automationIRCTCPlaywrightSchedulingwebsite screenshots

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
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.