DownloadImage, RP5IdParser
This commit is contained in:
parent
cbd74265b5
commit
ad93333cf6
4 changed files with 167 additions and 0 deletions
11
dlimg/list.txt
Normal file
11
dlimg/list.txt
Normal 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
27
dlimg/main.py
Normal 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('')
|
Loading…
Add table
Add a link
Reference in a new issue