From 7df1129206487cb50b304bf77252c732ec00d750 Mon Sep 17 00:00:00 2001 From: Igor Volochay <44619012+IgorVolochay@users.noreply.github.com> Date: Sat, 8 Oct 2022 21:11:14 +0300 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=96=BC=EF=B8=8F=20Update=20SomePerson?= =?UTF-8?q?=20pars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Face recognition/SomePerson/SomePerson-pars.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Face recognition/SomePerson/SomePerson-pars.py b/Face recognition/SomePerson/SomePerson-pars.py index c2f0b8e..29abfc6 100644 --- a/Face recognition/SomePerson/SomePerson-pars.py +++ b/Face recognition/SomePerson/SomePerson-pars.py @@ -1,16 +1,11 @@ import requests def pars_person(): - for i in range(100): + for i in range(1): img_data = requests.get("https://thispersondoesnotexist.com/image").content - if len(str(i)) == 1: - 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: + + with open(f'SomePerson_{i}.jpg', 'wb') as handler: handler.write(img_data) if __name__ == '__main__': - pars_person() \ No newline at end of file + pars_person() -- 2.54.0