Browse Source

little change

master
Jakub Škrabánek 4 weeks ago
parent
commit
aa50e6768b
  1. 4
      20_requests/dadzjokes.py

4
20_requests/dadzjokes.py

@ -1,5 +1,7 @@
import requests import requests
from termcolor import colored from termcolor import colored
import time
def get_dad_joke(): def get_dad_joke():
print ("Nahodný dad džouk") print ("Nahodný dad džouk")
url = "https://icanhazdadjoke.com" url = "https://icanhazdadjoke.com"
@ -16,4 +18,6 @@ def get_dad_joke():
print(f"chyba:{e}") print(f"chyba:{e}")
if __name__ == "__main__": if __name__ == "__main__":
for i in range(5):
get_dad_joke() get_dad_joke()
time.sleep(3)
Loading…
Cancel
Save