Update cookies.

This commit is contained in:
USA Hexor
2018-06-04 08:15:44 +00:00
parent 7341eaaa4e
commit 52e78ef94d
3 changed files with 37 additions and 52 deletions

View File

@ -39,6 +39,7 @@ class Perdoliq:
settings.fesmu_root_url + 'startstu.aspx',
cookies={'ASP.NET_SessionId': self.SessionId})
soup = BeautifulSoup(r.text, "html.parser")
#print("****** ", soup)
_p = re.compile(',.*$')
self.name = _p.sub(
'', soup.find(id="ctl00_MainContent_Label1").get_text())[14:]
@ -143,7 +144,7 @@ class Perdoliq:
"There isn't any correct answers for %s. Looks like"\
" something went wrong. Trying other way...", q_number
)
# send all checkboxes as answer to 30th page
# send all checkboxes as answer to 30th page (4 answers questions)
requests.post(
settings.fesmu_root_url + 'studtst2.aspx',
data=settings.merge(