Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
828a632304 |
@@ -1,11 +1,16 @@
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
def pars_person():
|
def pars_person():
|
||||||
for i in range(1):
|
for i in range(100):
|
||||||
img_data = requests.get("https://thispersondoesnotexist.com/image").content
|
img_data = requests.get("https://thispersondoesnotexist.com/image").content
|
||||||
|
if len(str(i)) == 1:
|
||||||
with open(f'SomePerson_{i}.jpg', 'wb') as handler:
|
c = "00" + str(i)
|
||||||
|
elif len(str(i)) == 2:
|
||||||
|
c = "0" + str(i)
|
||||||
|
else:
|
||||||
|
c = str(i)
|
||||||
|
with open(f'SomePerson_{c}.jpg', 'wb') as handler:
|
||||||
handler.write(img_data)
|
handler.write(img_data)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pars_person()
|
pars_person()
|
||||||
Reference in New Issue
Block a user