自分用に開発したダウンローダー(自己使用)
依存関係をインストールします。
$ pip3 install -r 要件.txt
使用状況を確認してください。
$ python3 main.py -h usage: main.py [-h] [--src SRC] [--save SAVE] [--max MAX] [--interval INTERVAL] [--chunk CHUNK] fastDownloader v0.0.1 options: -h, --help show this help message and exit --src SRC This parameter specifies the file path where the links to be downloaded are stored. --save SAVE This parameter specifies the path for storing the downloaded files. No / at the end. --max MAX This parameter specifies the concurrency level. --interval INTERVAL This parameter specifies the interval of requests. --chunk CHUNK This parameter specifies the number of bytes to be read per download.
["url1","url2"...]
成功
$ python3 main.py --src ./test_success.json --max 3 --chunk 1024> -3557342921266950271_500 をダウンロード中!> -2865197712751752189_300 をダウンロード中!> ダウンロード中-700390739090695736_600 を今すぐ!> 5636641034660171054_700 を今すぐダウンロード中!> 5773939477608183504_400 を今すぐダウンロード中!> 1310250945337633844_200 を今すぐダウンロード中!> すべてのリソースが正常に完了しました。ダウンロードしました!ダウンロード済み 6 失敗 0 残り 0: 100%|██████████████████████████| 6/6 [00:01<00:00, 4.33it/s]# 注意 : ファイル名の前にある長い文字列は、# ファイル名の一意性を確保するために使用される一意のハッシュ コードです。
失敗した
$ python3 main.py --src ./test_failed.json --max 3 --chunk 1024> -6762229335681689814_700 を今すぐダウンロード中!> -55066400530373971_600 を今すぐダウンロード中!> ダウンロード中-2931830335596416142_500 を今すぐ!> 2353655904693015958_300 をダウンロード中!> -5222952479054798371_non-existent-url をダウンロード中!> 1 個のファイルをダウンロードできませんでした!> 「python3 main.py --src failed.json」で再実行してください。 --save . --max 3 --interval 0.5 --chunk 1024"ダウンロード 4 失敗 1 残り 0: 100%|██████████████████████ ███| 5/5 [00:01<00:00、4.53it/s]
指示に従って再実行してください。