
वेबसाइटों के वास्तविक JS/CSS/assets (सपाट HTML नहीं) डाउनलोड करने के लिए CLI
एक Python CLI टूल जो वेबपेज द्वारा लोड किए गए सभी संसाधनों (ब्राउज़र DevTools Sources टैब की तरह) को कैप्चर करता है और उन्हें मूल निर्देशिका संरचना के साथ सहेजता है।
pip install pagesource
# IMPORTANT: Install Playwright browser after package installation
playwright install chromium
# Capture all resources from a webpage
pagesource https://example.com
यह सभी संसाधनों को ./pagesource_output/ में निर्देशिका संरचना के साथ सहेजेगा।
# Specify custom output directory
pagesource https://example.com -o ./my-output
# Wait extra time for JavaScript content (useful for SPAs)
pagesource https://example.com --wait 5
# Include external resources (CDN assets, third-party scripts)
pagesource https://example.com --include-external
# Combine options
pagesource https://example.com -o ./output --wait 3 --include-external
pagesource <url> [OPTIONS]
Arguments:
url URL of the webpage to capture resources from
Options:
-o, --output PATH Output directory (default: ./pagesource_output)
-w, --wait INTEGER Additional seconds to wait after page load
-e, --include-external Include external resources (CDN, third-party)
-v, --version Show version and exit
--help Show help message
संसाधन URL पथ संरचना को संरक्षित करके सहेजे जाते हैं:
pagesource_output/
└── example.com/
├── index.html
├── assets/
│ ├── css/
│ │ └── style.css
│ └── js/
│ └── app.js
└── images/
└── logo.png
यदि --include-external का उपयोग किया जाता है, तो बाहरी संसाधन अपनी स्वयं की होस्ट निर्देशिकाओं में सहेजे जाते हैं:
pagesource_output/
├── example.com/
│ └── ...
├── cdn.example.com/
│ └── libs/
│ └── library.js
└── fonts.googleapis.com/
└── css/
└── font.css
MIT