i am new to python. now i am stuck somewhere. here is my problem, how can i get date value from the GET request, to check which week day it is(if get date is not today) url:
http://10.0.0.5:8000/booking/?format=json&boat_no=1010&date=2000-09-05
i want to find which weekday it is(sunday,monday,tuesday....)
Have you tried this code
import urlparse
url = 'http://10.0.0.5:8000/booking/?format=json&boat_no=1010&date=2000-09-05'
parsed = urlparse.urlparse(url)
print urlparse.parse_qs(parsed.query)['date']
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.