mirror of
https://github.com/house-of-vanity/fesmoo_perdoliq.git
synced 2025-07-07 14:04:06 +00:00
Update cookies.
This commit is contained in:
@ -112,6 +112,7 @@ def do_action(update):
|
|||||||
update.message.reply_text("Fetching tests...")
|
update.message.reply_text("Fetching tests...")
|
||||||
sleep(5)
|
sleep(5)
|
||||||
tests = list_test(s[1], s[2])
|
tests = list_test(s[1], s[2])
|
||||||
|
#print("******",tests)
|
||||||
else:
|
else:
|
||||||
update.message.reply_markdown("Usage: */list <user[text]>"\
|
update.message.reply_markdown("Usage: */list <user[text]>"\
|
||||||
" <pass[text]>*")
|
" <pass[text]>*")
|
||||||
@ -122,6 +123,7 @@ def do_action(update):
|
|||||||
return False
|
return False
|
||||||
msg = "Here is an available tests:\n``` "
|
msg = "Here is an available tests:\n``` "
|
||||||
i = 0
|
i = 0
|
||||||
|
#print("******",tests)
|
||||||
for subj in tests:
|
for subj in tests:
|
||||||
msg = msg + (" [%s] %s\n" % (i, subj))
|
msg = msg + (" [%s] %s\n" % (i, subj))
|
||||||
i += 1
|
i += 1
|
||||||
|
3
main.py
3
main.py
@ -39,6 +39,7 @@ class Perdoliq:
|
|||||||
settings.fesmu_root_url + 'startstu.aspx',
|
settings.fesmu_root_url + 'startstu.aspx',
|
||||||
cookies={'ASP.NET_SessionId': self.SessionId})
|
cookies={'ASP.NET_SessionId': self.SessionId})
|
||||||
soup = BeautifulSoup(r.text, "html.parser")
|
soup = BeautifulSoup(r.text, "html.parser")
|
||||||
|
#print("****** ", soup)
|
||||||
_p = re.compile(',.*$')
|
_p = re.compile(',.*$')
|
||||||
self.name = _p.sub(
|
self.name = _p.sub(
|
||||||
'', soup.find(id="ctl00_MainContent_Label1").get_text())[14:]
|
'', 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"\
|
"There isn't any correct answers for %s. Looks like"\
|
||||||
" something went wrong. Trying other way...", q_number
|
" 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(
|
requests.post(
|
||||||
settings.fesmu_root_url + 'studtst2.aspx',
|
settings.fesmu_root_url + 'studtst2.aspx',
|
||||||
data=settings.merge(
|
data=settings.merge(
|
||||||
|
84
settings.py
84
settings.py
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user