Fix scheduling form fields for Network 1.10
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>merge-requests/43/head
parent
d7f9f09018
commit
d93a19f49e
14
utils.py
14
utils.py
|
@ -396,13 +396,11 @@ def schedule_observation(session, norad_cat_id, uuid, ground_station_id, startti
|
||||||
obs_html = lxml.html.fromstring(obs.text)
|
obs_html = lxml.html.fromstring(obs.text)
|
||||||
hidden_inputs = obs_html.xpath(r'//form//input[@type="hidden"]')
|
hidden_inputs = obs_html.xpath(r'//form//input[@type="hidden"]')
|
||||||
form = {x.attrib["name"]: x.attrib["value"] for x in hidden_inputs}
|
form = {x.attrib["name"]: x.attrib["value"] for x in hidden_inputs}
|
||||||
form["satellite"] = norad_cat_id
|
form["obs-0-transmitter_uuid"] = uuid
|
||||||
form["transmitter"] = uuid
|
form["obs-0-start"] = starttime
|
||||||
form["start-time"] = starttime
|
form["obs-0-end"] = endtime
|
||||||
form["end-time"] = endtime
|
form["obs-0-ground_station"] = ground_station_id
|
||||||
form["0-starting_time"] = starttime
|
form["obs-TOTAL_FORMS"] = str(1)
|
||||||
form["0-ending_time"] = endtime
|
form["obs-INITIAL_FORMS"] = str(0)
|
||||||
form["0-station"] = ground_station_id
|
|
||||||
form["total"] = str(1)
|
|
||||||
session.post(obsURL, data=form, headers={'referer': obsURL})
|
session.post(obsURL, data=form, headers={'referer': obsURL})
|
||||||
logging.debug("Scheduled!")
|
logging.debug("Scheduled!")
|
||||||
|
|
Loading…
Reference in New Issue