برنامج تنزيل تم تطويره لنفسي.(الاستخدام الذاتي)
تثبيت التبعيات.
تثبيت $ pip3 -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 الآن!> فشل تنزيل ملف واحد!> الرجاء إعادة التشغيل باستخدام "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]
يرجى اتباع التعليمات لإعادة التشغيل.