Git Product home page Git Product logo

telegraph_downloader's Introduction

Telegraph_downloader

cheerio
nodejs

English | 简体中文

  • A simple downloader for Telegraph

Use

  1. git clone
  2. npm i
  3. create & modify task.txt, just put your url links in it
  4. npm start

Example

  1. Create a telegraph url for test

Test URL: https://telegra.ph/%E6%B5%8B%E8%AF%95-03-28

alt

  1. Login to your server or computer
  2. Open Terminal
  3. 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

  1. Clone project: git clone https://github.com/IITII/telegraph_downloader.git && cd telegraph_downloader
  2. Install project dependencies: npm i
  3. 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

alt

  1. Run. npm start
  2. Check download files. ls -R ./tmp

alt

  1. Compress files: tar -cvf tmp.tar ./tmp
❯ tar -cvf tmp.tar tmp
tmp/
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/3.jpg
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/2.jpg
tmp/测试😀( ̄▽ ̄)~*《🤣🤣🤣》/1.jpg
  1. Download archive to your computer, decompress archive

alt

  1. Test pass

Know issues

  1. Image maybe broken under high concurrency (fixed)

Some ways: async.queue async.mapLimit

  1. Maybe not support Chinese (fixed)
  1. Linux server don't install special language package
  2. it's some problem of your software
  3. Just package the downloaded files via tar or others. > Download this archive to your computer. Then unarchived it, everything goes well.

config.json

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

telegraph_downloader's People

Contributors

dependabot[bot] avatar iitii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

telegraph_downloader's Issues

TypeError: matrix.flat is not a function

I have done instructions. git clone... npm i.. npm start and i have given this error:

$ uname -a
Linux god 5.13.0-44-generic #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

scrooge@god:~/Desktop/telegraph_downloader$ npm start

> [email protected] start /home/scrooge/Desktop/telegraph_downloader
> node App.js

2022-06-08 17:15:35.554 INFO  Total urls: 1
2022-06-08 17:15:35.555 INFO  Getting image urls from https://telegra.ph/Osnovy-kompyuternyh-setej-Tema-8-Protokol-agregirovaniya-kanalov-Etherchannel-10-17
2022-06-08 17:15:36.090 ERROR matrix.flat is not a function
{}
TypeError: matrix.flat is not a function
    at Promise.all.then.matrix (/home/scrooge/Desktop/telegraph_downloader/App.js:156:40)
    at process._tickCallback (internal/process/next_tick.js:68:7)
2022-06-08 17:15:36.093 INFO  Total spent 2ms.
2022-06-08 17:15:36.093 INFO  Download complete!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.