OpenSource-Hub

Website-downloader

애플리케이션

AhmadIbrahiim/Website-downloader

Node.js를 사용하여 전체 웹사이트 소스 코드 및 모든 리소스를 다운로드합니다.

개요

이 애플리케이션은 사용자가 JavaScript, CSS, 이미지 등 모든 리소스를 포함한 모든 웹사이트의 전체 소스 코드를 다운로드할 수 있도록 합니다. wget과 archiver를 사용하여 웹사이트를 미러링하고 압축한 후 socket 채널을 통해 다시 전송합니다. 다양한 클라우드 플랫폼에 대한 원클릭 배포를 지원합니다.

README 미리보기

## Complete Website Downloader 💾\nDownload the complete source code of any website (including all assets) 🔨.\n\n👉 Live Demo: https://website-downloader.onrender.com\n\n\n\n\n  \n\n\n\n## Description 📒\n Website downloader works with `wget` and `archiver` to download all websites assets and compress then sends it back to the user through socket channel\n \n **wget params the being used**\n \n `wget --mirror --convert-links --adjust-extension --page-requisites \n--no-parent http://example.org`\n\n **Explanation of the various flags:**\n\n - --mirror – Makes (among other things) the download recursive.\n- --convert-links – convert all the links (also to stuff like CSS stylesheets) to relative, so it will be suitable for offline viewing.\n- --adjust-extension – Adds suitable extensions to filenames (html or css) depending on their content-type.\n- --page-requisites – Download things like CSS style-sheets and images required to properly display the page offline.\n- --no-parent – When recursing do not ascend to the parent directory. It useful for restricting the download to only a portion of the site\n### Deploy on cloud providers\n[](https://replit.com/github/AhmadIbrahiim/Website-downloader)\n[](https://glitch.com/edit/#!/import/github/AhmadIbrahiim/Website-downloader)\n[](https://railway.app/new/template?template=https://github.com/AhmadIbrahiim/Website-downloader)\n[](https://app.cyclic.sh/api/app/deploy/AhmadIbrahiim/Website-downloader)\n[](https://app.koyeb.com/deploy?type=git&repository=github.com/AhmadIbrahiim/Website-downloader&branch=main&name=Website-downloader)\n[](https://render.com/deploy?repo=https://github.com/AhmadIbrahiim/Website-downloader)\n\n\n## How to run it 🤔\n\n- `git clone https://github.com/AhmadIbrahiim/Website-downloader.git`\n- `cd Website-downloader`\n- `$ npm install`\n- `$ npm start`\n- `http://localhost:3000/`\n\n\n\n# How To Contribute:\n - Open Issue(s) with any bugs you notice.\n - Please create Pull Requests if you think it would

FAQ (2)

문제 해결
로컬에서 웹사이트 다운로드 기능을 실행할 때 발생하는 "'wget' is not recognized as an internal or external command" 오류를 해결하는 방법은 무엇인가요?

다운로드 기능에는 GNU Wget이 필요하지만, 시스템 PATH에 없거나 사용할 수 없습니다. Windows에서는 winget install JernejSimoncic.Wget 또는 choco install wget 명령으로 Wget을 설치하세요. 업데이트된 PATH가 로드되도록 터미널이나 IDE를 다시 시작한 후, wget.exe --version을 실행하여 설치를 확인하세요. 이후 로컬 다운로드 기능이 정상적으로 작동할 것입니다.

원본 Issue #102
문제 해결
사용자가 페이지를 닫을 때 Website-downloader가 디스크 공간을 확보하지 않는 거대한 삭제된 .zip 파일을 생성하는 문제를 어떻게 해결하나요?

Node.js 프로세스가 삭제된 .zip 파일에 대해 열린 파일 디스크립터를 계속 보유하고 있기 때문에 디스크 공간이 해제되지 않습니다. 멈춘 프로세스를 찾으세요:

sudo lsof +L1 | grep '\.zip (deleted)'

다음과 같은 출력이 표시됩니다:

node 270102 root 20w REG ... /www/wwwroot/Website-downloader/public/sites/.zip (deleted)

다운로드 또는 웹사이트 서비스를 일시 중지한 후 멈춘 프로세스를 종료하세요:

sudo kill -9 270102

삭제된 ZIP 파일을 보유하고 있는 모든 Node 프로세스를 종료하려면:

sudo lsof +L1 | awk '/node/ && /\.zip \(deleted\)/ {print $2}' | xargs -r sudo kill -9

공간이 해제되었는지 확인하세요:

df -h

영구적인 해결을 위해 issue #74를 수정하는 풀 리퀘스트가 포함된 릴리스로 Website-downloader를 업데이트하세요. 이 패치는 클라이언트 연결이 끊어질 때 다운로드 스트림을 중단하거나 파괴하고, 임시 ZIP 파일을 제거하며, URL-fetch 재시도 루프가 계속 실행되지 않도록 해야 합니다. 업데이트 후 Node 서비스를 다시 시작하세요. 예를 들어:

pm2 restart all
# or
sudo systemctl restart <your-website-downloader-service>

원본 Issue #74