cheerio
nodejs
- A simple downloader for Telegraph
git clone
npm i
- create & modify
task.txt
, just put your url links in it npm start
- Create a telegraph url for test
- Login to your server or computer
- Open Terminal
- Install dependencies:
sudo apt-get update && sudo apt-get install -y git && sudo apt-get install -y nodejs npm
You can install node env via NVM too.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
- Clone project:
git clone https://github.com/IITII/telegraph_downloader.git && cd telegraph_downloader
- Install project dependencies:
npm i
- Create & modify
task.txt
, just put your url links in it.vim task.txt
Copy & paste the test url (or other urls from the browser's address bar) to the file
- Run.
npm start
- Check download files.
ls -R ./tmp
- Compress files:
tar -cvf tmp.tar ./tmp
❯ tar -cvf tmp.tar tmp
tmp/
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/3.jpg
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/2.jpg
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/1.jpg
- Download archive to your computer, decompress archive
- Test pass
Image maybe broken under high concurrency(fixed)
Some ways: async.queue async.mapLimit
Maybe not support Chinese(fixed)
- Linux server don't install special language package
- it's some problem of your software
- Just package the downloaded files via
tar
or others. > Download this archive to your computer. Then unarchived it, everything goes well.
key | Description | default |
---|---|---|
downloadDir | Images download dir | ./tmp |
limit | Concurrency Limit | 10 |
proxy | Http proxy | Following System proxy |
links | A file which store download Links | task.txt |