DownloadImage, RP5IdParser

This commit is contained in:
Андрей 2021-06-08 16:28:01 +04:00 committed by GitHub
parent cbd74265b5
commit ad93333cf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 167 additions and 0 deletions

11
dlimg/list.txt Normal file
View file

@ -0,0 +1,11 @@
https://i.ibb.co/TLMWVKX/html.png
https://i.ibb.co/HgKBX69/css.png
https://i.ibb.co/FDHWwVT/vbscript.png
https://i.ibb.co/yPRhNPw/php.png
https://i.ibb.co/G3qP39z/python.png
https://i.ibb.co/k0bJfrr/powershell.png
https://i.ibb.co/k1WYYYs/javascript.png
https://i.ibb.co/km1sN5Y/java.png
https://i.ibb.co/5hLz74k/cs.png
https://i.ibb.co/j46ws29/bash.png
https://i.ibb.co/dLGNx4Q/cpp.png

27
dlimg/main.py Normal file
View file

@ -0,0 +1,27 @@
import requests
imgsfile = open('list.txt', 'rt')
imgslist = imgsfile.readlines()
imgsfile.close()
try:
for img in imgslist:
url = img.strip()
result = requests.get(url).content
filepath = url.split('/')
file = open(filepath[len(filepath) - 1], 'wb')
file.write(result)
file.close()
print('Done!')
except KeyboardInterrupt:
print('Stopped by keyboard')
except Exception as ex:
print(ex)
input('')