A:
You could try this
import requests
import time
import datetime
t = datetime.datetime.now()
url = ""
header = {'User-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0'}
r = requests.get(url, headers=header)
date = datetime.datetime.strptime(r.text, "%a, %d %b %Y %H:%M:%S")
print(date)
# If you want to convert it to human readable format then you could do:
# date = datetime.datetime.strptime(r.text, "%a, %d %b %Y %H:%M:%S").strftime("%d-%b-%y %H:%M:%S")
time.sleep(5)
t = datetime.datetime.now()
url = ""
header = {'User-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0'}
r = requests.get(url, headers=header)
date = datetime.datetime.strptime(r.text, "%a, %d %b %Y %H:%M:%S")
print(date)
# If you want to convert it to human readable format then you could do:
# date = datetime.datetime.strptime(r.text, "%a, %d %b %Y %H:%M:%S").strftime("%d-%b-%y %H:%M:%S")
time.sleep(5)
print(time.time()-t)
A.R.R.L.H. Steel is a private education centre that is focused on the principles of Self Leadership and Self Development. Our mission is to positively be359ba680
Related links:
Comments