28 lines
850 B
Python
28 lines
850 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Thu Feb 24 08:51:58 2022
|
|
|
|
@author: antoine
|
|
"""
|
|
|
|
import requests
|
|
|
|
import datetime
|
|
|
|
date = datetime.datetime.today().date()
|
|
|
|
day = str(date.day)
|
|
month = str(date.month)
|
|
year = str(date.year)
|
|
|
|
f = open("edt.txt", "w")
|
|
|
|
r = requests.get("https://adecons.unistra.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=5448&projectId=8&calType=ical&firstDate="+year+"-"+month+"-"+day+"&lastDate="+year+"-"+month+"-"+day)
|
|
#r = requests.get('https://adecons.unistra.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=5448&projectId=8&calType=ical&firstDate=2022-02-25&lastDate=2022-02-25')
|
|
#r = requests.get('https://adecons.unistra.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=5448&projectId=8&calType=ical&nbWeeks=4')
|
|
edt = str(r.text)
|
|
|
|
f.writelines(edt)
|
|
|
|
f.close() |